Resolve role Plustrace does not exist in Oracle

Source: Internet
Author: User

The following error message appears when viewing the program with Autotrace in Sqlplus:

SYS@CDB$ROOT> conn Scott/Tiger@pdborcl

Connected. The session has changed.

SCOTT @PDBORCL > set autotrace on;

SP2 - 0618 : The session identifier could not be found. Enable Check plustrace role

SP2 - 0611: Error enabling STATISTICS report

This is because the role plustrace does not exist, or is not created. Create the Plustrace role whenever you execute the $oracle_home/sqlplus/admin/plustrce.sql script:

SCOTT @PDBORCL > conn sys/orcl@pdborcl as sysdba

Connected.

The session has changed.

SYS @PDBORCL > @c: \app\oracle\product\12.1. 0 \dbhome_1\sqlplus\admin\plustrce.sql

SYS @PDBORCL > Grant plustrace to Scott;

This allows Scott users to track SQL execution plans with Autotrace.

SYS@CDB$ROOT>Conn Scott/Tiger@pdborclConnected.The session has changed. SCOTT@PDBORCL> SetAutotrace on; SP2-0618: The session identifier could not be found. Enable check plustrace role SP2-0611: EnableSTATISTICSError Reporting, Scott .@PDBORCL>Conn SYS/Orcl@pdborcl  asSysdbaconnected. The session has changed. SYS@PDBORCL> @c: \app\oracle\product\12.1.0\dbhome_1\sqlplus\admin\plustrce.sqlsys@PDBORCL>SYS@PDBORCL> Droprole Plustrace; SYS@PDBORCL> Createrole plustrace; roles created. SYS@PDBORCL>SYS@PDBORCL> Grant Select  onV_$sesstat toPlustrace; authorized success. SYS@PDBORCL> Grant Select  onV_$statname toPlustrace; authorized success. SYS@PDBORCL> Grant Select  onV_$mystat toPlustrace; authorized success. SYS@PDBORCL> GrantPlustrace toDba withAdminoption, Authorization is successful. SYS@PDBORCL>SYS@PDBORCL> SetEchooffSYS@PDBORCL> GrantPlustrace toScott; authorized success. SYS@PDBORCL>

Reference:

Resolve role Plustrace does not exist in Oracle

Resolve role Plustrace does not exist in Oracle

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.