Oracle學習(十四):系統管理使用者安全性

來源:互聯網
上載者:User

標籤:


--使用者(user)SQL> --建立一個名為 grace password是password 的使用者,新使用者沒有不論什麼許可權SQL> create user grace identified by password;驗證使用者:password驗證方式(username/password)外部驗證方式(主機認證,即通過登陸的username)全域驗證方式(其它方式:生物認證方式、token方式)優先順序順序:外部驗證>password驗證--許可權(privilege)使用者權限有兩種:System:同意使用者運行對於資料庫的特定行為,比如:建立表、建立使用者等Object:同意與使用者訪問和操作一個特定的對象,比如:對其它方案下的表的查詢SQL> --給grace使用者授予系統許可權SQL> --create session SQL> grant create session to grace;SQL> --create tableSQL> grant create table to grace ;SQL> --分配空間(改動使用者grace的空間為不限制)SQL> alter user grace quota unlimited on users;SQL> --對象許可權SQL> --將目前使用者emp表的查詢的許可權授予grace使用者SQL> grant select on emp to grace;SQL> --admin option 系統許可權 不會級聯SQL> -- DBA --> create session --> jeff:管理員授予jeff登陸許可權SQL> grant create session to jeff with admin option;SQL> -- jeff --> create session --> emi:jeff授予emi登陸許可權SQL> grant create session to emi;SQL> --管理員撤銷jeff的登陸許可權。此時emi的登陸許可權還在。不會被串聯刪除SQL> revoke create session from jeff;SQL> --GRANT OPTION   撤銷對象許可權會產生級聯SQL> -- scott-->select on emp ---> jeff:scott使用者授予jeff查詢emp表的許可權SQL> grant select on emp to jeff with grant option;SQL> --jeff:-->select on scott.emp   --> emi:jeff授予emi查詢scott的emp表的許可權SQL> grant select on scott.emp to emi;SQL> --scott撤銷jeff的查詢emp表的許可權,此時emi的查詢許可權也被刪除SQL> revoke select on emp from jeff;--角色(role)SQL> --刪除角色SQL> drop role hr_clerk;SQL> --建立經理角色SQL> create role hr_mgr;SQL> --建立普通員工角色SQL> create role hr_clerk;SQL> --兩個許可權  create session,  create tableSQL> --授予普通員工角色登陸許可權SQL> grant create session to hr_clerk;SQL> --授予經理建立表的許可權和普通員工角色的許可權SQL> grant create table,hr_clerk to hr_mgr;SQL> --grant connect,resouce to scott;connect,resouce系統定義好的角色SQL> --建立使用者並授予許可權(普通使用者能做的準系統都有)SQL> /*SQL> create user ****SQL>  grant connect,resouce to ***;SQL> */--概要檔案和使用者--每一個使用者僅僅能被關聯到一個概要檔案--概要檔案:管理賬戶狀態和password有效期間;控制資源消費。



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.