DBMS_SESSION v13
Advanced Server provides support for the following DBMS_SESSION.SET_ROLE procedure:
| Function/Procedure | Return Type | Description |
|---|---|---|
SET_ROLE(role_cmd) | n/a | Executes a SET ROLE statement followed by the string value specified in role_cmd. |
Advanced Server's implementation of DBMS_SESSION is a partial implementation when compared to Oracle's version. Only DBMS_SESSION.SET_ROLE is supported.
SET_ROLE
The SET_ROLE procedure sets the current session user to the role specified in role_cmd. After invoking the SET_ROLE procedure, the current session will use the permissions assigned to the specified role. The signature of the procedure is:
SET_ROLE(<role_cmd>)
The SET_ROLE procedure appends the value specified for role_cmd to the SET ROLE statement, and then invokes the statement.
Parameters
role_cmd
role_cmd specifies a role name in the form of a string value.
Example
The following call to the SET_ROLE procedure invokes the SET ROLE command to set the identity of the current session user to manager:
edb=# exec DBMS_SESSION.SET_ROLE('manager');- On this page
- SET_ROLE