Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle blocking session query

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report