ITPub博客

首页 > 数据库 > Oracle > 启动执行计划报SP2-0618\SP2-0611错误的解决方法

启动执行计划报SP2-0618\SP2-0611错误的解决方法

原创 Oracle 作者:BJTTXXL 时间:2018-01-25 14:34:09 0 删除 编辑
问题:
SQL> set autotrace on traceonly explain;
SP2-0618: 无法找到会话标识符。启用检查 PLUSTRACE 角色
SP2-0611: 启用 STATISTICS 报告时出错

解决方法:
1、执行以下脚本
SQL> @/u01/app/oracle/product/11.2.0.4/db_1/sqlplus/admin/plustrce.sql
2、删除已经存在的plustrace角色
SQL> drop role plustrace;
3、重新创建plustrace角色
SQL> create role plustrace;
4、对角色授权
SQL> grant select on v_$sesstat to plustrace;
SQL> grant select on v_$statname to plustrace;
SQL> grant select on v_$mystat to plustrace;
SQL> grant plustrace to dba with admin option;
 grant plustrace to public; 
5、再次打开成功
SQL> set autotrace on;
SQL> 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30100210/viewspace-2150521/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 索引概述
请登录后发表评论 登录
全部评论

注册时间:2015-01-10

  • 博文量
    4
  • 访问量
    5459