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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/28859270/viewspace-776222/