SQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 27 11:09:50 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
SQL> select sid,username,status from v$session;
SID USERNAME STATUS ---------- ------------------------------ -------- .... 154 SCOTT KILLED ...
30 rows selected.
那按照我前面提到的步骤,首先查询得到该session对应的OS进程号:
SQL> select 'kill -9 '||spid from v$process where addr = (select paddr from v$session where sid=&sid); Enter value for sid: 154 old 1: select 'kill -9 '||spid from v$process where addr = (select paddr from v$session where sid=&sid) new 1: select 'kill -9 '||spid from v$process where addr = (select paddr from v$session where sid=154)