搜尋此網誌

2015年4月2日 星期四

pl/sql死锁情况:record is locked by another user

一、PL/SQL 查看锁:
select t2.username,t2.sid,t2.serial#,t2.logon_time
from v$locked_object t1,v$session t2
where t1.session_id = t2.sid 
order by t2.logon_time;


二、查看锁后,找出sid,serial#,将所有的锁kill掉
alter system kill session 'sid,serial#'