SetLinesize -SetPageSize $columnblocker format A10columnblockee format A10columnblocker_sql format A30columnblockee_sql format A30columnblocker_machine format A30columnblocker_program format A30columnblocker_event format A30columnblockee_machine format A30columnblockee_program format A30columnblockee_event format A30SELECTs1.username "WAIT", S1.machine "Machine", W.sid, s1.serial#, S1. sql_id, Trim (p1.spid) "PID",--S1. inst_id "INSTANCE",S1. inst_id "inch"S2.username", S2.machine "Machine", H.sid, s2.serial#, s2.sql_id, Trim (p2.spid) "PID",--S2. inst_id "INSTANCE",S2. inst_id "inch", S2. PROCESS fromgv$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)))) andW.type=H.type andW.id1=H.id1 andW.id2=H.id2 andW.sid!=H.sid andW.sid=S1.sid andH.sid=S2.sid andS1. EVENT='enq:dx-contention' andS1.paddr=p1.addr andS2.paddr=p2.addrOrder by"WAIT", h.ctime;
Oracle script checks the DX lock of the Oracle database