[OracleScript]Lock

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,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;

網(wǎng)站題目:[OracleScript]Lock
分享網(wǎng)址:http://www.muchs.cn/article0/iidhio.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供服務(wù)器托管、電子商務(wù)、營(yíng)銷(xiāo)型網(wǎng)站建設(shè)、移動(dòng)網(wǎng)站建設(shè)動(dòng)態(tài)網(wǎng)站、用戶(hù)體驗(yàn)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站優(yōu)化排名