首页 > 代码库 > 查看oracle被锁的表

查看oracle被锁的表

SELECT /*+ rule*/ a.sid, b.owner, object_name, object_type FROM v$lock a, all_objects b WHERE TYPE = ‘TM‘ and a.id1 = b.object_id;

查到的都是被锁的表

 

SELECT * FROM v$session where sid = xxx; 查到 serial#

 

最后alter system kill session ‘sid,serial#‘;  关闭锁

查看oracle被锁的表