RE: Bind values missing from SQL trace

  • From: "Dunbar, Norman" <norman.dunbar@xxxxxxxxxxxxxxxxxxxxxxxxx>
  • To: "Rich Jesse" <rjoralist@xxxxxxxxxxxxxxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 16 Aug 2007 10:06:49 +0100

Rich,

I just did a quick test on 9204 where I got the following :

PARSING IN CURSOR #1 len=51 dep=0 uid=23 oct=3 lid=23
tim=1159428269085500 hv=3817972469 ad='5417974c'
select * from norman where n = :nfred and v = :fred
END OF STMT
PARSE
#1:c=1000,e=813,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=0,tim=1159428269085479
BINDS #1:
 bind 0: dty=1 mxl=2000(200) mal=00 scl=00 pre=00 oacflg=03 oacfl2=10
size=2000 offset=0
   bfp=40638764 bln=2000 avl=16 flg=05
   value=""
 bind 1: dty=1 mxl=128(100) mal=00 scl=00 pre=00 oacflg=03 oacfl2=0
size=128 offset=0
   bfp=4063ca70 bln=128 avl=07 flg=05
   value="varchar"
EXEC
#1:c=0,e=221,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=1159428269111075
WAIT #1: nam='SQL*Net message to client' ela= 6 p1=1650815232 p2=1 p3=0
FETCH
#1:c=0,e=122,p=0,cr=3,cu=0,mis=0,r=0,dep=0,og=4,tim=1159428269111297
*** 2007-08-16 09:56:03.320
WAIT #1: nam='SQL*Net message from client' ela= 15381631 p1=1650815232
p2=1 p3=0
STAT #1 id=1 cnt=0 pid=0 pos=1 obj=17766 op='TABLE ACCESS FULL NORMAN
(cr=3 r=0 w=0 time=112 us)'

In the above, and for every test carried out, The N type bind variables
are never displayed. The table is simple :


Interestingly, the trace shows both binds as having the same data type
(dty=1) but with different max lengths (mxl=2000(200) for the NVVARCHAR2
and mxl=128(100) for the VARCHAR2. The AVL for the NVARCHAR is 16 bytes
long, when the data was actually 8 bytes for the VARCHAR2 it is 7 bytes
- which is as supplied.

So, it looks remarkably like your 'problem' is simply that N data type
binds don't get listed to trace files.

My testing went as follows :

create table norman (n nvarchar2(100), v varchar2(100));
var nfred nvarchar2(1000)
var fred varchar2(100)
exec :nfred := n'nvarchar'
exec :fred := 'varchar'
select * from norman where n = :nfred and v = :fred;


HTH

Cheers,
Norm.

Information in this message may be confidential and may be legally privileged. 
If you have received this message by mistake, please notify the sender 
immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should 
still check any attachment before opening it.

We may have to make this message and any reply to it public if asked to under 
the Freedom of Information Act, Data Protection Act or for litigation.  Email 
messages and attachments sent to or from any Environment Agency address may 
also be accessed by someone other than the sender or recipient, for business 
purposes.

If we have sent you information and you wish to use it please read our terms 
and conditions which you can get by calling us on 08708 506 506.  Find out more 
about the Environment Agency at www.environment-agency.gov.uk
--
//www.freelists.org/webpage/oracle-l


Other related posts: