DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: PLUSTRACE Role

  1. #1
    Join Date
    Jul 2000
    Location
    india
    Posts
    213

    PLUSTRACE Role

    Hi everybody,

    How do i enable the plustrace role??
    when i write SET AUTOTRACE ON

    I get the foloo error..
    SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
    SP2-0611: Error enabling STATISTICS report

    what should be the problrm..

    thanks
    pras

  2. #2
    Join Date
    Apr 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    1,203
    GRANT PLUSTRACE TO user;
    OCP 8i, 9i DBA
    Brisbane Australia

  3. #3
    Join Date
    Jul 2000
    Location
    india
    Posts
    213
    Hi

    while granting the role plustrace to the user it gives me the error role plustrace does not exist...

    SQL> grant plustrace to scott;
    grant plustrace to scott
    *
    ERROR at line 1:
    ORA-01919: role 'PLUSTRACE' does not exist

    thanks
    pras

  4. #4
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    Have you execute $ORACLE_HOME/sqlplus/admin/plustrce.sql file ??
    This file must be run while logged-in as SYS.

    Sameer

  5. #5
    Join Date
    Jul 2000
    Location
    india
    Posts
    213
    Hi
    After executing the plustrce.sql in sys.

    I am getting the errors as

    SQL> select sysdate from dual;
    Error ORA-936 while gathering statistics
    SP2-0612: Error generating AUTOTRACE report

    SP2-0612: Error generating AUTOTRACE report

    Execution Plan
    ----------------------------------------------------------
    0 SELECT STATEMENT Optimizer=CHOOSE
    1 0 TABLE ACCESS (FULL) OF 'DUAL'



    SP2-0612: Error generating AUTOTRACE STATISTICS report

    thanks ion advance
    pras

  6. #6
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    You must have done something wrong..
    Code:
    SQL> show user
    USER ist "SYS"
    SQL> 
    SQL> GRANT PLUSTRACE TO scott;
    GRANT PLUSTRACE TO scott
          *
    ERROR at line 1:
    ORA-01919: role 'PLUSTRACE' does not exist
    
    SQL> @D:\oracle\ora81\sqlplus\admin\plustrce.sql;
    SQL> 
    SQL> drop role plustrace;
    drop role plustrace
              *
    ERROR at line 1:
    ORA-01919: role 'PLUSTRACE' does not exist
    
    
    SQL> create role plustrace;
    
    Role created.
    
    SQL> 
    SQL> grant select on v_$sesstat to plustrace;
    
    Grant succeeded.
    
    SQL> grant select on v_$statname to plustrace;
    
    Grant succeeded.
    
    SQL> grant select on v_$session to plustrace;
    
    Grant succeeded.
    
    SQL> grant plustrace to dba with admin option;
    
    Grant succeeded.
    
    SQL> 
    SQL> set echo off
    SQL> GRANT PLUSTRACE TO scott;
    
    Grant succeeded.
    
    SQL> connect scott/tiger
    Connect durchgeführt.
    SQL> select sysdate from dual;
    
    SYSDATE
    --------
    17.12.02
    
    SQL> SET AUTOTRACE ON explain stat
    SQL> select sysdate from dual;
    
    SYSDATE
    --------
    17.12.02
    
    
    Ausführungsplan
    ----------------------------------------------------------
       0      SELECT STATEMENT Optimizer=CHOOSE
       1    0   TABLE ACCESS (FULL) OF 'DUAL'
    
    
    Statistiken
    ----------------------------------------------------------
              6  recursive calls
             16  db block gets
              8  consistent gets
              0  physical reads
            592  redo size
            378  bytes sent via SQL*Net to client
            425  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width