最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

手动模拟获取latch

来源:动视网 责编:小采 时间:2020-11-09 15:04:50
文档

手动模拟获取latch

手动模拟获取latch:手动模拟获取latch 随意dump一个latches结构文件: SQL oradebug dump latches 10 ORA-00074: no process has been specified SQL oradebug setmypid Statement processed. SQL oradebug dump latches 1
推荐度:
导读手动模拟获取latch:手动模拟获取latch 随意dump一个latches结构文件: SQL oradebug dump latches 10 ORA-00074: no process has been specified SQL oradebug setmypid Statement processed. SQL oradebug dump latches 1


手动模拟获取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 /o

手动模拟获取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) = 00000000 00000000
该latch的当前值为0,确为free状态,我将它值修改为1:
SQL> oradebug poke 0x60019d98 2 1
BEFORE: [060019D98, 060019D9C) = 00000000
AFTER: [060019D98, 060019D9C) = 00000001
再次dump一个latches结构文件,并找到上述latch的信息:
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=busy [holder orapid=1] wlstate=free [value=0]
waiters [orapid (seconds since: put on list, posted, alive check)]:
10 (30, 1402142587, 30)
waiter count=1
gotten 2607 times wait, failed first 0 sleeps 0
gotten 0 times nowait, failed: 0
此时状态为busy。

文档

手动模拟获取latch

手动模拟获取latch:手动模拟获取latch 随意dump一个latches结构文件: SQL oradebug dump latches 10 ORA-00074: no process has been specified SQL oradebug setmypid Statement processed. SQL oradebug dump latches 1
推荐度:
标签: 获取 手动 模拟
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top