SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enable
SQL> set autotrace on
SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
第一反应是授予用用户plustrace角色
SQL> conn / as sysdba
Connected.
SQL> grant plustrace to oe;
grant plustrace to oe
*
ERROR at line 1:
plustrace角色在数据库创建时并不会创建
这个角色可通过运行下面的sql来创建
$@?/sqlplus/admin/plustrce.sql
SQL> drop role plustrace;
Role dropped.
SQL> create role plustrace;
Role created.
SQL> grant select on v_$sesstat 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> set echo off
授予用户plustrace角色
SQL> grant plustrace to oe;
Grant succeeded.
至此问题解决
SP2-0611: Error enabling STATISTICS report
SQL> set autotrace on
SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
第一反应是授予用用户plustrace角色
SQL> conn / as sysdba
Connected.
SQL> grant plustrace to oe;
grant plustrace to oe
*
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist
plustrace角色在数据库创建时并不会创建
这个角色可通过运行下面的sql来创建
$@?/sqlplus/admin/plustrce.sql
SQL> drop role plustrace;
Role dropped.
SQL> create role plustrace;
Role created.
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> set echo off
授予用户plustrace角色
SQL> grant plustrace to oe;
Grant succeeded.
启用oe用户autotrace
SQL>conn oe/oe
SQL> set autotrace on至此问题解决