zoukankan      html  css  js  c++  java
  • 人工模拟获取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 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。

    版权声明:本文博主原创文章,博客,未经同意不得转载。

  • 相关阅读:
    JQuery替换空字符串和正则表达式校验时间格式
    数据库升级,给某张表增加字段,防止重复升级时sql脚本报错
    将jar包安装到本地repository中
    springCloud集成常用组件(持续更新)
    记一次springboot配置事务@transactional失效的事故
    分布式锁实现(Redis和zookeeper)
    springCloud集成zookeper
    zookeeper学习相关
    springboot集成activeMq
    springboot集成redis
  • 原文地址:https://www.cnblogs.com/gcczhongduan/p/4832880.html
Copyright © 2011-2022 走看看