如何获取trace中sql所绑定变量的值

QUESTION
=========
Enabled 10046 trace level 4 and created trace files,But how to find bind variables's value
eos (end of section)


ANSWER
=======
Here is an example:

Sample PL/SQL code:

declare
vcount number := 88;
vcount2 char(5) := 'meme' ;
begin
insert into taba values (vcount, vcount2);
end;

The resulting trace output:

PARSING IN CURSOR #2 len=36 dep=1 uid=0 oct=2 lid=0 tim=0 hv=540755502
ad='40106
c6c'
INSERT INTO TABA VALUES ( :b1,:b2 )
END OF STMT
PARSE #2:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=0
BINDS #2:
bind 0: dty=2 mxl=22(22) mal=00 scl=00 pre=00 oacflg=03
bfp=20080d30 bln=22 avl=02 flg=05
value=88
bind 1: dty=96 mxl=32(05) mal=00 scl=00 pre=00 oacflg=03
bfp=20080d1c bln=05 avl=05 flg=05
value="meme "
EXEC #2:c=0,e=0,p=0,cr=2,cu=3,mis=0,r=1,dep=1,og=4,tim=0
EXEC #1:c=0,e=0,p=0,cr=2,cu=3,mis=0,r=1,dep=0,og=4,tim=0
XCTEND rlbk=0, rd_only=0

:b1's value is bind 0, value=88
:b2's value is bind 1,value "meme"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值