杀Oracle进程

alter system kill session '查出的sid,查出的serial#';

通過數據字典V$SESSION與V$LOCK來瞭解正在等待鎖資源的用戶
select a.username,a.sid,a.serial#,b.id1 from v$session a ,v$lock b
         Where a.lockwait = b.kaddr;

瞭解鎖住其他用戶的用戶進程,方法如下:
select a.username,a.sid,a.serial#,b.id1 from v$session a,v$lock b
         Where b.id1 in
                 (select distinct e.id1 from v$session d,v$lock e where d.lockwait = e.kaddr)
                 And a.sid = b.sid and b.request =0;

你可能感兴趣的:(oracle,pl/sql)