IS_ROLE_ENABLED determines whether the specified role is enabled in the current session.
Note
This subprogram was introduced in V4.4.1.
Syntax
DBMS_SESSION.IS_ROLE_ENABLED (
rolename VARCHAR2)
RETURN BOOLEAN;
Parameters
rolename specifies the name of the role. It returns TRUE if the role is enabled, and FALSE if the role is not enabled.
Example
BEGIN
IF DBMS_SESSION.IS_ROLE_ENABLED('DBA') THEN
DBMS_OUTPUT.PUT_LINE('Role DBA is enabled');
ELSE
DBMS_OUTPUT.PUT_LINE('Role DBA is not enabled');
END IF;
END;
/