dbms_xplan.display_cursor 報錯 NOTE: cannot fetch plan for SQL_ID

pxbibm發表於2015-04-01

在使用select * from table(dbms_xplan.display_cursor(null,null,'advanced'));總是報
1 SQL_ID  9m7787camwh4m, child number 0
2                                     
3 begin :id := sys.dbms_transaction.local_transaction_id; end;

5 NOTE: cannot fetch plan for SQL_ID: 9m7787camwh4m, CHILD_NUMBER: 0
6       Please verify value of SQL_ID and CHILD_NUMBER;
7       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.

在sqlplus中把關閉
SQL>set serveroutput off

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12798004/viewspace-1480971/,如需轉載,請註明出處,否則將追究法律責任。

相關文章