根據v$session 之status及logon_time有選擇kill某些session會話
SQL> select username,
sid,
serial#,
status,
to_char(logon_time,'yyyy-mm-dd hh24:mi:ss')
from v$session
where status!='ACTIVE'
order by to_char(logon_time,'yyyy-mm-dd hh24:mi:ss');
USERNAME SID SERIAL# STATUS TO_CHAR(LOGON_TIME,
---------- ---------- ---------- -------- -------------------
PD 979 5 INACTIVE 2010-07-29 08:35:50
PD 975 6 INACTIVE 2010-07-29 08:35:57
PD 988 8 INACTIVE 2010-07-29 08:51:33
PD 978 15 INACTIVE 2010-07-29 09:12:40
PD 989 165 INACTIVE 2010-07-29 09:12:40
PD 974 8 INACTIVE 2010-07-29 09:12:40
PD 972 5 INACTIVE 2010-07-29 09:12:40
PD 976 2 INACTIVE 2010-07-29 09:12:40
---------- ---------- ---------- -------- -------------------
PD 979 5 INACTIVE 2010-07-29 08:35:50
PD 975 6 INACTIVE 2010-07-29 08:35:57
PD 988 8 INACTIVE 2010-07-29 08:51:33
PD 978 15 INACTIVE 2010-07-29 09:12:40
PD 989 165 INACTIVE 2010-07-29 09:12:40
PD 974 8 INACTIVE 2010-07-29 09:12:40
PD 972 5 INACTIVE 2010-07-29 09:12:40
PD 976 2 INACTIVE 2010-07-29 09:12:40
alter system kill session 'sid,serial#';
再次執行以上sql
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-669745/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 批量kill殺死某些會話session的plsql會話SessionSQL
- 【會話】Oracle kill session系列會話OracleSession
- Kill session 和orakill 殺會話及程式總結Session會話
- 【會話】V$SESSION檢視會話Session
- 會話技術之 Session會話Session
- 大話Oracle中的kill sessionOracleSession
- Session會話Session會話
- kill sessionSession
- 【kill session】Oracle 徹底 kill session(轉載)SessionOracle
- 【Oracle九大效能檢視】之4.v$sesstat_根據session id查session的統計資訊OracleSession
- Oracle 會話(Session)Oracle會話Session
- kill session V$SESSION標記為KILLED 的2種情況Session
- 【Oracle九大效能檢視】之7.v$transaction_根據session id查session執行的事務OracleSession
- awk -- kill sessionSession
- Oracle kill sessionOracleSession
- Cassandra的Session會話Session會話
- Alter system kill session and ORA-00031: session marked for killSession
- mysql批次kill sessionMySqlSession
- alter system kill sessionSession
- Oracle kill session scriptOracleSession
- oracle_kill_sessionOracleSession
- KILL SESSION 相關Session
- Oracle中Kill sessionOracleSession
- Oracle批量kill sessionOracleSession
- 要 kill session 例子,session多,報錯如下Session
- disconnect session和kill session的區別Session
- Session會話管理(PHP,Apacha)Session會話PHP
- oracle session(會話) 跟蹤OracleSession會話
- 會話等待(Session Waits)會話SessionAI
- 會話層技術-session會話Session
- 10、flask-會話-sessionFlask會話Session
- oracle如何找出登入會話v$session的IP地址?Oracle會話Session
- 無腦批量kill sessionSession
- Oracle 徹底 kill sessionOracleSession
- 表鎖定,kill sessionSession
- kill session的學問Session
- Oracle中Kill session [轉]OracleSession
- kill session的測試Session