Note
This variable is available starting with V1.4.
Description
ob_org_cluster_id specifies the cluster_id at the session level for OceanBase Database. The value is persisted to the transaction log.
Privilege requirements
Query variables
systenants and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle mode) or theinformation_schema.SESSION_VARIABLESview (MySQL mode) to view the values of session system variables.Modify variables
systenants and all user tenants can directly modify the values of session system variables in their own tenants.
Attributes
| Attribute | Description |
|---|---|
| Type | int |
| Default value | 0, which indicates that the cluster_id of the cluster is used. The cluster_id is the unique identifier generated when the cluster is created. |
| Value range | [0, 4294967295] |
| Scope | Session |
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Usage notes
In most cases, you do not need to set the ob_org_cluster_id variable. OceanBase Database uses the default value when generating logs (clog). OMS can use the ob_org_cluster_id variable to implement data filtering. For more information about the data filtering feature of OMS, see Create a data migration project from a MySQL tenant of OceanBase Database to a MySQL tenant of OceanBase Database in the OceanBase Migration Service documentation.
For example, the OMS obcdc component sets the cluster_id_black_list parameter to 2147473648, and the OBServer node writes data by setting the session variable to SET ob_org_cluster_id=2147473648;. In this case, obcdc filters out all data whose cluster_id is 2147473648.
Examples
Set the cluster_id at the session level for OceanBase Database to 2147473648.
obclient> SET ob_org_cluster_id = 2147473648;
