SQL Monitor report shows DONE(ERROR) for long running parallel queries after 30 minutes. (Doc ID 1900060.1)
SYMPTOMS
- Running DBMS_SQLTUNE.REPORT_SQL_MONITOR
For example:SELECT DBMS_SQLTUNE.REPORT_SQL_MONITOR(SESSION_ID=>&1,
SESSION_SERIAL=>&2,
INST_ID=>&3,
report_level=>'ALL',
type =>'ACTIVE') as report - Query is running in parallel (PX)
- After 30 minutes V$SQL_MONITOR.STATUS shows DONE(ERROR) even though the query is still running
CHANGES
CAUSE
This was filed under Bug 13523091 INCORRECT STATUS IN V$SQL_MONITOR WITH PARALLEL QUERY and closed as not a bug
The DONE(ERROR) occurs when one of the parallel slaves has been inactive for more than 30 minutes.
When MMON finds out that an entry that has active plan is idle for more than 30 minutes, it marks the entry as possible for reclamation with potential error. It is marked as error because there could have been an error in this plan that MMON was unable to detect,
considering that it is spending such a long time (30 minutes) as "idle".
If there are no other errors during the execution the monitor report will be correct and will contain all the usual information.
The error does not indicate that SQL monitoring failed, nor does it indicate that the monitored SQL failed.
Following are the possible statuses for V$SQL_MONITOR.STATUS:
- QUEUED - SQL statement is queued
- EXECUTING - SQL statement is still executing
- DONE (ERROR) - Execution terminated with an error
- DONE (FIRST N ROWS) - Execution terminated by the application before all rows were fetched
- DONE (ALL ROWS) - Execution terminated and all rows were fetched
- DONE - Execution terminated (parallel execution)
SOLUTION
This is expected behavior for parallel queries where one (or more) of the slaves are inactive for more than 30 minutes.
Oracle Database Online Documentation 12c Release 1 (12.1)
Database Reference
V$SQL_MONITOR
V$SQL_MONITOR