1、查看哪些表被锁住:
select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where
2、查看引起死锁的会话:
select b.username,b.sid,b.serial#,logon_time from v$locked_object a,v$session b where a.session_id = b.sid order by b.logon_time; -- 或者 select sess.sid, sess.serial#, lo.oracle_username, lo.os_user_name, ao.object_name, lo.locked_mode, logon_time from v$locked_object lo, dba_objects ao, v$session sess where ao.object_id = lo.object_id and lo.session_id = sess.sid and oracle_username = 'DEV'; -- oracle_username 为数据库名称
3、释放锁或者杀掉ORACLE进程:
1. alter system kill session 'sid,serial#'; 2. 3. -- 具体情况根据每个人情况不一样,sid,serial#的值也不一样