【Oracle指令碼】檢查Oracle資料庫的DX鎖

來源:互聯網
上載者:User

標籤:oracle   資料庫   cccccc   style   color   

set linesize 300set pagesize 200column  blocker  format a10column  blockee  format a10column  blocker_sql format a30column  blockee_sql format a30column  blocker_machine format a30column  blocker_program format a30column  blocker_event format a30column  blockee_machine format a30column  blockee_program format a30 column  blockee_event format a30SELECT s1.username            "WAIT",       s1.machine             "Machine",       w.sid,       s1.serial#,       s1.SQL_ID,       trim(P1.spid)                 "PID",--       S1.INST_ID            "INSTANCE",       S1.INST_ID             "IN",       s2.username             "HOLD",       s2.machine              "Machine",       h.sid,       s2.serial#,       s2.sql_id,       trim(p2.spid)                  "PID",--       S2.INST_ID             "INSTANCE",       S2.INST_ID              "IN",       S2.PROCESSFROM   gv$process P1,    gv$process P2,       gv$session S1,    gv$session S2,       gv$lock w,          gv$lock hWHERE  (((h.LMODE != 0) and (h.LMODE != 1)  and ((h.REQUEST = 0) or (h.REQUEST = 1)))  and  (((w.LMODE= 1) or (w.LMODE = 0))  and ((w.REQUEST != 1) and (w.REQUEST != 0))))  and  w.type =  h.type  and  w.id1  =  h.id1  and  w.id2  =  h.id2  and  w.sid     !=  h.sid  and  w.sid       = S1.sid  and  h.sid       = S2.sid  and  S1.EVENT  =‘enq: DX - contention‘  AND    S1.paddr           = P1.addr  AND    S2.paddr           = P2.addr  order by "WAIT",h.CTIME;

【Oracle指令碼】檢查Oracle資料庫的DX鎖

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.