Enable: Set autotrace traceonly error: SP2-0618: unable to find session identifier. Enable exam plustrace role SP2-0611: An error occurred while enabling statistics reports

Source: Internet
Author: User

Error Description: I log in with Scott to see if the statement uses the index, enable: Set autotrace traceonly error: SP2-0618: unable to find the session identifier. Enable exam plustrace role SP2-0611: An error occurred while enabling statistics reports

Solution:

SQL> conn sys/root as sysdba
Connected.
SQL> @ D: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1 \ sqlplus \ admin \ plustrce. SQL
SQL>
SQL> drop role plustrace;
Drop role plustrace
*
Row 3 has an error:
ORA-01919: Role 'plustrace 'does not exist
Used time: 00: 00: 00.39
SQL> Create role plustrace;
The role has been created.
Used time: 00: 00: 01.15
SQL> grant select on V _ $ sesstat to plustrace;
Authorization successful.
Used time: 00: 00: 00.30
SQL> grant select on V _ $ statname to plustrace;
Authorization successful.
Used time: 00: 00: 00.03
SQL> grant select on V _ $ mystat to plustrace;
Authorization successful.
Used time: 00: 00: 00.00
SQL> grant plustrace to DBA with admin option;
Authorization successful.
Used time: 00: 00: 00.39
SQL> set echo off
SQL> drop role plustrace;
The role has been deleted.
Used time: 00: 00: 11.24
SQL> Create role plustrace;
The role has been created.
Used time: 00: 00: 00.00
SQL> grant select on V _ $ sesstat to plustrace;
Authorization successful.
Used time: 00: 00: 00.00
SQL> grant select on V _ $ statname to plustrace;
Authorization successful.
Used time: 00: 00: 00.04
SQL> grant select on V _ $ mystat to plustrace;
Authorization successful.
Used time: 00: 00: 00.01
SQL> grant plustrace to DBA with admin option;
Authorization successful.
Used time: 00: 00: 00.01
SQL> set echo off;
SQL> grant plustrace to public;
Authorization successful.
Used time: 00: 00: 00.00
SQL> conn Scott/root;
Connected.
SQL> set autotrace on;

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.