授权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 归档日志过大导致无法存储的解决办法