SQL>
SQL> BEGIN
2 IF DBMS_SESSION.IS_ROLE_ENABLED('ADMINSTRATOR') THEN
3 DBMS_OUTPUT.PUT_LINE('Current Role Administrator');
4 ELSIF DBMS_SESSION.IS_ROLE_ENABLED('MANAGER') THEN
5 DBMS_OUTPUT.PUT_LINE('Current Role Manager');
6 ELSE
7 DBMS_OUTPUT.PUT_LINE('Current Role Operator');
8
9 END IF;
10 END;
11 /
Current Role Operator
PL/SQL procedure successfully completed.
SQL>