授权普通非DBA用户可以有权限查看执行计划的方法
2015-10-27 15:08
579 查看
drop table PLAN_TABLE;
删除原plan表
执行ORACLE自带的创建脚本
@?/rdbms/admin/utlxplan.sql
创建同义词
create or replace public synonym plan_table for plan_table;
授权
grant all on plan_table to public;
利用ORACLE自带的脚本创建角色
@?/sqlplus/admin/plustrce.sql
drop role plustrace;
删除角色
再新建该角色
create role plustrace;
授权
grant select on v$sesstat to plustrace;
grant select on v$statname to plustrace;
grant select on v$session to plustrace;
grant select,update,insert,delete on plan_table to plustrace;
grant select,update,insert,delete on v_$mystat to plustrace
4000
;
grant plustrace to dba with admin option;
grant plustrace to public;
set echo off
sqlplus 里执行
搞定!
删除原plan表
执行ORACLE自带的创建脚本
@?/rdbms/admin/utlxplan.sql
创建同义词
create or replace public synonym plan_table for plan_table;
授权
grant all on plan_table to public;
利用ORACLE自带的脚本创建角色
@?/sqlplus/admin/plustrce.sql
drop role plustrace;
删除角色
再新建该角色
create role plustrace;
授权
grant select on v$sesstat to plustrace;
grant select on v$statname to plustrace;
grant select on v$session to plustrace;
grant select,update,insert,delete on plan_table to plustrace;
grant select,update,insert,delete on v_$mystat to plustrace
4000
;
grant plustrace to dba with admin option;
grant plustrace to public;
set echo off
sqlplus 里执行
搞定!
相关文章推荐
- Flex+BlazeDs+Java的教程及Demo
- 数据库:替代变量笔记
- AD Site Design and Auto Site Link Bridging, or Bridge All Site Links (BASL)
- yaw roll pitch matrix
- Log的使用技巧——解决字典和和数组的直接打印时问题
- 解析UML九种图
- nagios 监控 linux主机的信息
- linux c 字符串到time_t时间转换
- leetcode 268 : Missing Number
- QT5入门之18 -文件读写
- 用Picasso的RequestHandler进行自定义加载的方法
- 安卓开发中用eclipse提交代码到github遇到的rejected-non-fast-forward问题
- Mongodb3.0配置文件
- SharePoint 2010 IT Professional -- Recycle Bin
- IntelliJ Idea 常用快捷键列表
- SQL 常用
- 推荐系统的总结,主要是讲述矩阵分解在协同滤波系统中的作用
- Android面试题
- 动态视图
- Leetcode -- Insert Interval