如何查找oracle被锁住表的sid并kill

1、查询被锁(占用)的表的sid

select SESS.sid, SESS.SERIAL#, LO.ORACLE_USERNAME, LO.OS_USER_NAME,

AO.OBJECT_NAME, LO.LOCKED_MODE

from V$LOCKED_OBJECT LO, DBA_OBJECTs AO, V$SESSION SESS

where AO.OBJECT_ID = LO.OBJECT_ID

and lo.session_id = sess.sid;

 

 

2、杀掉锁住的表:

alter system kill session 'sid,serial#';

alter system kill session '173,16112';

上一篇:ubuntu命令行配置静态IP


下一篇:Java并发包线程池之ForkJoinPool即ForkJoin框架(二)