SET ROLE
SET ROLE 
  {role [IDENTIFIED BY password][,role [IDENTIFIED BY password ...]] |
   ALL EXCEPT role[,role ...] |
   NONE
  }

Enables or disables roles for the current session.

Keywords

role

Specifies the name of the role to be enabled.

IDENTIFIED BY

Specifies the password for the role. This option is required if the role is password protected.

ALL

Specifies that all roles granted to you are to be enabled. If the EXCEPT clause is included, the specified roles will not be enabled, but all other roles granted to you will be.

NONE

Specifies that all roles granted to you are to be disabled for this session.

Example

Enable the developer role for the current session:

SET ROLE developer IDENTIFIED BY manager;

Get Oracle SQL: the Essential Reference 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.