The DBMS_SESSION system package provides access to the ALTER SESSION SQL statement and other session information from PL/SQL. You can use DBMS_SESSION to set preferences and security levels.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL-compatible mode.
Privilege requirements for DBMS_SESSION
You need the privileges of the user who calls the DBMS_SESSION system package. You do not need the SYS privileges.
Overview of DBMS_SESSION subprograms
The following table lists the DBMS_SESSION subprograms supported in the current version of OceanBase Database and their brief descriptions.
| Subprogram | Description |
|---|---|
| CLEAR_ALL_CONTEXT | Clears all context information. |
| CLEAR_CONTEXT | Clears the specified context information. |
| CLEAR_IDENTIFIER | Clears identifiers. |
| RESET_PACKAGE | Clears all package variables in the session. |
| SET_CONTEXT | Sets or resets the value of a context attribute. |
| SESSION_IS_ROLE_ENABLED | Determines whether the specified role is enabled at the session level. |
| IS_ROLE_ENABLED | Determines whether the specified role is enabled in the session. |