Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Bind values missing from SQL trace

RE: Bind values missing from SQL trace

From: Dunbar, Norman <>
Date: Thu, 16 Aug 2007 10:06:49 +0100
Message-ID: <919FC80F27E0C6428106496EDF92A7525F66CD@EXCCLUS05.PRODDS.NTNL>


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
 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
 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
WAIT #1: nam='SQL*Net message to client' ela= 6 p1=1650815232 p2=1 p3=0 FETCH
*** 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,

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

Received on Thu Aug 16 2007 - 04:06:49 CDT

Original text of this message