[20220531]驗證inactive session出現的問題.txt
[20220531]驗證inactive session出現的問題.txt
--//http://blog.itpub.net/267265/viewspace-2898061/ => [20220531]inactive session等待事件2.txt
--//在alert.log記錄出現大量類似的資訊如下:
ORA-06512: at line 5
opiodr aborting process unknown ospid (25783) as a result of ORA-28
Tue May 17 09:11:27 2022
Errors in file /u01/app/oracle/diag/rdbms/ywdb/ywdb1/trace/ywdb1_ora_15721.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-00028: your session has been killed
ORA-06512: at "SYS.DBMS_LOCK", line 205
ORA-06512: at "HZMCASSET.TLOGON", line 1552
ORA-06512: at "HZMCASSET.TLOGON", line 1566
ORA-06512: at "HZMCASSET.TLOGON", line 1620
ORA-06512: at "HZMCASSET.TLOGON", line 2523
--//1566-1552 = 14
--//1620-1552 = 68
--//2523-1552 = 971
ORA-06512: at line 1
ORA-06512: at line 5
opiodr aborting process unknown ospid (15721) as a result of ORA-28
Tue May 17 09:11:30 2022
--//做一個例子驗證:
1.環境:
SCOTT@book> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
2.測試1:
--//session 1:
SCOTT@book> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
358 5 47454 DEDICATED 47455 21 3 alter system kill session '358,5' immediate;
SCOTT@book> exec dbms_lock.sleep(100);
--//sleep 100秒。
--//開啟session 2,執行:
SYS@book> select p1raw,p2raw,p3raw,p1,p2,p3,sid,serial#,seq#,event,status,state,wait_time_micro,seconds_in_wait,wait_class,client_info from v$session where sid=358
2 @pr
==============================
P1RAW : 00
P2RAW : 00
P3RAW : 00
P1 : 0
P2 : 0
P3 : 0
SID : 358
SERIAL# : 5
SEQ# : 211
EVENT : PL/SQL lock timer
STATUS : ACTIVE
STATE : WAITING
WAIT_TIME_MICRO : 26799981
SECONDS_IN_WAIT : 27
WAIT_CLASS : Idle
CLIENT_INFO :
PL/SQL procedure successfully completed.
--//注意該等待事件是PL/SQL lock timer,狀態是ACTIVE,WAIT_CLASS=Idle.
SYS@book> alter system kill session '358,5' immediate;
System altered.
--//session 1:
SCOTT@book> exec dbms_lock.sleep(100);
BEGIN dbms_lock.sleep(100); END;
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 47455
Session ID: 358 Serial number: 5
SCOTT@book> exec dbms_lock.sleep(100);
ERROR:
ORA-03114: not connected to ORACLE
--//連線已經斷開。
$ ps -fp 47455
UID PID PPID C STIME TTY TIME CMD
3.測試2:
--//session 1,再次啟動會話,執行基本同上,不使用immediate;。
SCOTT@book> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
358 7 47479 DEDICATED 47480 21 4 alter system kill session '358,7' immediate;
SCOTT@book> exec dbms_lock.sleep(100);
--//session 2:
SYS@book> alter system kill session '358,7';
System altered.
--//session 1:
SCOTT@book> exec dbms_lock.sleep(100);
BEGIN dbms_lock.sleep(100); END;
*
ERROR at line 1:
ORA-00028: your session has been killed
ORA-00028: your session has been killed
ORA-06512: at "SYS.DBMS_LOCK", line 205
ORA-06512: at line 1
--//注意對比前面的提示,可以發現出現如下資訊:
ERROR at line 1:
..
ORA-06512: at "SYS.DBMS_LOCK", line 205
--//注意與前面alert看到的行號都是205一致。
--//也就是驗證了連結為什麼 GRANT EXECUTE ON SYS.DBMS_LOCK TO SCOTT; 還是報錯的原因。
--//當然因為出現inactive session等待,job再次呼叫,這樣在前面的job正好執行到SYS.DBMS_LOCK.sleep(3),這樣會話已經不存在了
--//,alert出現大量的這類錯誤。
--//關於出現inactive session等待事件,應該可以在測試環境模擬看看。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2898065/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20220531]inactive session等待事件2.txtSession事件
- [20220531]模擬inactive session等待事件.txtSession事件
- SSH無密碼驗證可能出現的問題密碼
- python 讀取txt出現\xef\xbb\xbf…的問題Python
- ThinkPHP V6.0.12在php8.1下驗證碼出現問題PHP
- Toad中發現blocking session, 狀態為inactiveBloCSession
- 關於值物件的驗證的問題物件
- IAP 內購二次驗證(出現的問題21002及解決方案)
- session的存取問題Session
- 點選驗證碼不能實現重新整理問題
- Laravel 自定義驗證規則的問題Laravel
- 急問:mysql出現的問題MySql
- ubuntu gedit出錯:Failed to connect to the session manager的問題UbuntuAISession
- ZBlog關閉驗證碼功能(出現驗證碼出錯請關閉)
- 關於SESSION中出現的奇怪的問題!高手進~~Session
- 記錄 openssl 證書驗證失敗的詭異問題
- 簡聊 Session 與 Token 身份驗證Session
- 關於session的問題Session
- Hibernate的session問題Session
- Session的過期問題Session
- DBV驗證ASM裡的datafile,出現錯誤ASM
- session共享問題???Session
- 操作oracle出現的問題Oracle
- In V$SESSION, column SQL_ID is not NULL while STATUS is INACTIVESessionSQLNullWhile
- [20220531]測試quiz night.txtUI
- 安裝crs使用runcluvfy驗證的一個問題
- 急,急,急,請教高手struts驗證的問題!
- hibernate中的no session問題Session
- Session互不干擾的問題。Session
- Struts Tiles 和 session的問題Session
- 關於session的奇怪問題Session
- php關於session的問題PHPSession
- PHP的session,session檔案,及其過期的問題PHPSession
- 解決requests庫中SSL驗證問題
- weblogic 驗證碼 不顯示問題Web
- Java操作hdfs出現的問題Java
- nginx 編譯出現的問題Nginx編譯
- oracle安裝出現的問題Oracle