Get the App
SLTechnology News&Howtos  ›  Database  › 

Oracle blocking session query

Shulou Source: shulou.com Published: 2022-06-01 05:04:36 10月01日 Update

Select INST_ID, SID, TYPE, ID1, ID2, LMODE, REQUEST, CTIME, BLOCK

DECODE (BLOCK, 0,', 'blocker') blocker

DECODE (request, 0,', 'waiter') waiter

From gv$lock where (ID1,ID2,TYPE) in

(select ID1,ID2,TYPE from gv$lock where request > 0)

Order by blocker

An example of the execution result is as follows:

INST_ID SID TYPE ID1 ID2 LMODE REQUEST CTIME BLOCK BLOCKER WAITER

1 70 TX 65539 2630730 6 0 2520 1 blocker

1 86 TX 65539 2630730 0 4 1654 0 waiter

Wait a moment to enter /, enter, and execute the above SQL again. If the blocking situation remains the same, confirm that the session with SID = 70 is a blocking session.

If the result shows no rows selected, it is normal.

Tags: Blocking result again case example faceted input query Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Shulou Technology NVidia Redmi vpn