授权scott用户可以开启执行计划,脚本如下:[Oracle@rac1 admin]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Product
授权scott用户可以开启执行计划,,脚本如下:
[oracle@rac1 admin]$ sqlplus / as sysdba
sql*plus: release 10.2.0.5.0 - production on sat oct 12 02:02:28 2013
copyright (c) 1982, 2010, oracle. all rights reserved.
connected to:
oracle database 10g enterprise edition release 10.2.0.5.0 - 64bit production
with the partitioning, real application clusters, olap, data mining
and real application testing options
sql> @$oracle_home/rdbms/admin/utlxplan.sql
table created.
sql> @$oracle_home/sqlplus/admin/plustrce.sql
sql>
sql> drop role plustrace;
role dropped.
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_$mystat 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.
利用scott开启执行计划
SQL> conn scott
Enter password:
Connected.
SQL> set autotrace on;
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
DEPT TABLE
EMP TABLE
BONUS TABLE
SALGRADE TABLE
T TABLE
E1 TABLE
6 rows selected.
Execution Plan
----------------------------------------------------------
ERROR:
ORA-01039: insufficient privileges on underlying objects of the view
SP2-0612: Error generating AUTOTRACE EXPLAIN report
Statistics
----------------------------------------------------------
287 recursive calls
0 db block gets
709 consistent gets
1 physical reads
0 redo size
755 bytes sent via SQL*Net to client
492 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
12 sorts (memory)
0 sorts (disk)
6 rows processed
推荐阅读:
ORA-01172、ORA-01151错误处理
ORA-00600 [2662]错误解决
ORA-01078 和 LRM-00109 报错解决方法
ORA-00471 处理方法笔记
ORA-00314,redolog 损坏,或丢失处理方法
ORA-00257 归档日志过大导致无法存储的解决办法











