Reason for Apparently Incorrect or Null Sql_id in v$sql
Last updated on DECEMBER 15, 2016
Applies to:Oracle Database - Enterprise Edition - Version 10.2.0.1 to 188.8.131.52 [Release 10.2 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 15-Dec-2016***
The v$sql view and similar v$sql* views (eg: v$sqlarea) display values that are apparently wrong:
1. there is no sql information in v$sql and the other views (v$sqlarea), ie sql_id, sql_address, sql_hash_value are null.
2. the information in the view, ie sql_text does not follow the sql trace file, being the same, even when the trace file shows that the currently running query has changed.
This situation is particular to the 10g release and higher. For systems migrated from lower releases it may be even more obvious, especially when user defined tools rely on these columns.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms