trace bind variable for insert statement not working [message #645944] |
Wed, 16 December 2015 10:55 |
|
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.
-- moderator edit: image inserted into message body by bb
[Updated on: Wed, 16 December 2015 11:07] by Moderator Report message to a moderator
|
|
|