- Oracle Database 12c Security Cookbook
- Zoran Pavlovi? Maja Veselica
- 277字
- 2021-07-02 16:43:16
Creating a local role
Local roles are roles created in PDB and they exist only in that PDB. These roles can be granted only locally to either common or local users or roles.
Getting ready
For this recipe, a pluggable database (in our case, pdb1
) should be open. You'll need an existing user (either common or local) who has create role
privilege in that pluggable database.
How to do it...
- Connect to PDB (for example,
pdb1
) as a common or local user who hascreate role
privilege in that PDB (for example,c##maja
):SQL> connect c##maja@pdb1
- Create a local role (for example,
local_role1
):c##maja@PDB1> create role local_role1 container=current;
How it works...
When you create a local role, that role exists only in the pluggable database in which it is created. Local roles cannot be created in the root container. These roles are traditional roles.

Figure 15
c##maja@CDB1> select * from dba_roles where role='LOCAL_ROLE1'; no rows selected c##maja@CDB1> connect c##maja/oracle@pdb1 Connected. c##maja@PDB1> select * from dba_roles where role='LOCAL_ROLE1'; ROLE PASSWORD AUTHENTICAT COM O ------------------- -------- ----------- --- - LOCAL_ROLE1 NO NONE NO N c##maja@PDB1> connect c##maja/oracle@pdb2 Connected. c##maja@PDB2> select * from dba_roles where role='LOCAL_ROLE1'; no rows selected
There's more...
You can also create local roles by using Oracle Enterprise Manager Cloud Control (OEM) 12c.
推薦閱讀
- C# 7 and .NET Core Cookbook
- Mobile Application Development:JavaScript Frameworks
- Apache ZooKeeper Essentials
- Java面向?qū)ο笏枷肱c程序設(shè)計
- WSO2 Developer’s Guide
- Python高級機器學(xué)習(xí)
- Bootstrap Essentials
- Keras深度學(xué)習(xí)實戰(zhàn)
- 零基礎(chǔ)趣學(xué)C語言
- 響應(yīng)式架構(gòu):消息模式Actor實現(xiàn)與Scala、Akka應(yīng)用集成
- 深入淺出Go語言編程
- Visual Studio Code 權(quán)威指南
- Go語言開發(fā)實戰(zhàn)(慕課版)
- 分布式數(shù)據(jù)庫原理、架構(gòu)與實踐
- Hadoop大數(shù)據(jù)分析技術(shù)