In V$SESSION, column SQL_ID is not NULL while STATUS is INACTIVE
Applies to:
Oracle Database - Standard Edition - Version 11.1.0.7 and laterOracle Database - Enterprise Edition - Version 11.1.0.7 and later
Information in this document applies to any platform.
Symptoms
When a session is inactive, the SQL_ID for this session is not null.
The issue can be reproduced by following these steps:
- connect from sqlplus as a test user
- connect from a second session as sys and run the following query:
SQL> select sid, username, status, sql_id, sql_exec_start from v$session;
Note: the first session should should be inactive and having SQL_ID NULL
- go back to the first session and run a query
SQL> select * from dual;
- go back to the SYS session and verify again the sessions
NOTE: the first session will show again as INACTIVE but this time the SQL_ID has an explicit value
SQL> conn scott/tiger
Connected.
SQL> create table test1(id number);
Table created.
SQL> select * from dual;
D
-
X
-- Second session as sysdba
SQL> select sql_id,status from v$session where username='SCOTT';
SQL_ID STATUS
------------- --------
INACTIVE
SQL> /
SQL_ID STATUS
------------- --------
7jnhyr6g49s8p INACTIVE
SQL> /
SQL_ID STATUS
------------- --------
a5ks9fhw2v9s1 INACTIVE
Cause
This is a product defect as when a session is inactive the sql_id for this session is supposed to be null.
As per the Oracle documentation :
SQL_ID VARCHAR2(13) SQL identifier of the SQL statement that is currently being executed
Reference:
The issue matches : IN V$SESSION, SQL_ID IS NOT NULL BUT STATUS IS INACTIVE
Solution
At the time of writing this document, the developers are still working on a fix for this issue under .
References
- IN V$SESSION, SQL_ID IS NOT NULL BUT STATUS IS INACTIVE來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31393455/viewspace-2131913/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 問題:V$SESSION SQL_ID 為空,找不到SQL_IDSessionSQL
- V$SESSION.STATUS='ACTIVE' AND WAIT_EVENT='Idle'SessionAI
- oracle 什麼時候才回收v$session 中status='KILLED'的程式OracleSession
- 根據v$session 之status及logon_time有選擇kill某些session會話SessionGo會話
- v$logmnr_contents session_info為null 或unknownSessionNull
- V$SESSIONSession
- 【Oracle】-【v$session】v$session的SNIPED狀態OracleSession
- duplicate ORA-01405: fetched column value is NULLNull
- Toad中發現blocking session, 狀態為inactiveBloCSession
- session和v$session說明Session
- v session_wait v session_event v system_eventSessionAI
- v$session_event , v$system_event , v$session_waitSessionAI
- adop -status 檢視pending ADOP sessionSession
- 【SESSION】v$session and v$license 中sessions_current 的區別Session
- v$session_wait和v$session_event檢視SessionAI
- [20220531]inactive session等待事件2.txtSession事件
- [20220531]模擬inactive session等待事件.txtSession事件
- 10.17 V$SESSIONSession
- V$SESSION COMMANDSession
- v$Session詳解Session
- v$session 檢視Session
- create CompassSession session fail, compass init is null!!!SessionAINull
- v$sql.object_status=INVALID_UNAUTHSQLObject
- v$session的blocking_session含義SessionBloC
- 幾個檢視 v$mystat v$systata v$sessionSession
- v$lock之alter table drop column與alter table set unused column區別系列五
- v$action_session_historySession
- V$SESSION_LONGOPSSessionGo
- v$session的解釋Session
- v$session的來源Session
- v$session中的serverSessionServer
- V$SESSION_WAITSessionAI
- 10G V$SESSIONSession
- v$session表的妙用Session
- V$session 表的妙用Session
- 幾個重要檢視(V$SYSTEM_EVENT V$SESSION_EVENT V$SESSION_WAIT)SessionAI
- 異常:java.sql.SQLIntegrityConstraintViolationException: Column 'category' cannot be nullJavaSQLAIExceptionGoNull
- Anti-Join中允許關聯column為空值( null),造成hint失效Null