Note
This variable was introduced in OceanBase Database V4.2.5.
Description
ob_enable_parameter_anonymous_block specifies whether to enable parameterization for anonymous blocks in the current session.
Applicability
This variable is applicable to only OceanBase Database in Oracle mode.
Limitations
Query the variable
Global-level operation
In the
systenant or a user tenant, you can execute theSHOW VARIABLESstatement to query the variable at the global level or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (in Oracle mode) for the variable at the global level.Session-level operation
In the
systenant or a user tenant, you can execute theSHOW VARIABLESstatement to query the variable at the session level or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (in Oracle mode) for the variable at the session level.
Modify the variable
Global-level operation
In the
systenant, you can directly change the value of the variable at the global level.In OceanBase Database V4.2.0 and later V4.x versions, you must have the
ALTER SYSTEMprivilege to change the value of the variable at the global level in an Oracle user tenant.
Session-level operation
In the
systenant or a user tenant, you can directly change the value of the variable at the session level for the current tenant.
Attributes
| Attribute | Description |
|---|---|
| Type | Boolean |
| Default value | ON |
| Value range | |
| Effective scope | |
| Modifiable | Yes. You can use the SET statement to modify the variable. |
Considerations
You can use the ob_enable_parameter_anonymous_block variable to specify whether to enable parameterization for anonymous blocks.
Examples
Session-level operation
obclient> SET ob_enable_parameter_anonymous_block = off;Global-level operation
obclient> SET GLOBAL ob_enable_parameter_anonymous_block = on;