Skip to content
Home » Oracle » How to Install PLUSTRACE Role

How to Install PLUSTRACE Role

PLUSTRACE

Before enabling AUTOTRACE feature in your session, you may not need to create PLAN_TABLE table, but you need PLUSTRACE role, which is not native in database and needs to be installed.

To install PLUSTRACE, just execute $ORACLE_HOME/sqlplus/admin/plustrce.sql by SYS.

SQL> show user
USER is "SYS"
SQL> @$ORACLE_HOME/sqlplus/admin/plustrce.sql

The following is the execution log of $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>

Now, PLUSTRACE has been installed.

Leave a Reply

Your email address will not be published. Required fields are marked *