今天使用select * from table(dbms_xplan.display_cursor(null,null,'allstats last'));总是报
NOTE: cannot fetch plan for SQL_ID: 9babjv8yq8ru3, CHILD_NUMBER: 1
Please verify value of SQL_ID and CHILD_NUMBER;
It could also be that the plan is no longer in cursor cache (check v$sql_plan)这个错误
最终的网上找到解决办法
The error is due to the SQL*Plus environment variable SERVEROUTPUT is turned on. One of the Prerequisites for running the package is to turn off SERVEROUTPUT.
set serveroutput off
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22531894/viewspace-1028361/ ,如需转载,请注明出处,否则将追究法律责任。