ORACLE EXPLAIN PLAN 设置

来源:互联网 发布:淘宝c店排名 编辑:程序博客网 时间:2024/04/29 11:49

安装ORACLE EXPLAIN PLAN:

cd $ORACLE_HOME/rdbms/admin 

log into sqlplus as system (sqlplus /nolog->connect /as sysdba)

run SQL> @utlxplan 

run SQL> create public synonym plan_table for plan_table 

run SQL> grant all on plan_table to public 

exit sqlplus


cd $ORACLE_HOME/sqlplus/admin 

log into sqlplus as SYS (sqlplus /nolog->connect /as sysdba)

run SQL> @plustrce 

run SQL> grant plustrace to public 


这里还有一篇文章不错,可以参考一下: http://blog.csdn.net/tianlesoftware/article/details/5827245


在第一次使用的时候碰到一个错误:

ERROR: an uncaught error in function display has happened; please contact Oracle support
 Please provide also a DMP file of the used plan table PLAN_TABLE
 ORA-00904: "OTHER_TAG": invalid identifier

通过网上的搜索,建议新版本的Oracle使用$ORACLE_HOME/rdbms/admin/utlxplan.sql 来创建表 PLAN_TABLE,但是我确实已经用这个SQL来创建的.

继续检查了一下发现APPS(EBS数据库用户)登录时使用会出错,而sysdba却不会,所以想到有可能APPS用户下已经有一张这样的表,于是删除,然后以sysdba登录grant to public,问题解决.

原创粉丝点击