如何获取trace中sql所绑定变量的值
2005-03-24 13:49
453 查看
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"
=========
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"
相关文章推荐
- 如何获取Oracle share pool中没有使用绑定变量的SQL
- Transact-SQL 示例 - 如何获取一个变量的数据类型
- V$SQL_BIND_CAPTURE 获取绑定变量的值
- Oracle 获取没有使用绑定变量的SQL语句
- 如何获取某个sql语句的执行计划系列三---格式化trace 文件
- 动态SQL中的重复占位符如何与绑定变量进行绑定
- 如何查看共享池中哪些sql没有绑定变量--from ask tom
- 什么是SQL绑定变量,如何实现绑定变量?
- 获取SQL绑定变量的值
- Transact-SQL 示例 - 如何获取一个变量的数据类型
- c#中里有pl/sql匿名块和绑定变量在执行insert后获取当前序列值
- 如何查找硬解析问题,找到未使用绑定变量的SQL---脚本
- c#里用pl/sql匿名块和绑定变量在执行insert后获取当前序列值
- oracle 如何获取绑定变量的值
- oracle 如何获取绑定变量的值
- 如何监控并找出系统中存在的大量的未使用绑定变量的SQL
- Sqldatareader 绑定后如何在ItemDataBound事件获取数据源
- 什么是SQL绑定变量,如何实现绑定变量?
- 变量绑定和sql_trace
- 如何确定系统中存在没有绑定变量的情况