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 Script] Lock

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

Share

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

Col spid format a10

Col inst_id format a7

Col owner format a15

Col object_name format a20

Col machine format a30

Col program format a20

Select pr.spid,se.inst_id,se.sid,se.serial#,ob.owner,ob.object_name,se.osuser,se.machine,se.terminal,se.program

, gvl1.ctime, (select count (*)-1 from gv$lock where inst_id=gvl2.inst_id and id1=gvl2.id1) as blocking_session

Trunc (gvl2.id1/power (2 ffff','xxxx' 16)) xidusn,bitand (gvl2.id1,to_number ('ffff','xxxx')) xidslot,gvl2.id2 xidsqn

From gv$lock gvl1,gv$session se,dba_objects ob, gv$process pr

(select * from gv$lock where block=1) gvl2

Where gvl1.inst_id=gvl2.inst_id and gvl1.sid=gvl2.sid and gvl1.type='TM'

And gvl1.inst_id=se.inst_id and gvl1.sid=se.sid and gvl1.id1=ob.object_id

And se.paddr=pr.addr

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