Click to See Complete Forum and Search --> : PLUSTRACE Role
pras
12-12-2002, 01:39 AM
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
grjohnson
12-12-2002, 03:03 AM
GRANT PLUSTRACE TO user;
pras
12-12-2002, 04:53 AM
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
Sameer
12-12-2002, 05:09 AM
Have you execute $ORACLE_HOME/sqlplus/admin/plustrce.sql file ??
This file must be run while logged-in as SYS.
Sameer
pras
12-17-2002, 07:28 AM
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
Sameer
12-17-2002, 07:42 AM
You must have done something wrong..
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>
dbasupport.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.