oracle許可權的分配與回收

來源:互聯網
上載者:User

標籤:oracle   admin   option   

許可權的分配:

1、grant用於將角色、系統許可權、對象許可權賦予使用者、角色。

2、賦權的前提條件:

系統許可權:有"grant any privilege"的系統許可權、被授予該系統許可權時使用了 "admin option"

角色許可權:1)授予角色角色許可權時帶有"admin option";2)被授予了"grant any role"的系統許可權;3)是角色的建立者。

對象許可權:1)是對象的擁有者;2)被授予對象許可權時帶有"grant option";3)被授予了"grant any object privilege"許可權;

3、文法:

grant [grant_system_privileges|grant_object_privileges];

grant_system_privileges:

{ system_privilege| role| ALL PRIVILEGES}

[, { system_privilege| role| ALL PRIVILEGES}]...

TO grantee_clause [ WITH ADMIN OPTION ];


grantee_clause:

{ user [ IDENTIFIED BY password ]| role| PUBLIC}

  [, { user [ IDENTIFIED BY password ]| role| PUBLIC}]...

  

grant_object_privileges:

{ object_privilege | ALL [ PRIVILEGES ] }

[ (column [, column ]...) ]

[, { object_privilege | ALL [ PRIVILEGES ] }[ (column [, column ]...) ]]...

on_object_clause TO grantee_clause  [ WITH HIERARCHY OPTION ][ WITH GRANT OPTION ]


on_object_clause:

ON { [ schema. ] object 

   | DIRECTORY directory_name

   | EDITION edition_name

   | MINING MODEL [schema.] mining_model_name

   | JAVA { SOURCE | RESOURCE } [ schema. ] object

   }


要記住"grant 許可權 to 使用者".

---------------------------------------------------------------------------------------


許可權的回收:

1、文法

REVOKE { revoke_system_privileges| revoke_object_privileges} ;


revoke_system_privileges:

{ system_privilege| role| ALL PRIVILEGES}

  [, { system_privilege

     | role

     | ALL PRIVILEGES

     }

  ]...

FROM grantee_clause


revoke_object_privileges:

{ object_privilege | ALL [ PRIVILEGES ] }

  [, { object_privilege | ALL [ PRIVILEGES ] } ]...

on_object_clause

FROM grantee_clause

[ CASCADE CONSTRAINTS | FORCE ]


grantee_clause:

{ user [ IDENTIFIED BY password ]

| role

| PUBLIC

}

  [, { user [ IDENTIFIED BY password ]

     | role

     | PUBLIC

     } 

  ]...

  

on_object_clause:

ON { [ schema. ] object 

   | DIRECTORY directory_name

   | EDITION edition_name

   | MINING MODEL [schema.] mining_model_name

   | JAVA { SOURCE | RESOURCE } [ schema. ] object

   }


記住"revoke 許可權 from 使用者"

-------------------------------------------------------------------------------

系統許可權不能級聯回收,對象許可權可以級聯回收。


-------------------------------------------------------------------------------------


本文出自 “三國冷笑話” 部落格,請務必保留此出處http://myhwj.blog.51cto.com/9763975/1888225

oracle許可權的分配與回收

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.