首页 > 其他 > 详细

SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled

时间:2015-05-31 18:35:24      阅读:211      评论:0      收藏:0      [点我收藏+]

通过oracle普通用户想打开set auotrace功能发现报如下错误

SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled

SP2-0611: Error enabling STATISTICS report


SQL> conn scott/tiger

Connected.

SQL> set autotrace on;

SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled

SP2-0611: Error enabling STATISTICS report

连接在sys用户下发现没有这个角色

SQL> conn / as sysdba

Connected.

SQL> grant pustrace to scott;

ERROR at line 1:

ORA-01919: role ‘PUSTRACE‘ does not exist


通过执行下以脚本创建此角色

SQL> @?/sqlplus/admin/plustrce.sql

SQL> 

SQL> drop role plustrace;

drop role plustrace

          *

ERROR at line 1:

ORA-01919: role ‘PLUSTRACE‘ does not exist



SQL> create role plustrace;


Role created.


SQL> 

SQL> grant select on v_$sesstat to plustrace;


Grant succeeded.


SQL> grant select on v_$statname to plustrace;


Grant succeeded.


SQL> grant select on v_$mystat to plustrace;


Grant succeeded.


SQL> grant plustrace to dba with admin option;


Grant succeeded.


现在就可以在将plustrace角色赋予给其他用户了



SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled

原文:http://718693.blog.51cto.com/708693/1656885

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!