ITPub博客

首页 > 数据库 > Oracle > dbms_xplan.display_cursor 报错 NOTE: cannot fetch plan for SQL_ID

dbms_xplan.display_cursor 报错 NOTE: cannot fetch plan for SQL_ID

原创 Oracle 作者:pxbibm 时间:2015-04-01 08:26:01 0 删除 编辑

在使用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;
4 
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)
8 
这个错误
最终的网上找到解决办法
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博客 ” ,链接:https://blog.itpub.net/12798004/viewspace-1480971/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
【DBAplus社群】联合发起人。ACOUG核心成员,Oracle用户组年轻专家。熟悉Oracle的体系结构,擅长Oracle数据库架构规划、SQL优化、OWI方面性能的优化。曾服务于航天、航空、机车、大型制造行业数据库的维护以及系统开发工作,开发过基于Oracle数据库的大型ERP系统。
  • 博文量
    341
  • 访问量
    2469930