ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 错误SP2-0618和SP2-0611处理

错误SP2-0618和SP2-0611处理

原创 Linux操作系统 作者:hky87 时间:2010-04-14 19:56:39 0 删除 编辑

用帐户scott登录sqlplus后启用autotrace功能报错

SQL> set autotrace on exp stat

SP2-0618: 无法找到会话标识符。启用检查PLUSTRACE角色

SP2-0611: 启用STATISTICS报告时出现错误

 

********************************************

解决方法:

1.以SYS用户登录:

  SQL> connect sys/manager123@orcl as sysdba

2.运行utlxplan.sql(...\10.2.0\db_1\RDBMS\ADMIN下)脚本建立plan_table

3.运行plustrace.sql(...\10.2.0\db_1\sqlplus\admin下)脚本穿件plustrace角色

  drop role plustrace;

create role plustrace;

 

grant select on v_$sesstat to plustrace;

grant select on v_$statname to plustrace;

grant select on v_$mystat to plustrace;

grant plustrace to dba with admin option;

 

将plustrace角色授予public用户(或指定scott用户)

  grant plustrace to public;


 

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

请登录后发表评论 登录
全部评论

注册时间:2009-10-09

  • 博文量
    87
  • 访问量
    345410