How To Specify Multiple Roles in DBMS_REDACT.ADD_POLICY Procedure Expression Parameter Using SYS_CONTEXT(''SYS_SESSION_ROLES'') in For Oracle Data Redaction

(Doc ID 2420366.1)

Last updated on JULY 12, 2018

Applies to:

Oracle Database - Enterprise Edition - Version and later
Information in this document applies to any platform.


While creating a new or modifying existing Data Redaction policy using DBMS_REDACT.ADD_POLICY or DBMS_REDACT.ALTER_POLICY,  How to specify multiple roles using SYS_CONTEXT(''SYS_SESSION_ROLES'') for expression attribute.

e.g. how to add verification of multiple session roles for the following policy syntax:


In the above syntax "expression => 'SYS_CONTEXT(''SYS_SESSION_ROLES'',''ROLE_DEL'') = ''FALSE'''" will validate that a role "ROLE_DEL" is not enabled in user session, If the policy has to be applied. However in the above syntax onle one role is verified.

How can multiple roles like ROLE2, ROLE3 be included in the same policy expression?


 A new Data Redaction policy is being created.


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms