查看Oracle锁表语句


1、查看被锁表
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、查看锁表进程
SELECT * FROM v$session t1, v$locked_object t2 WHERE t1.sid = t2.session_id;

3、kill session
alter system kill session '14,397';  --14:SID,397:SERIAL#

你可能感兴趣的:(session,kill)