Name
SET ROLE
Synopsis
SET ROLE {role
[IDENTIFIED BYpassword
][,role
[IDENTIFIED BYpassword
...] | ALL [EXCEPTrole
[,role
...] | NONE }
Enables or disables roles (role) for the current session.
Keywords
- IDENTIFIED BY
Specifies thepassword for the role. This 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 enabled.
- NONE
Specifies that all roles granted to you are to be disabled for this session.
Note
You must already have been granted the roles named in this statement.
Example
The following example enables the DBA role for the current session:
SET ROLE dba IDENTIFIED BY manager
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.