Home » SQL & PL/SQL » SQL & PL/SQL » SP2-0611: Error enabling STATISTICS report
SP2-0611: Error enabling STATISTICS report [message #216533] Mon, 29 January 2007 04:50 Go to next message
pavuluri
Messages: 247
Registered: January 2007
Senior Member
SQL> SET AUTOTRACE ON
SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report

how to slove this?
Re: SP2-0611: Error enabling STATISTICS report [message #216538 is a reply to message #216533] Mon, 29 January 2007 05:32 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
To use this (AUTOTRACE) feature
  • user must have access to the PLAN_TABLE
  • PLUSTRACE role must be grated to the user
Here is a short step-by-step manual to it; I hope I won't miss a step and that you'll be able to use it:
- cd $oracle_home/rdbms/admin
- log into sqlplus as system
- run SQL> @utlxplan
- run SQL> create public synonym plan_table for plan_table
- run SQL> grant all on plan_table to public

- exit sqlplus and cd $oracle_home/sqlplus/admin
- log into sqlplus as SYS
- run SQL> @plustrce
- run SQL> grant plustrace to public

There's an option of creating the PLAN_TABLE table for every user that needs to use it (log in as that user and run the same 'utlxplan.sql').

If granting the 'plustrace' role to public doesn't work, you could also do the following:
ALTER USER user_name DEFAULT ROLE plustrace;

For more information about the PLUSTRACE role and PLAN_TABLE table, see SET AUTOTRACE command of the SQL*Plus Guide.
Previous Topic: Help in outer join / not exists (merged)
Next Topic: Finding Maximum in Group Summing
Goto Forum:
  


Current Time: Thu Dec 08 18:26:38 CST 2016

Total time taken to generate the page: 0.19269 seconds