码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-05-31 18:37:00      阅读:113      评论:0      收藏:0      [点我收藏+]

标签:oracle sp2-0618:   sp2-0611   ora-01919

通过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

标签:oracle sp2-0618:   sp2-0611   ora-01919

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!