ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 授予普通用户查看执行计划权限

授予普通用户查看执行计划权限

原创 Linux操作系统 作者:tthero00boo 时间:2013-11-10 00:22:32 0 删除 编辑



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 select on v_$sql_plan to plustrace;

Grant succeeded.

SQL> grant select on v_$sql_plan_statistics_all to plustrace;

Grant succeeded.

SQL> grant select on v_$sql to plustrace;

Grant succeeded.

SQL> grant plustrace to dba with admin option;

Grant succeeded.


SQL> grant plustrace to public; --所有用户

Grant succeeded.

--role,priv dict_view & table, can tell by predicate

/* index */
select * from DBA_ROLES;
select * from sys.system_privilege_map;
select * from sys.table_privilege_map;

/* contain */
select * from ROLE_ROLE_PRIVS where role='DBA';
select * from ROLE_SYS_PRIVS where role='DBA';
select * from ROLE_TAB_PRIVS where role='DBA';

/* owner */
select * from DBA_ROLE_PRIVS where grantee = 'HR';
select * from DBA_SYS_PRIVS where grantee = 'HR';
select * from DBA_TAB_PRIVS where grantee = 'HR';

/* object */
select * from table_privileges where table_name = 'V_$SESSION';

--there is also a SYS.COLUMN_PRIVILEGES ...
/* oracle中权限分为 角色级,系统级,对象级
权限授予的对象可以是 用户,PUBLIC(特殊用户,代表全部),角色
*/

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28859270/viewspace-776222/,如需转载,请注明出处,否则将追究法律责任。

上一篇: df_tbs
请登录后发表评论 登录
全部评论

注册时间:2013-06-30

  • 博文量
    31
  • 访问量
    142176