授权scott用户可以开启执行
授权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
推荐阅读
-
MySQL创建用户与授权方法、MySQL查看版本号、MySQL执行SQL脚本的方法
-
给用户授权以root身份执行ls,touch,passwd命令,但是禁止修改root用户密码
-
RTSP协议网络摄像头互联网直播边缘计算网关EasyNVR匿名登录用户可以上传授权文件吗?
-
bat 选项之修改ip的脚本代码(让用户可以选择操作并进行判断执行)
-
MySQL授权(让从服务器用户可以登录到主服务器)_MySQL
-
iOS14 隐私适配:【定位授权新增了精确和模糊定位 可根据不同的需求设置不同的定位精确度】1、向用户申请临时开启一次精确位置权限的方案(不同场景可定义不同purposeKey)2、高德定位SDK适配
-
MySQL创建用户与授权方法、MySQL查看版本号、MySQL执行SQL脚本的方法
-
MySQL授权(让从服务器用户可以登录到主服务器)_MySQL
-
可以使页面在用户后退到自身时执行某个function吗?_html/css_WEB-ITnose
-
MySQL用户管理及授权-开启远程访问