SET AUTOTRACE


PDA

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>

<script></script> <script></script> <script src="http://mjxads.internet.com/RealMedia/ads/adstream_mjx.ads/intm/it/www.databasejournal.com/dbasupport/forum/1237193010@send,stickypost,house_ribbon,flex,336x280-2?"></script> <script></script> <script></script> <script></script> <script src="http://mjxads.internet.com/RealMedia/ads/adstream_mjx.ads/intm/it/www.databasejournal.com/dbasupport/forum/1534780184@send,stickypost,house_ribbon,flex,336x280-2?"></script> <script></script> <script></script>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值