Applies to:
Oracle Server - Enterprise Edition - Version: 9.2 to 10.1
This problem can occur on any platform.
Symptoms
On database versions 9.2.0.1 to 9.2.0.6 ora_sql_text works and returns the calling text for dml triggers, where as starting from 9.2.0.7 the behavior has changed and returns NULL.
Cause
This issue had surfaced from 9.2.0.7.0 patchset. After discussions in Bug 4171597 which was closed as a duplicate of Bug 4230721 it was concluded that it was the expected behavior i.e ORA_SQL_TXT should return null when dml triggers are used.
ORA_SQL_TXT is a "System defined event attribute" and is supposed to work only with "System triggers". This is also what the Documentation says - "Application Developers Guide : Fundamentals(9.2)
Chapter 16 Working with System events".
Solution
Expected behavior.
On versions 9.2.0.1 to 9.2.0.6 was the erroneous behavior. The correct behavior is what is found starting with version 9.2.0.7 and up.
Oracle Server - Enterprise Edition - Version: 9.2 to 10.1
This problem can occur on any platform.
Symptoms
On database versions 9.2.0.1 to 9.2.0.6 ora_sql_text works and returns the calling text for dml triggers, where as starting from 9.2.0.7 the behavior has changed and returns NULL.
Cause
This issue had surfaced from 9.2.0.7.0 patchset. After discussions in Bug 4171597 which was closed as a duplicate of Bug 4230721 it was concluded that it was the expected behavior i.e ORA_SQL_TXT should return null when dml triggers are used.
ORA_SQL_TXT is a "System defined event attribute" and is supposed to work only with "System triggers". This is also what the Documentation says - "Application Developers Guide : Fundamentals(9.2)
Chapter 16 Working with System events".
Solution
Expected behavior.
On versions 9.2.0.1 to 9.2.0.6 was the erroneous behavior. The correct behavior is what is found starting with version 9.2.0.7 and up.