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 lock table

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

SELECT 'Lock' "Status", a.username "username", a.sid "SID", a.serial# "SERIAL#", b.type "lock type", DECODE (b.lmode, 1, 'No Lock', 2, 'Row Share', 3, 'Row Exclusive', 4, ' Share', 5, 'Row Share Exclusive', 6, ' Exclusive','NONE') "Occupied Mode", DECODE (b.request, 1, 'No Lock', 2, 'Row Share', 3, 'Row Exclusive', 4, ' Share', 5, 'Row Share Exclusive', 6, ' Exclusive','NONE') "Mode of request", c.object_name "Object name", c.owner "Object owner", c.object_type "Object type", b.id1 "Resource ID1", b.id2 "Resource ID2", b.ctime "ctime(seconds) ", 'ALTER SYSTEM KILL SESSION '''|| a.sid||','|| a.serial#||''';' "kill Session ", 'kill -9 '||d.spid "Kill Process (Unix Linux)", 'orakill '|| f.instance_name|| ' '||d.spid "Kill Process (Windows)" FROM v$session a, v$lock b, v$locked_object b1, dba_objects c, v$process d, v$instance fWHERE a.type 'BACKGROUND' AND a.sid = b.sid AND b.request = 0 AND d.addr = a.paddr AND b1.session_id = a.sid AND b1.object_id = c.object_id AND f.status = 'OPEN' AND f.database_status = 'ACTIVE' --and c.object_name ='CSEWS'order by b.ctime;select * from v$session;--Query session

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

Wechat

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

12
Report