CREATE DATA ROLE

Purpose

Use CREATE DATA ROLE to create a data role or an externally mapped data role (with a mapping to an external application role).

Prerequisites

To create a data role, the CREATE DATA ROLE system privilege is required. Customers can use the DBA_DATA_ROLES data dictionary view to query the existing data roles together with their properties.

Syntax

Description of the illustration create_data_role.gif

external_role_clause::=

Description of the illustration external_role_clause.gif

local_role_clause::=

Description of the illustration local_role_clause.gif

Semantics

Example

The following SQL statement creates an externally mapped data role, employee_role, which is mapped from the AZURE role, employee:

CREATE DATA ROLE employee_role
  MAPPED TO 'AZURE_ROLE=employee';

The following SQL statement creates a local data role, it_support_role:

CREATE DATA ROLE it_support_role;