[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博客 ” ,链接:https://blog.itpub.net/28572479/viewspace-2139705/
,如需转载,请注明出处,否则将追究法律责任。