Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support the arbitration service.
You can disable the arbitration service for a tenant based on your business needs.
Procedure
Log on to the
systenant of the cluster as therootuser.Note that you must specify the corresponding parameters in the following sample code based on your actual database configurations.
obclient -h10.xx.xx.xx -P2883 -uroot@sys#obdemo -p***** -AFor more information about how to connect to a database, see Overview (MySQL mode) or Overview (Oracle mode).
Query the status of the arbitration service for the tenant.
Here is an example:
SELECT * FROM oceanbase.DBA_OB_TENANTS WHERE tenant_name = 'oracle001'\GThe query result is as follows:
*************************** 1. row *************************** TENANT_ID: 1004 TENANT_NAME: oracle001 TENANT_TYPE: USER CREATE_TIME: 2023-06-26 19:40:21.457857 MODIFY_TIME: 2023-06-26 19:41:14.594119 PRIMARY_ZONE: zone1;zone2 LOCALITY: FULL{1}@zone1, FULL{1}@zone2 PREVIOUS_LOCALITY: NULL COMPATIBILITY_MODE: ORACLE STATUS: NORMAL IN_RECYCLEBIN: NO LOCKED: NO TENANT_ROLE: PRIMARY SWITCHOVER_STATUS: NORMAL SWITCHOVER_EPOCH: 0 SYNC_SCN: 1687844691346544381 REPLAYABLE_SCN: 1687844691346544381 READABLE_SCN: 1687844691346544381 RECOVERY_UNTIL_SCN: 4611686018427387903 LOG_MODE: NOARCHIVELOG ARBITRATION_SERVICE_STATUS: ENABLED UNIT_NUM = 1, COMPATIBLE: 4.2.0.0 1 row in setIn the query result, the value of the
ARBITRATION_SERVICE_STATUSfield isENABLED, which indicates that the arbitration service is enabled for the tenant.For more information about the
DBA_OB_TENANTSview, see DBA_OB_TENANTS.Disable the arbitration service for the tenant.
The syntax is as follows:
ALTER TENANT tenant_name [SET] ENABLE_ARBITRATION_SERVICE = false;The
tenant_namefield specifies the name of the tenant for which you want to disable the arbitration service. TheSETkeyword is optional.The following sample statement disables the arbitration service for a tenant named
oracle001:obclient [(none)]> ALTER TENANT oracle001 ENABLE_ARBITRATION_SERVICE = false;Query the
oceanbase.DBA_OB_TENANTSview to check whether the arbitration service is disabled for the tenant.Here is an example:
SELECT * FROM oceanbase.DBA_OB_TENANTS WHERE tenant_name = 'oracle001'\GThe query result is as follows:
*************************** 1. row *************************** TENANT_ID: 1004 TENANT_NAME: oracle001 TENANT_TYPE: USER CREATE_TIME: 2023-06-26 19:40:21.457857 MODIFY_TIME: 2023-06-27 13:51:47.053502 PRIMARY_ZONE: zone1;zone2 LOCALITY: FULL{1}@zone1, FULL{1}@zone2 PREVIOUS_LOCALITY: NULL COMPATIBILITY_MODE: ORACLE STATUS: NORMAL IN_RECYCLEBIN: NO LOCKED: NO TENANT_ROLE: PRIMARY SWITCHOVER_STATUS: NORMAL SWITCHOVER_EPOCH: 0 SYNC_SCN: 1687845116605766616 REPLAYABLE_SCN: 1687845116605766616 READABLE_SCN: 1687845116605766616 RECOVERY_UNTIL_SCN: 4611686018427387903 LOG_MODE: NOARCHIVELOG ARBITRATION_SERVICE_STATUS: DISABLED UNIT_NUM = 1, COMPATIBLE: 4.2.0.0 1 row in setThe preceding query result shows that the value of the
ARBITRATION_SERVICE_STATUSfield isDISABLED, which indicates that the arbitration service is disabled for the tenant.
What to do next
After you disable the arbitration service for all tenants, you can remove the arbitration service if you no longer need it. For more information, see Remove the arbitration service.
References
For more information about the arbitration service, see the following topics: