下面是測試會話的狀态是killed的時候,怎麼去kill程序,今天在MOS上面看到有官方的文檔,原來是自己寫的SQL,功能差不多。
1,資料庫版本
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
2,WIN遠端登陸資料庫
d:\wendang\SkyDrive\rs2\sql>sqlplus scott/[email protected]/orcl1124
SQL*Plus: Release 11.2.0.3.0 Production on 星期四 6月 5 16:28:36 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
3,手動KILL掉會話
SID SERIAL#
---------- ----------
35 51
System altered.
4,檢視會話的狀态
STATUS PROGRAM SERVER
-------- ------------------------------------------------ ---------
KILLED sqlplus.exe PSEUDO
這裡看到SERVER已經變成了pseudo
下面是11G之前的方法,不過這裡把D000的程序都顯示出現了
2 where program!= 'PSEUDO'
3 and addr not in (select paddr from v$session)
4 and addr not in (select paddr from v$bgprocess)
5 and addr not in (select paddr from v$shared_server);
SPID PROGRAM
------------------------ ------------------------------------------------
9659 oracle@orcl9i
7095 oracle@orcl9i (D000)
下面是11G的方法
還是在11G中更好使啊。
本文轉自7343696 51CTO部落格,原文連結:http://blog.51cto.com/luoping/1422690,如需轉載請自行聯系原作者