OceanBase AI Database provides parameters for managing DBLinks. You can enable or disable the DBLink feature based on your business strategy, and adjust connection reuse for remote databases according to specific business requirements.
Enable or disable the DBLink feature
OceanBase AI Database enables or disables the DBLink feature through the cluster-level parameter enable_dblink. The enable_dblink option is enabled by default (True), making the DBLink feature available. When set to True, the DBLink feature is activated; when set to False, the DBLink feature is disabled, and an OB_OP_NOT_ALLOW error is raised when using the DBLink feature, indicating that the operation is not allowed.
For more information about the cluster-level parameter enable_dblink, see enable_dblink.
Example:
Execute the following statements in the sys tenant to configure the usage status of the DBLink feature.
Start the DBLink feature.
ALTER SYSTEM SET enable_dblink = True;Disable the DBLink feature.
Note
enable_dblinkis a cluster-level parameter. There is no need to disable the DBLink feature unless otherwise specified.ALTER SYSTEM SET enable_dblink = False;
Configure DBLink connection reuse for accessing remote databases
OceanBase AI Database provides control over DBLink connection reuse through the hidden parameter _enable_dblink_reuse_connection. Enabling this option allows connections to remote databases to be reused within the same session (i.e., persistent connections), improving efficiency and performance. In unstable or exceptional network conditions, you can disable this option to establish new connections (i.e., non-persistent connections) each time you access a remote database, thereby avoiding potential connection issues.
Attribute |
Description |
|---|---|
| Parameter type | Boolean |
| Default value | True, which indicates that connection reuse is enabled by default. |
| Value range | False or True.
|
| Effective mode | Takes effect immediately. |
| Level | Tenant-level |
Examples
Execute the following statement in a user tenant to set DBLink not to reuse connections within a session.
ALTER SYSTEM SET _enable_dblink_reuse_connection = False;Execute the following statement in a user tenant to set DBLink to reuse connections within a session.
ALTER SYSTEM SET _enable_dblink_reuse_connection = True;