SP2-0618:Cannot find the Session Identifier.SP2-0611

raysuen發表於2017-05-22
[oracle@rman1 ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Mon May 22 14:31:03 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL> conn scott/tiger
Connected.
SQL> set autot trace
SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL> conn / as sysdba
Connected.
SQL> grant plustrace to scott;
grant plustrace to scott
      *
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist


SQL> @$ORACLE_HOME/sqlplus/admin/plustrce.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> 

SQL> grant plustrace to scott;

Grant succeeded.

SQL> conn scott/tiger
Connected.
SQL> set autot trace

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28572479/viewspace-2139705/,如需轉載,請註明出處,否則將追究法律責任。

相關文章