- 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.
推薦閱讀
- 軟件界面交互設(shè)計(jì)基礎(chǔ)
- Learning Selenium Testing Tools with Python
- CentOS 7 Server Deployment Cookbook
- 控糖控脂健康餐
- Arduino開發(fā)實(shí)戰(zhàn)指南:LabVIEW卷
- Android 7編程入門經(jīng)典:使用Android Studio 2(第4版)
- Practical Game Design
- Banana Pi Cookbook
- 編譯系統(tǒng)透視:圖解編譯原理
- 從Excel到Python:用Python輕松處理Excel數(shù)據(jù)(第2版)
- C程序設(shè)計(jì)實(shí)踐教程
- PLC應(yīng)用技術(shù)(三菱FX2N系列)
- OpenCV with Python Blueprints
- 監(jiān)控的藝術(shù):云原生時(shí)代的監(jiān)控框架
- 深入理解Java虛擬機(jī):JVM高級特性與最佳實(shí)踐