oracle表被锁的解决办法
2020-07-17 本文已影响0人
马云生
1.查找死锁Session
Select sess.sid,
sess.serial#,
lo.oracle_username,
lo.os_user_name,
Ao.object_name,
lo.locked_mode,
'alter system kill session ''' ||
sess.sid ||
',' ||
sess.serial# ||
''';' fresql
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.执行Kill Session
alter system kill session 'sid值,serial#值' immediate