Disable the arbitration service for a tenant

2025-04-28 03:35:15  Updated

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

  1. Log in to the sys tenant of the cluster as the root user.

    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***** -A
    

    For more information about how to connect to a database, see Overview (MySQL mode) or Overview (Oracle mode).

  2. Query the status of the arbitration service for the tenant.

    Here is an example:

    SELECT * FROM oceanbase.DBA_OB_TENANTS WHERE tenant_name = 'oracle001'\G
    

    The 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 set
    

    In the query result, the value of the ARBITRATION_SERVICE_STATUS field is ENABLED, which indicates that the arbitration service is enabled for the tenant.

    For more information about the DBA_OB_TENANTS view, see DBA_OB_TENANTS.

  3. Disable the arbitration service for the tenant.

    Here is a sample statement:

    ALTER TENANT tenant_name [SET] ENABLE_ARBITRATION_SERVICE = false;
    

    The tenant_name field specifies the name of the tenant for which you want to disable the arbitration service. The SET keyword is optional.

    The following sample statement disables the arbitration service for a tenant named oracle001:

    obclient [(none)]> ALTER TENANT oracle001 ENABLE_ARBITRATION_SERVICE = false;
    
  4. Query the oceanbase.DBA_OB_TENANTS view 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'\G
    

    The 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 set
    

    The preceding query result shows that the value of the ARBITRATION_SERVICE_STATUS field is DISABLED, 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:

Contact Us