【Oracle】-【SNIPED和KILLED】-SPINED和KILLED的session清理流程
@dbsnake大拿的一個示例:
SQL> show parameter limit
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_power_limit integer
1
java_soft_sessionspace_limit integer
0
resource_limit boolean
TRUE
SQL> create profile idletime limit idle_time 1;
Profile created.
SQL> alter user bisal profile idletime;
User altered.
SQL> conn bisal/bisal
From another session:
SQL> select status from v$session where username='BISAL';
STATUS
--------
ACTIVE
INACTIVE
After one minute:
SQL> select status from v$session where username='BISAL';
STATUS
--------
ACTIVE
SNIPED
From BISAL session:
SQL> select * from dual;
select * from dual
*
ERROR at line 1:
ORA-02396: exceeded maximum idle time, please connect again
From another session:
SQL> select status from v$session where username='BISAL';
STATUS
--------
ACTIVE
驗證一個SNIPED的session,重新執行一條SQL,Oracle會自動刪除該session。
再做一個實驗:
Conn bisal
From another session:
SQL> select status from v$session where username='BISAL';
STATUS
--------
ACTIVE
INACTIVE
SQL> select username,serial#, sid, to_timestamp(logon_time) from v$session
2 where username='BISAL';
USERNAME SERIAL#
SID TO_TIMESTAMP(LOGON_TIME)
---------------------------------------------------------------------------
BISAL 8 208 10-JUL-13 12.00.00 AM
BISAL 15
215 10-JUL-13 12.00.00 AM
SQL> alter system kill session '215, 15';
System altered.
SQL> select status from v$session where username='BISAL';
STATUS
--------
ACTIVE
KILLED
From BISAL session:
SQL> select * from dual;
select * from dual
*
ERROR at line 1:
ORA-00028: your session has been killed
From another session:
SQL> select status from v$session where username='BISAL';
STATUS
--------
ACTIVE
即KILLED狀態的session執行一個SQL,也會立即清除,這個據@eygle介紹是PMON負責的。"如果此時被Kill的process,重新嘗試執行任務,那麼馬上會收到程式中斷的提示,process退出,此時Oracle會立即啟動PMON來清除該session.這被作為一次異常中斷處理."
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7192724/viewspace-767163/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle 什麼時候才回收v$session 中status='KILLED'的程式OracleSession
- SESSION處於KILLED狀態下如何找出對應的程式Session
- [20200319]KILL STATUS ='KILLED'的程式.txt
- (轉貼)Out of Memory: Killed process
- Linux下Python程式Killed,分析其原因LinuxPython
- 詳解 Flink 容器化環境下的 OOM KilledOOM
- 錯誤解決:cc: Internal error: Killed (program cc1)Error
- MacOS安裝錄播姬BililiveRecorder解決zsh:killed問題Mac
- 解決Android 虛擬機器執行The emulator process for AVD was killed.錯誤。Android虛擬機
- SQLServer會話KILL不掉,一直處於KILLED/ROLLBACK狀態情形淺析SQLServer會話
- session和v$session說明Session
- cookie 和 sessionCookieSession
- session和cookieSessionCookie
- Cookie和SessionCookieSession
- [20180918]disconnect session和kill session的區別.txtSession
- cookie和session的區別CookieSession
- 對session和cookie的理解SessionCookie
- Tomcat 中的 Session 和 CookieTomcatSessionCookie
- 【Javaweb】Cookie和SessionJavaWebCookieSession
- keycloak~關於session idle和session max的解釋Session
- oracle的adr清理incidentOracleIDE
- flask框架中的cookie和sessionFlask框架CookieSession
- 物件的初始化和清理物件
- Oracle session traceOracleSession
- Cookie 和 Session 關係和區別CookieSession
- http中session和cookie的區別和關係HTTPSessionCookie
- session和cookie關係SessionCookie
- Session和Cookie機制SessionCookie
- 撩下Cookie和SessionCookieSession
- laravel操作session和cookieLaravelSessionCookie
- 關於Session和CookieSessionCookie
- SpringMVC(3)-request域和session域的作用和區別SpringMVCSession
- Oracle:審計清理Oracle
- localStorage 與 sessionStorage / cookie 和 sessionSessionCookie
- 聊一聊session和cookieSessionCookie
- nodeJS之Cookie和Session(一)NodeJSCookieSession
- 深入分析Session和CookieSessionCookie
- Django框架之Cookie和SessionDjango框架CookieSession
- Redis分散式Session和普通的cookie session有什麼區別?Redis分散式SessionCookie