My Oracle Support Banner

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 FEBRUARY 19, 2020

Applies to:

Oracle Database - Enterprise Edition - Version and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A 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.


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.