Error Cannot Fetch Plan For Statement_id
Contents |
resolution for the EXPLAIN PLAN command in comparison to everything else I'm aware of. Wth the usual disclaimer
Error Cannot Fetch Plan For Statement_id Autotrace
of: I might have missed something…聽EXPLAIN PLAN is not affected error cannot fetch last explain plan by the "ALTER SESSION SET CURRENT_SCHEMA" command. This little investigation all started with a report of "explain error cannot fetch last explain plan from plan table plan" not working in PL/SQL Developer. On digging into it we discovered 3 PLAN_TABLE tables in the database plus a couple of synonyms. The names have
Error Cannot Fetch Last Explain Plan From Plan_table
been changed to protect the innocent, so to speak. Anyway it looked something like this: SQL> select owner, object_name, object_type from dba_objects where object_name = 'PLAN_TABLE'; OWNER OBJECT_NAME OBJECT_TYPE ------------------------------ ----------- ------------------- PUBLIC PLAN_TABLE SYNONYM APP_SCHEMA PLAN_TABLE TABLE USER01 PLAN_TABLE SYNONYM SYSTEM PLAN_TABLE TABLE SYS PLAN_TABLE TABLE With the PUBLIC synonym pointing to SYSTEM.PLAN_TABLE
Error Cannot Fetch Last Explain Plan From Plan_table Dbms_xplan
and the synonym owned by USER01 pointing to APP_SCHEMA.PLAN_TABLE. Just to spice things up, a logon trigger used ALTER SESSION SET CURRENT_SCHEMA to APP_SCHEMA for pretty much all database users. After a quick test I confirmed that things were definitely not working as expected via SQL*Plus as shown below: Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining op JServer Release 9.2.0.8.0 - Production MARTINNASH@orcl> explain plan for 2 select * from dual; Explained. MARTINNASH@orcl> select * from table(dbms_xplan.display); PLAN_TABLE_OUTPUT ------------------------------------------------------------------------------------------------------------------------ -------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop | -------------------------------------------------------------------------------------------------------- |-------------------------------------- NOT THE QUERY I JUST RAN --------------------------------------| -------------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- <------------ TEXT REMOVED ------------> Note: cpu costing is off Remember the logon trigger changes my current schema to APP_SCHEMA. MARTINNASH@bi20p> alter session set current_schema = martinnash; Session altered. MARTINNASH@bi20p> select * from table(dbms_xplan.display); PLAN_TABLE_OUTPUT -----
比特币 小额贷款 贷款 crm ORACLE 项目管理系统 thread https://oraganism.wordpress.com/2010/01/08/explain-plan-for-anomaly/ android python java 文章帖子用户 抱歉,指定的主题不存在或已被删除或正在被审核 TOP技术积分榜 社区积分榜 徽章 电子杂志 团队 统计 虎吧 老博客 知识索引树 读书频道 积分竞拍 http://www.itpub.net/forum.php?mod=viewthread&action=printable&tid=1465774 文本模式 帮助 ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档 | IT博客 ChinaUnix | ChinaUnix博客 | ChinaUnix论坛 | SAP ERP系统 CopyRight 1999-2011 itpub.net All Right Reserved. 北京皓辰网域网络信息技术有限公司版权所有 联系我们 网站律师 隐私政策 知识产权声明 京ICP证:060528号 北京市公安局海淀分局网监中心备案编号:1101082001 广播电视节目制作经营许可证:编号(京)字第1149号 返回顶部
back to return to the previous page. Enter your Username and Password error cannot fetch to log in. If you have not yet registered, you can register here. Username: Password: Have you forgotten your login information? Mark all read Contact Us · · Top Generated in 0.008 seconds in which 0.002 seconds were spent on a total of 3 queries. Zlib compression disabled.Powered by UBB.threads™ PHP Forum Software 7.4.1p2