Maximum number of enabled roles

The INIT.ORA parameter MAX_ENABLED_ROLES specifies the maximum number of enabled roles a user can have. This number includes the unlisted PUBLIC role. You can determine which roles are currently active by querying the data dictionary view SESSION_ROLES. Oracle counts all roles that have been granted either directly or indirectly through other roles against this limit. Thus, for example, enabling the DBA role actually uses seven of the allocated slots:

DBA
SELECT_CATALOG_ROLE
HS_ADMIN_ROLE
EXECUTE_CATALOG_ROLE
DELETE_CATALOG_ROLE
EXP_FULL_DATABASE
IMP_FULL_DATABASE

A slot is also used for the PUBLIC role.

Since roles are established at connect time or when the SET ROLE command is executed, the most common effect of the MAX_ENABLED_ROLES parameter is for a connection to fail with an ORA-1925 error, which indicates that too many roles have been granted to the user.

Get Oracle Database Administration: The Essential Refe 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.