Oracle script checks the DX lock of the Oracle database

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.