首页 > 数据库 > Oracle > 从OS中kill ORACLE死锁进程
1.查找死锁进程
SQL> select object_name,machine,s.sid,s.serial#
from v$locked_object l,dba_objects o ,v$session s
where l.object_id = o.object_id and l.session_id=s.sid;
2.从ORACLE中KILL死锁进程
SQL> alter system kill session '3278,24961';
alter system kill session '3278,24961'
*
ERROR at line 1:
ORA-00031: session marked for kill
3.查找在OS中的SPID
SQL> select spid, osuser, s.program
2 from v$session s,v$process p
3 where s.paddr=p.addr and s.sid=&sid;
Enter value for sid: 3278
old 3: where s.paddr=p.addr and s.sid=&sid
new 3: where s.paddr=p.addr and s.sid=3278
SPID OSUSER
------------ ------------------------------
PROGRAM
------------------------------------------------
18351 oracle
sqlplus@STCS-MES-ARC (TNS V1-V3)
SQL> exit
4.从OS中KILL
$ kill -9 18351
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/789833/viewspace-1037105/ ,如需转载,请注明出处,否则将追究法律责任。