-
SQL> show user
-
USER is "SCOTT"
-
SQL> set autot on
-
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> !ls $ORACLE_HOME/sqlplus/admin
-
-
SQL> @$ORACLE_HOME/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> grant plustrace to scott;
-
-
Grant succeeded.
-
-
SQL> set autot on
-
SQL> spool off
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26066458/viewspace-2123342/
,如需转载,请注明出处,否则将追究法律责任。