Oracle10g 預(yù)定義主要角色 |
發(fā)布時(shí)間: 2012/9/21 17:01:22 |
SQL> select * from v$version; BANNER CORE 10.2.0.1.0 Production SQL> set pages 50 ROLE PASSWORD 20 rows selected. SQL> 1. CONNECT 1-3是為了同Oracle老版本中的概念相兼容而提供的,不能只依賴于這些ROLE 1.CONNECT 角色, 是授予最終用戶的典型權(quán)利,最基本的 SQL> select * from dba_sys_privs where grantee = 'CONNECT'; --系統(tǒng)權(quán)限 GRANTEE PRIVILEGE ADM SQL> select * from dba_tab_privs where grantee = 'CONNECT'; --對(duì)象權(quán)限 no rows selected SQL> select * from dba_role_privs where grantee = 'CONNECT'; --角色權(quán)限 no rows selected SQL> 2.RESOURCE 角色, 是授予開發(fā)人員的 SQL> select * from dba_sys_privs where grantee = 'RESOURCE'; GRANTEE PRIVILEGE ADM 8 rows selected. SQL> select * from dba_tab_privs where grantee = 'RESOURCE'; no rows selected SQL> select * from dba_role_privs where grantee = 'RESOURCE'; no rows selected SQL> 3.DBA 角色, 擁有系統(tǒng)所有系統(tǒng)級(jí)權(quán)限 SQL> select count(*) from dba_sys_privs where grantee = 'DBA'; COUNT(*) SQL> select count(*) from dba_tab_privs where grantee = 'DBA'; COUNT(*) SQL> select * from dba_role_privs where grantee = 'DBA'; GRANTEE GRANTED_ROLE ADM DEF 8 rows selected. SQL> 4.IMP_FULL_DATABASE 角色 SQL> select count(*) from dba_sys_privs where grantee = 'IMP_FULL_DATABASE'; COUNT(*) SQL> select count(*) from dba_tab_privs where grantee = 'IMP_FULL_DATABASE'; COUNT(*) SQL> select * from dba_role_privs where grantee = 'IMP_FULL_DATABASE'; GRANTEE GRANTED_ROLE ADM DEF SQL> 5.EXP_FULL_DATABASE 角色 SQL> select * from dba_sys_privs where grantee = 'EXP_FULL_DATABASE'; GRANTEE PRIVILEGE ADM 8 rows selected. SQL> select count(*) from dba_tab_privs where grantee = 'EXP_FULL_DATABASE'; COUNT(*) SQL> select * from dba_role_privs where grantee = 'EXP_FULL_DATABASE'; GRANTEE GRANTED_ROLE ADM DEF SQL> 6.DELETE_CATALOG_ROLE 角色 這個(gè)角色是Oracle8新增加的,如果授予用戶這個(gè)角色,用戶就可以從表sys.aud$和FGA_LOG$中刪除記錄,sys.aud$和FGA_LOG$表中記錄著審計(jì)后的記錄,使用這個(gè)角色可以簡(jiǎn)化審計(jì)蹤跡管理。 SQL> select * from dba_sys_privs where grantee = 'DELETE_CATALOG_ROLE'; no rows selected SQL> select owner, table_name, privilege, grantable from dba_tab_privs where grantee = 'DELETE_CATALOG_ROLE'; OWNER TABLE_NAME PRIVILEGE GRA SQL> select * from dba_role_privs where grantee = 'DELETE_CATALOG_ROLE'; no rows selected SQL> 7.SELECT_CATALOG_ROLE 角色, 具有從數(shù)據(jù)字典查詢的權(quán)利 SQL> select * from dba_sys_privs where grantee = 'SELECT_CATALOG_ROLE'; no rows selected SQL> select count(*) from dba_tab_privs where grantee = 'SELECT_CATALOG_ROLE'; COUNT(*) SQL> select * from dba_role_privs where grantee = 'SELECT_CATALOG_ROLE'; GRANTEE GRANTED_ROLE ADM DEF --進(jìn)一步看看HS_ADMIN_ROLE角色 SQL> select * from dba_sys_privs where grantee = 'HS_ADMIN_ROLE'; no rows selected SQL> select owner, table_name, privilege, grantable from dba_tab_privs where grantee = 'HS_ADMIN_ROLE'; OWNER TABLE_NAME PRIVILEGE GRA 15 rows selected. SQL> select * from dba_role_privs where grantee = 'HS_ADMIN_ROLE'; no rows selected SQL> 8.EXECUTE_CATALOG_ROLE 角色, 具有從數(shù)據(jù)字典中執(zhí)行部分過(guò)程和函數(shù)的權(quán)利 SQL> select * from dba_sys_privs where grantee = 'EXECUTE_CATALOG_ROLE'; no rows selected SQL> select count(*) from dba_tab_privs where grantee = 'EXECUTE_CATALOG_ROLE'; COUNT(*) SQL> select * from dba_role_privs where grantee = 'EXECUTE_CATALOG_ROLE'; GRANTEE GRANTED_ROLE ADM DEF SQL> --End--
本文出自:億恩科技【1tcdy.com】 服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM] |