alter system kill session
1. 當使用者正在處理一個事務時(ACTIVE),此時被kill時會進行rolled back,使用者客戶端會報錯:
ORA-00028: your session has been killed
此時進行commit時會報:
ORA-03114: not connected to ORACLE
2. active session:
ACTIVE session在執行network I/O或rolling back事務時不能被中斷,直到操作完成才會釋放所有資源!
期間該session會被標記為killed或者pseudo狀態。
3. inactive session:
INACTIVE session被kill時,先被標記killed,然後改行記錄送v$session中移除。
4. 對於ACTIVE session,可以使用 immediate選項,強制立即Kill會話,如下:
SQL> alter system kill session 'sid, serial#' immediate;
注:immediate會立即斷開session,而不用等待事務完成。
--批次kill
select 'alter system kill session'''||sid||','||SERIAL#||''' immediate;' from v$session where username in ('USER1','USER2');
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27126919/viewspace-1959108/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- alter system kill session 不成功Session
- Alter system kill session and ORA-00031: session marked for killSession
- ALTER SYSTEM KILL SESSION這麼沒力?(轉)Session
- alter system disconnect/kill session 'sid,serial#';Session
- ora-00054 , alter system kill session 'id,serial#'Session
- "alter system kill session" can crash the instance if IO slaves usedSession
- 檢視鎖的資訊和alter system kill session的用法(小例子)Session
- alter session|system set eventsSession
- alter database和alter system和alter session的區別DatabaseSession
- ALTER SYSTEM DISCONNECT SESSION ClauseSession
- kill sessionSession
- 【kill session】Oracle 徹底 kill session(轉載)SessionOracle
- alter system events與alter system event的區別
- Alter system in OracleOracle
- [alter system dump學習1]alter system dump logfile
- alter system archive log current和alter system switch logfileHive
- awk -- kill sessionSession
- Oracle kill sessionOracleSession
- alter session setSession
- ALTER SYSTEM SWITCH LOGFILE ALTER SYSTEM ARCHIVELOG CURRENT 區別Hive
- alter system enable restricted session 及 startup restrict 限制使用者登入RESTSession
- mysql批次kill sessionMySqlSession
- Oracle kill session scriptOracleSession
- oracle_kill_sessionOracleSession
- KILL SESSION 相關Session
- Oracle中Kill sessionOracleSession
- Oracle批量kill sessionOracleSession
- ALTER SESSION SET EVENTSSession
- alter system switch logfile和alter system archive log current的區別Hive
- alter system switch logfile 和 alter system archive log current 的區別Hive
- alter system check datafiles 命令
- [轉]alter system switch logfile和alter system archive log current的區別Hive
- zt:alter system switch logfile與ALTER SYSTEM ARCHIVE LOG CURRENT的區別Hive
- 無腦批量kill sessionSession
- Oracle 徹底 kill sessionOracleSession
- 表鎖定,kill sessionSession
- kill session的學問Session
- Oracle中Kill session [轉]OracleSession