My Oracle Support Banner

AFTER LOGON Triggers Don't Allow DBMS_SESSION.SET_ROLE to Keep Roles Enabled (Doc ID 106140.1)

Last updated on FEBRUARY 01, 2022

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 8.1.7 to 12.1]
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.


When called from an AFTER LOGON trigger, DBMS_SESSION.SET_ROLE does not keep roles enabled within the session after logon, although the AFTER LOGON trigger executes correctly.  The note is investigating this problem and clarifies why this is not possible.


Any DBA wanting to enable the roles dynamically. 


To view full details, 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 a vibrant support community of peers and Oracle experts.