Creating a common role

Common roles are roles created in the root container and they exist in all containers. These roles can have a different set of privileges in different containers and they can be granted to either common or local users or roles.

Getting ready

To complete this recipe, you'll need an existing common user who has create role privilege granted commonly.

How to do it...

  1. Connect to the root container as a common user who has create role privilege granted commonly (for example, c##zoran or system user):
    SQL> connect c##zoran@cdb1
    
  2. Create a common role (for example, c##role1):
    SQL> create role c##role1 container=all;
    

How it works...

When you create a common role, that role exists in all containers in that database (including a root container ...

Get Oracle Database 12c Security Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.