瞭解Oracle許可權管理

來源:互聯網
上載者:User

create user myuser identified by mypassword default tablespace users; 
/** 
請輸入使用者名稱:  myuser 
輸入口令: 
ERROR: 
ORA-01045: user MYUSER lacks CREATE SESSION privilege; logon denied 
建立使用者後,使用者並不能馬上登入 
 
*/ 
 
grant create session to myuser;--分配串連許可權後使用者myuser可以正常使用pl/sql  
grant create table to myuser;--給使用者myuser分配建立表的許可權  
alter user myuser quota 100M on users;--給使用者myuser分配USERS資料表空間  
grant create session to myuser with amdin option;--使用者myUser可以將自己的許可權往下分  
grant create session,create table to myuser;--一次分配多個許可權  
revoke create session,create table from myuser;--回收使用者權限,使用with admin option 會因傳播者許可權變更失效  
 
--對象許可權 grant OP_TYPE on OBJECT_NAME to USER;  
grant select,insert,update,delete,execute,index,references,alter on emp to myuser; 
grant all on emp to myuser; 
grant select on emp to myuser with grant option; 
revoke update,insert on emp from myuser; 
 
--利用角色指派許可權(角色是許可權的集合)  
 
create role myrole; 
grant select,update to myrole; 
grant myrole to to myuser; 
 
--角色繼承  
grant roleA to roleB; 
--roleB 繼承roleA   

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.