Decode360's Blog

业精于勤而荒于嬉 QQ:150355677 MSN:decode360@hotmail.com

  BlogJava :: 首页 :: 新随笔 :: 联系 ::  :: 管理 ::
  397 随笔 :: 33 文章 :: 29 评论 :: 0 Trackbacks
AUTOTRACE的手动设置(9i)
 
 
    在9i中设置set autotrace on时会报错,因为默认是不安装autotrace所需要的包和表的,所以这里需要手动设置一下。在这里简单记录一下,以备今后查询:
 
 
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE    10.2.0.3.0      Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
 
 
SQL> set autotrace on exp

SP2-0613: Unable to verify PLAN_TABLE format or existence
SP2-0611: Error enabling EXPLAIN report

 
 
SQL> @'$ORACLE_HOME/rdbms/admin/utlxplan'
 
Table created.
 
SQL> create public synonym plan_table for plan_table;
 
Synonym created.
 
SQL> grant all on plan_table to public ;
 
Grant succeeded.
 
SQL> @'$ORACLE_HOME/sqlplus/admin/plustrce'

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> 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> set echo off
SQL> grant plustrace to public ;
 
Grant succeeded.
 
SQL>
 
 
 
SQL> set autotrace on exp
SQL> set timing on
SQL>
 
posted on 2008-10-10 21:21 decode360 阅读(157) 评论(0)  编辑  收藏 所属分类: 07.Oracle

只有注册用户登录后才能发表评论。


网站导航: