1、select * from v$locked_object;
查看具体的 : select session_id , oracle_username, process from v$locked_object; ( session =678)
2、select * from v$session where sid = (select session_id from v$locked_object where rownum=1)
select * from v$session where sid = (select session_id from v$locked_object )
查看具体的 :
select sid , serial# from v$session where sid=(select session_id from v$locked_object where rownum=1 ) ( sid =678 , serial# = 1287)
select sid , serial# from v$session where sid=(select session_id from v$locked_object ) ( sid =678 , serial# = 1287)
3、杀死进程
alter system kill session 'sid,serial' ;
具体的例子:
alter system kill session '678,1287';