【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中的KILLED SESSIONOracleSession
- Killed Session Are Not Cleaned By PMONSession
- oracle 什麼時候才回收v$session 中status='KILLED'的程式OracleSession
- kill session V$SESSION標記為KILLED 的2種情況Session
- SESSION處於KILLED狀態下如何找出對應的程式Session
- 【Oracle】-【v$session】v$session的SNIPED狀態OracleSession
- ulimit限制導致的 +++ killed by SIGKILL +++MIT
- Linux下Python程式Killed,分析其原因LinuxPython
- Removing Sessions in Killed Status on Unix (文件 ID 274216.1)REMSession
- 詳解 Flink 容器化環境下的 OOM KilledOOM
- 【新炬網路名師大講堂】Oracle小知識- Oracle KILLED會話的釋放Oracle會話
- 錯誤解決:cc: Internal error: Killed (program cc1)Error
- session的狀態什麼時候是snipedSession
- ORACLE SESSION 和 PROCESSOracleSession
- [20200319]KILL STATUS ='KILLED'的程式.txt
- oracle session和process的關係OracleSession
- 修改Oracle process 和 session 的方法--摘OracleSession
- oracle遭遇大量SNIPED會話Oracle會話
- SQLServer會話KILL不掉,一直處於KILLED/ROLLBACK狀態情形淺析SQLServer會話
- 解決Android 虛擬機器執行The emulator process for AVD was killed.錯誤。Android虛擬機
- Oracle ASH和Session Tracing(ZT)OracleSession
- idle_time超時,session變為'sniped' 問題Session
- 清理session的小插曲(二)Session
- oracle清理和重建臨時表空間Oracle
- 在Oracle中session和process的區別(轉)OracleSession
- 查詢oracle比較慢的session和sqlOracleSessionSQL
- oracle session和process的關係 .轉自CSDNOracleSession
- Sessions Get Killed if Connection Use Default Service name (Same as db_name) (Doc ID 730315.1)Session
- 查詢oracle比較慢的session和SQL[轉]OracleSessionSQL
- oracle中引數session和 processes的設定(轉)OracleSession
- session和v$session說明Session
- session和cookieSessionCookie
- cookie 和 sessionCookieSession
- Cookie和SessionCookieSession
- disconnect session和kill session的區別Session
- 物件的初始化和清理物件
- cookie和session的區別CookieSession
- 對session和cookie的理解SessionCookie