本文主要是介绍查看锁表和解锁,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
--表名:
SELECT A.OWNER,
C.SID,
C.SERIAL#,
A.OBJECT_NAME,
B.XIDUSN,
B.XIDSLOT,
B.XIDSQN,
B.SESSION_ID,
B.ORACLE_USERNAME,
B.OS_USER_NAME,
B.PROCESS,
B.LOCKED_MODE,
C.MACHINE,
C.STATUS,
C.SERVER,
C.PROGRAM
FROM ALL_OBJECTS A, V$LOCKED_OBJECT B, v$SESSION C
WHERE (A.OBJECT_ID = B.OBJECT_ID)
AND (B.PROCESS = C.PROCESS)
and b.SESSION_ID=c.SID
ORDER BY 1, 2 ;
select b.SID,b.SERIAL#,c.SQL_TEXT
from v$locked_object a, v$session b, v$sqlarea c
where a.SESSION_ID = b.SID
and b.SQL_ADDRESS = c.ADDRESS
and c.sql_text like '%table_name% ' ;
--包为:
Select b.Sid
,b.Username
,b.Machine
,a.Object
,a.Type
,b.
From V$access a
,V$session b
Where a.Sid = b.Sid
And a.Type = 'PACKAGE'
And a.Object = Upper('Hw_Aps_Po_Fc');
--找出这个session
--然后 kill
Alter System Kill Session '260,2419';
select * from SOP_PLAN_ACTUAL_SHIP_QTY;
这篇关于查看锁表和解锁的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!