Oracle Set Autotrace prompt: Cannot find the Session Identifier. Check plustrace role is enabled

Source: Internet
Author: User
Tags sorts

Sql> SetAutotraceusage:SETAutot[RACE]{OFF |  on |TRACE[ only]}[Exp[lain]][Stat[istics]]sql> SetAutotrace onSP2-0618: Cannot find the Session Identifier.CheckPlustrace role isenabledSP2-0611: Error EnablingSTATISTICSReportsql>Conn/ asSysdbaconnected.sql> Droprole Plustrace;Droprole Plustrace*ERROR at line1: ORA-01919: Role'Plustrace'Does notExistsql> Createrole Plustrace; Role created. SQL> Grant Select  onV_$sesstat toPlustrace;Grantsucceeded. SQL> Grant Select  onV_$statname toPlustrace;Grantsucceeded. SQL> Grant Select  onV_$mystat toPlustrace;Grantsucceeded. SQL> GrantPlustrace toDba withAdminoption;Grantsucceeded. SQL> GrantPlustrace toScott;Grantsucceeded. SQL>Conn Scott/Tigerconnected.sql> SetAutotrace onSQL> Select Count(*) fromEMP; COUNT(*)----------     -ExecutionPlan----------------------------------------------------------PlanHash value:2937609675-------------------------------------------------------------------|Id|Operation|Name|Rows|Cost (%CPU)|Time|-------------------------------------------------------------------|   0 | SELECTSTATEMENT|      |    1 |    1(0)| xx:xx: on ||   1 |SORT AGGREGATE|      |    1 |           |      ||   2 |   INDEX  FullSCAN|Pk_emp|     - |    1(0)| xx:xx: on |-------------------------------------------------------------------Statistics----------------------------------------------------------      1Recursive calls0db block gets1consistent gets1Physical reads0Redo Size526Bytes sent via SQL*Net toClient520Bytes received via SQL*Net fromClient2Sql*Net roundtrips to/ fromClient0sorts (memory)0Sorts (Disk)      1rows Processedsql> 

Oracle Set Autotrace prompt: Cannot find the Session Identifier. Check plustrace role is enabled

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.