手动模拟获取latch
随意dump一个latches结构文件:
SQL> oradebug dump latches 10
ORA-00074: no process has been specified
SQL> oradebug setmypid
Statement processed.
SQL> oradebug dump latches 10
Statement processed.
SQL> oradebug tracefile_name
/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5564.trc
找到文件并随便找一个latch地址查看:
我们这里找的是地址为0x60019d98的一个active checkpoint queue,当前状态为free:
60019d98 active checkpoint queue latch level=5
Location from where latch is held: kcbk.h LINE:2222 ID:kcbbacq: scan active checkpoints:
Context saved from call: 0
state=free [value=0] wlstate=free [value=0]
gotten 2345 times wait, failed first 0 sleeps 0
gotten 0 times nowait, failed: 0
通过oradebug验证:
SQL> oradebug peek 0x60019d98 8
[060019D98, 060019DA0)
随意dump一个latches结构文件:
SQL> oradebug dump latches 10
ORA-00074: no process has been specified
SQL> oradebug setmypid
Statement processed.
SQL> oradebug dump latches 10
Statement processed.
SQL> oradebug tracefile_name
/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5564.trc
找到文件并随便找一个latch地址查看:
我们这里找的是地址为0x60019d98的一个active checkpoint queue,当前状态为free:
60019d98 active checkpoint queue latch level=5
Location from where latch is held: kcbk.h LINE:2222 ID:kcbbacq: scan active checkpoints:
Context saved from call: 0
state=free [value=0] wlstate=free [value=0]
gotten 2345 times wait, failed first 0 sleeps 0
gotten 0 times nowait, failed: 0
通过oradebug验证:
SQL> oradebug peek 0x60019d98 8
[060019D98, 060019DA0)