暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

【oracle报错】SP2-0618 Cannot find the Session Identifier. Check PLUSTRACE role is enabled

原创 2022-10-07
356

目录

1、使用scott用户执行set autotrace traceonly时报错

SQL> set autotrace traceonly
SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report

2、切换到sys用户下,给scott用户授权

sqlplus / as sysdba
grant plustace to scott;
SQL> show user;
USER is “SYS”
SQL> grant plustrace to scott;
grant plustrace to scott
*
ERROR at line 1:
ORA-01919: role ‘PLUSTRACE’ does not exist
说明plustrace这个角色不存在。

3、通过执行sql文本,创建plustrace角色

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.
SQL>
SQL> set echo off
SQL>

4、再次给scott用户授权

SQL>
SQL> grant plustrace to scott;
Grant succeeded.

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论