AUTOTRACE的手动设置(9i)

AUTOTRACE的手动设置(9i)
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>
 

你可能感兴趣的:(AUTOTRACE的手动设置(9i))