Home » RDBMS Server » Server Administration » trace bind variable for insert statement not working (Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production)
trace bind variable for insert statement not working [message #645944] Wed, 16 December 2015 10:55 Go to previous message
acherifi
Messages: 7
Registered: December 2015
Location: PARIS
Junior Member
Hi,

I am trying to trace bind variables value for an insert statement and it's not working

Here is my test code :

1- Trace bind variable value for a select statement (this one work fine)

create table sag.test (a varchar2(2000));

ALTER SESSION SET EVENTS '10046 trace name context forever, level 4';

declare
b varchar2(1) := '1';
res varchar2(1);
begin
select max(a) into res from test where test.a = b;
end;

-- to check the bind variable value

SELECT
a.sql_text,
b.name,
b.position,
b.datatype_string,
b.value_string
FROM
v$sql_bind_capture b,
v$sqlarea a
WHERE b.sql_id = a.sql_id
AND b.sql_id = 'czh677ju2qpak';

-- the value_string is not null and set to the variable value passed to the statement

But

2- Trace bind variable value for an insert statement (this one is not working for me)

create table sag.test (a varchar2(2000));

ALTER SESSION SET EVENTS '10046 trace name context forever, level 4';

declare
a varchar2(1) := '1';
begin
insert into test values (a);
end;

-- to check the bind variable value

SELECT
a.sql_text,
b.name,
b.position,
b.datatype_string,
b.value_string
FROM
v$sql_bind_capture b,
v$sqlarea a
WHERE b.sql_id = a.sql_id
AND b.sql_id = '9tckxpvzmsq2d';

the value_string is null !!!


Any idea ?

Thanks for your help.
./fa/12946/0/
-- moderator edit: image inserted into message body by bb

[Updated on: Wed, 16 December 2015 11:07] by Moderator

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: UTF8 or conversion to Best Practice?
Next Topic: How many Oracle instance on Dual Core System
Goto Forum:
  


Current Time: Fri Apr 26 13:13:02 CDT 2024