ORACLE cannot fetch plan for SQL _ID, fetchsql_id

Source: Internet
Author: User

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.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.