标签: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