当前位置:数据库 > Oracle >>

Oracle查出所有被锁住的表

Oracle查出所有被锁住的表
 
--查出所有被锁住的表

select b.owner TABLEOWNER, b.object_name TABLENAME, c.OSUSER LOCKBY, c.USERNAME LOGINID, c.sid SID, c.SERIAL# SERIAL

from v$locked_object a,dba_objects b, v$session c 

where b.object_id = a.object_id AND a.SESSION_ID =c.sid;

--通过SID, SERIAL解锁 

--alter system kill session 'SID, SERIAL';

 


CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,