12c多租戶架構裡給Common/local user賦權的幾種可能場景
12c 多租戶架構引入了common user、local user的概念後,對於使用者許可權的控制沒有原先那麼簡單明瞭,本文列舉了12c多租戶架構中能夠實現的八種賦權的場景,旨在更清晰的瞭解12c所帶來的使用者許可權管理上的變化
首先在CDB$ROOT上建立Common user和 common role:
create user c##guser1 identified by chh;
select * from dba_roles;
create role c##grole1; ----建立common role,不指定container,預設為container=ALL
1、 common role granted locally to common user only in CDB$ROOT,executed in CDB$ROOT
grant c##grole1 to c##guser1; ---不指定container,預設為container=current
2、 common role granted commonly to common user in CDB and all its PDBs,executed in CDB$ROOT
grant c##grole1 to c##guser1 container=all;
3、 privilege granted locally to common user/role only in CDB$ROOT,executed in CDB$ROOT
SQL> grant select any table to c##grole1; –-不指定container,預設為container=current
Grant succeeded
select * from dba_sys_privs where grantee='C##GROLE1';
4、 privilege granted commonly to common user/role in CDB and all its PDBs,executed in CDB$ROOT
SQL> grant select any table to c##grole1 container=all;
Grant succeeded
select * from dba_sys_privs where grantee='C##GROLE1'; ---和上一結果相比多了一行Common=yes
5、 privilege granted locally to common user/role in PDB,executed in PDB
grant insert any table to c##guser1;
6、 common role granted locally to local user/role in PDB,executed in PDB
grant c##grole1 to scott;
7、 local role granted locally to common user/role in PDB,executed in PDB
create role lrole1;
grant lrole1 to c##guser1;
8、 if a common role is granted commonly(grant … container=ALL) from CDB to all it PDBs, then it should only be revoked from CDB
select * from dba_role_privs where grantee='C##GUSER1'
SQL> revoke C##GROLE1 from C##GUSER1; --- if revoked from PDB,ORA errors appears
revoke C##GROLE1 from C##GUSER1
ORA-01951: ROLE 'C##GROLE1' not granted to 'C##GUSER1'
SQL> revoke c##grole1 from c##guser1 container=ALL; ---should be revoked from CDB$ROOT with container=ALL
Revoke succeeded
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/53956/viewspace-1280016/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 12c多租戶架構下部署GoldenGate 12c架構Go
- 多租戶許可權,組織架構樹架構
- 如何理解多租戶架構?架構
- 多租戶軟體開發架構架構
- Oracle多租戶架構優勢分析Oracle架構
- oracle 12c 多租戶體系結構概念Oracle
- 什麼是多租戶架構? - Codonomics架構
- TPP穩定性之場景隔離和多租戶
- Oracle 12c 多租戶 CDB 與 PDB之 shared undo 與 Local undo 切換Oracle
- 1.2.1. 非多租戶架構帶來的挑戰架構
- 新零售SaaS架構:多租戶系統架構設計架構
- oracle12之 多租戶容器資料庫架構Oracle資料庫架構
- 多租戶
- Oracle 12c 多租戶 CDB 與 PDB 備份Oracle
- 一種Django多租戶解決方案Django
- Uber在微服務架構中如何利用多租戶玩轉生產現場測試?微服務架構
- Oracle 12c系列(一)|多租戶容器資料庫Oracle資料庫
- 【解決方案】多租戶技術架構設計入門(一)架構
- 12C多租戶關於CDB、PDB的常用SQL語句SQL
- 2 多租戶體系結構概述
- ASP.NET Core + SaasKit + PostgreSQL + Citus 的多租戶應用程式架構示例ASP.NETSQL架構
- oracle 12c 多租戶體系結構概念之資料字典、服務、使用者、角色與許可權Oracle
- redis常見的幾種使用場景Redis
- Oracle 12c多租戶的一些日常簡單維護Oracle
- Spring Cloud Alibaba 多租戶 saas 設計的企業開發架構SpringCloud架構
- Part I Multitenant Architecture (多租戶結構)NaN
- Oracle Database 12cR2多租戶權威指南OracleDatabase
- 【多租戶技術】
- 1.2. 多租戶體系結構的優點
- max場景瘦身,加快場景的開啟速度(多種方法)
- Oracle 12c 多租戶配置和修改 CDB 和 PDB 引數Oracle
- Oracle 12c 多租戶 手工建立 pdb 與 手工刪除 pdbOracle
- GoldenGate 12.2抽取Oracle 12c多租戶配置過程GoOracle
- 事物系統的幾種異常場景
- 幾種場景的資料庫恢復資料庫
- Oracle 12c多租戶特性詳解:PDB 的建立、克隆與維護Oracle
- Oracle 12c多租戶特性詳解:PDB 的出與入 InAndOutOracleNaN
- Oracle 12c多租戶特性詳解:PDB 的備份與恢復Oracle