ORACLE cannot fetch plan for SQL _ID, fetchsql_id
When I tested the SQL Execution Plan today, I found that sqlplus could not print the execution plan normally. According to the online information, I sorted it as follows:
.....
SYS @ orcl> select *
2 from table (
3 dbms_xplan.display_cursor (format => 'allstats la ')
4)
5/
PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------
SQL _ID 9babjv8yq8ru3, child number 0
BEGINDBMS_OUTPUT.GET_LINES(: LINES,: NUMLINES); END;
NOTE:Cannot fetch plan for SQL _ID: 9babjv8yq8ru3, CHILD_NUMBER: 0
Please verify value of SQL _ID and CHILD_NUMBER;
It coshould also be that the plan is no longer in cursor cache (check v $ SQL
_ Plan)
Note: The SQL _ID marked with red does not exist because SQLPLUS is enabled.SERVEROUTPUTTOM:
Do you see the SQL it is showing-dbms_output.get_lines ....
The last SQL your session executed was in fact that call-sqlplus does that when you have set serveroutput on
Issue solution:
Set serveroutput off
And try it... query again |
|
|
|
-------------------------------
Dylan Presents.