v$SESSION是我们常用的动态性能视图之一,其SQL_ID字段常用来检测会话当前执行的SQL语句,但在少数版本中V$SESSION的SQL_ID列可能不正常地显示SQL_ID,一般是在Session Active或执行Pl/SQL的时候SQL_ID为NULL,以下是部分相关的部分BUG列表:
BUG# | Affected Version | Symptom | Fix Version |
Bug 13068790 - the value of v$session.sql_id of active session is null [ID 13068790.8] | 11.2.0.2.4 Patch Set Update 11.2.0.2.3 Patch Set Update 11.2.0.2.1 Patch Set Update 11.2.0.2 11.2.0.1 | active session's sql_id, sql_address may be null or 0 out while a recursive call is executing. | 11.2.0.3 (Server Patch Set) |
Bug 14393463 : IN V$SESSION, SQL_ID IS NOT NULL BUT STATUS IS INACTIVE | 11.2.0.3 | Abstract: IN V$SESSION, SQL_ID IS NOT NULL BUT STATUS IS INACTIVE | No Workaround Now |
Bug 11670241 : NULL V$SESSION.SQL_ID WHEN RUNNING SLOW SQL IN PL/SQL | 11.2.0.1 | In 11.2 (maybe also in 10g), when running a slow sql in pl/sql, we found that v$session.sql_id will be null . |
本文转自maclean_007 51CTO博客,原文链接:http://blog.51cto.com/maclean/1278144