Lin Hong's TECH Blog! 刀不磨要生锈,人不学习要落后 - Thinking ahead

Oralce 12c SP2-0618 and ORA-01919

2018-03-03

Oralce 12c SP2-0618 and ORA-01919

I met the error SP2-0618 and ORA-01919 while I executed the command “set autot on” to check the execute plan of sql.

HR@PDBPROD1> set autot on
SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
HR@PDBPROD1> 

I used sys to grant the PLUSTRACE role to user(HR). There was ORA-01919 error.

SYS@PDBPROD1> grant PLUSTRACE to hr;
grant PLUSTRACE to hr
	  *
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist

SYS@PDBPROD1>

Regarding to this error solution, we can referent to the following document.

SQLPlus® User’s Guide and Reference/8 Tuning SQLPlus

Controlling the Autotrace Report

Controlling the Autotrace Report

Example 8-2 Creating the PLUSTRACE Role

Run the following commands from your SQL*Plus session to create the PLUSTRACE role and grant it to the DBA:
CONNECT / AS SYSDBA 
@$ORACLE_HOME/sqlplus/admin/plustrce.sql 

After HR user have PLUSTRACE role, need to re-create session to execute the “set autot on”.

++++++++++++++++ EOF LinHong ++++++++++++++++


Similar Posts

Comments