合 【MOS】How to Identify Hard Parse Failures Such as Error=923 (Doc ID 1353015.1)
GOAL
Hard parse time may be impacted when there are a high number of parse errors.
This may be noted in the ADDM report as follows:
FINDING 2: 62% impact (2561 seconds)
------------------------------------
Hard parsing SQL statements that encountered parse errors was consuming
significant database time.
RECOMMENDATION 1: Application Analysis, 62% benefit (2561 seconds)
ACTION: Investigate application logic to eliminate parse errors.
In the AWR report Parse Failures are recorded in two places:
1. Time Model Statistics
2. Instance Activity Stats
SOLUTION
Failed parses are not stored in the data dictionary and therefore cannot be identified through querying the data dictionary.
As of Oracle10g, event 10035 can be set to report SQLs that fail during PARSE operations.
Syntax:
1 2 3 4 5 6 7 8 9 10 11 12 | ALTER SYSTEM SET EVENTS '10035 trace name context forever, level 1'; ALTER SESSION SET EVENTS '10035 trace name context forever, level 1'; EVENT="10035 trace name context forever, level 1" Levels: level 1+ Print out failed parses of SQL statements to Note: The event can be turned off as follows: ALTER SYSTEM SET EVENTS '10035 trace name context off'; ALTER SESSION SET EVENTS '10035 trace name context off'; |
Another way to get the SQL_ID producing lot of hard parses, use the ASH tables and the column IN_HARD_PARSE: