In V$SESSION, column SQL_ID is not NULL while STATUS is INACTIVE (Doc ID 1923905.1)

Last updated on DECEMBER 15, 2016

Applies to:

Oracle Database - Standard Edition - Version 11.1.0.7 and later
Oracle Database - Enterprise Edition - Version 11.1.0.7 and later
Information in this document applies to any platform.
***Checked for relevance on 15-Dec-2016***

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
 
 

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms