查询锁对象
select count(*) from v$locked_object;
select * from v$locked_object;
查询被锁的表
select b.owner,b.object_name,a.session_id,a.locked_mode,a.object_id from v$locked_object a,dba_objects b where b.object_id = a.object_id;
查询锁的session
select b.username,b.sid,b.serial#,logon_time,a.OS_USER_NAME,c.owner,c.object_name from v$locked_object a,v$session b,dba_objects c where a.session_id = b.sid AND c.object_id = a.object_id order by b.logon_time;
杀掉对应进程,其中710为sid,19573为serial#.
alter system kill session'710,19573';
alter system kill session'527,64771';
alter system kill session'356,47373';