WEB开发网
开发学院数据库Oracle 如何从trace文件中查找引起问题的sql 阅读

如何从trace文件中查找引起问题的sql

 2008-09-28 12:57:04 来源:WEB开发网   
核心提示: Example 2: Cursor Dump Current cursor: 11, pgadep: 1Cursor Dump:查找cursor 11:Cursor 11 (202cb9f0): CURBOUND curiob: 202f8b04curflg: dd curpar:0 cu

Example 2:

******************** Cursor Dump ************************
Current cursor: 11, pgadep: 1
Cursor Dump:
----------------------------------------
查找cursor 11:
----------------------------------------
Cursor 11 (202cb9f0): CURBOUND curiob: 202f8b04
curflg: dd curpar:
0 curusr: 0 curses 30047c7c
cursor name: SELECT LOCKID FROM DBMS_LOCK_ALLOCATED WHERE NAME =
:b1 FOR UPDATE
child pin:
0, child lock: 300dc9b4, parent lock: 301730b8
xscflg: 1151421, parent handle: 3025b4dc
bind 0: dty=1 mxl=32(00) mal=00 scl=00 pre=00 oacflg=01
No bind buffers allocated
----------------------------------------
当前SQL 语句:
SELECT LOCKID FROM DBMS_LOCK_ALLOCATED WHERE NAME = :b1 FOR UPDATE
绑定变量:b1是VARCHAR2(32) 类型(dty=1, mxl=32), 但是在dump的那个时刻没有给变量赋值("No bind buffers allocated"). 

Example 3:

******************** Cursor Dump ************************
Current cursor: 2, pgadep: 0
Cursor Dump:
----------------------------------------
...
----------------------------------------
Cursor 2 (20140444): CURNULL curiob: 0
curflg: 44 curpar: 0 curusr: 0 curses 701dc94c
----------------------------------------
在这种情况下,当dump 的时候并没有sql被执行 

Example 4:

******************** Cursor Dump ************************
Current cursor: 1, pgadep: 0
pgactx: ccf361c0
ctxcbk: 0 ctxqbc: 0 ctxrws: 0
Cursor Dump:
----------------------------------------
Cursor 1 (400d9478): CURBOUND curiob:
400e43d8
curflg: 4c curpar: 0 curusr: 0 curses d5348f80
cursor name: BEGIN myparser.convert('/tmp','workflow000_2.log',2);
END;
child pin: d14a4d70, child lock: d1589968, parent lock: d14c64a0
xscflg: 100064, parent handle: d083f1c0, xscfl2: 4040408
nxt: 1.0x000000a8
Cursor frame allocation dump:
frm: -------- Comment -------- Size Seg Off
----------------------------------------
没有用到绑定变量,所以,sql语句就是PL/SQL块:
BEGIN myparser.convert('/tmp','workflow000_2.log',2); END;

上一页  1 2 3 

Tags:如何 trace 文件

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接