OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.4.2

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogWhite PaperLive DemosTraining & CertificationTicket
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.4.2
    iconOceanBase Database
    SQL - V 4.4.2
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    SQL
    KV
    • V 4.6.0
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    Set the strongly synchronized downstream

    Last Updated:2026-05-11 07:58:49  Updated
    Share
    What is on this page
    Limitations and considerations
    Procedure
    What to do next
    References

    folded

    Share

    By default, the primary tenant uses maximum performance protection mode. To switch it to maximum protection or maximum availability, you must first configure a strongly synchronized downstream for the primary tenant.

    Limitations and considerations

    • The standby tenant you designate as the strongly synchronized downstream must be a network-based physical standby.

    • Only one strongly synchronized downstream standby tenant is supported.

    • Either the primary or the standby tenant can configure the strongly synchronized downstream. Usually there is no need to set it on the standby; in a switchover scenario, if you want the pair to remain strongly synchronized, you can set the standby's downstream to the original primary before that standby becomes the new primary.

    • Configuring only the strongly synchronized downstream, without changing the protection mode, does not by itself enable strong synchronization.

    Procedure

    1. Log in as an administrator to the primary tenant, or to the sys tenant of the cluster where the primary tenant resides.

      Note

      In MySQL-compatible mode, the administrator user is root. In Oracle-compatible mode, the administrator user is SYS.

      The following is a connection example. Use values that match your environment.

      obclient -h10.xx.xx.xx -P2883 -uroot@sys#obdemo -p***** -A
      
    2. Execute the following statement to set the strongly synchronized downstream for the primary tenant.

      The statement is as follows:

      ALTER SYSTEM SET SYNC_STANDBY_DEST = 'SERVICE=ip_list NET_TIMEOUT=int_value HEALTH_CHECK_TIME=time USER=user_name@standby_tenant_name PASSWORD=password' [TENANT = tenant_name];
      

      The parameters are described as follows:

      • ip_list: The IP address and SQL port number of the OBServer node where the downstream tenant's replicas are located. The default SQL port number is 2881. Separate multiple IP addresses with commas (,).

        Note

        After this is set, if load balancing or disaster recovery causes the standby's ip_list to change, the primary tenant detects changes to the system log stream location on the standby within seconds and updates automatically. You do not need to edit ip_list manually.

      • NET_TIMEOUT: In maximum availability mode, the longest time the primary waits for the strongly synchronized standby to finish syncing a log. If sync still is not complete when this timeout elapses, the primary automatically falls back to asynchronous synchronization. In other protection modes this parameter has no effect. Unit: seconds. Default 30 (30 seconds). Valid range: [10, 1200].

      • HEALTH_CHECK_TIME: In maximum availability mode, the window during which the primary checks whether the standby stays in sync. If the standby remains in sync throughout this period, the primary automatically returns to strong synchronization. In other protection modes this parameter has no effect. Unit: seconds. Default 60s. Valid range: [0s, +∞).

      • user_name@standby_tenant_name: standby_tenant_name is the downstream standby tenant name. user_name is the view-access user created as described in Create an empty standby tenant (for example, rep_user).

      • password: Password of that view-access user, as set in Create an empty standby tenant.

      • tenant_name: When you run the command from the system tenant, this specifies the primary tenant on which the operation is performed.

      Here are some examples:

      • From the system tenant, set the strongly synchronized downstream standby standby_tenant for primary tenant mysql.

        obclient(root@sys)[(none)]> ALTER SYSTEM SET SYNC_STANDBY_DEST = 'SERVICE=6.xx.xxx.xxx:2881 NET_TIMEOUT=20 HEALTH_CHECK_TIME=40s USER=rep_user@standby_tenant PASSWORD=xxxxxx' TENANT = mysql;
        
      • From the primary tenant, set the strongly synchronized downstream standby standby_tenant for this tenant.

        obclient> ALTER SYSTEM SET SYNC_STANDBY_DEST = 'SERVICE=6.xx.xxx.xxx:2881 NET_TIMEOUT=20 HEALTH_CHECK_TIME=40s USER=rep_user@standby_tenant PASSWORD=xxxxxx';
        
    3. After a successful change, use CDB_OB_SYNC_STANDBY_DEST (in the system tenant) or DBA_OB_SYNC_STANDBY_DEST (in a user tenant) to inspect the strongly synchronized downstream configuration.

      • From the system tenant, query the strongly synchronized downstream for a given tenant.

        obclient(root@sys)[(none)]> SELECT * FROM oceanbase.CDB_OB_SYNC_STANDBY_DEST WHERE TENANT_ID = tenant_id\G
        
      • From a user tenant, query this tenant's strongly synchronized standby downstream.

        MySQL-compatible mode
        Oracle-compatible mode

        In MySQL-compatible mode, use:

        obclient(root@mysql)[(none)]> SELECT * FROM oceanbase.DBA_OB_SYNC_STANDBY_DEST\G
        

        In Oracle-compatible mode, use:

        obclient(sys@oracle001)[SYS]> SELECT * FROM SYS.DBA_OB_SYNC_STANDBY_DEST\G
        

      Example result when queried from the system tenant:

      *************************** 1. row ***************************
      TENANT_ID: 1002
      DEST_ID: 0
      VALUE: IP_LIST=6.xx.xxx.xxx:2881+2882,USER=rep_user@standby_tenant,PASSWORD=CFE754BE186DE38E5A98A964323C91206567A05704397DA148183F10E7E21D78,TENANT_ID=1002,CLUSTER_ID=10002,COMPATIBILITY_MODE=MYSQL,IS_ENCRYPTED=true,net_timeout=20000000,health_check_time=40000000
      1 row in set
      

    What to do next

    After the strongly synchronized downstream is configured for the primary tenant, you may need to do the following:

    • Clear the strongly synchronized downstream

      Under maximum performance, you can clear the configured downstream directly. Examples:

      • From the system tenant, clear the downstream for primary tenant mysql:

        obclient(root@sys)[(none)]> ALTER SYSTEM SET SYNC_STANDBY_DEST = '' TENANT = mysql;
        
      • From the primary tenant, clear this tenant's downstream:

        obclient> ALTER SYSTEM SET SYNC_STANDBY_DEST = '';
        
    • Change the strongly synchronized downstream

      You can change the login name (user_name), password (password), tenant endpoints (ip_list), standby tenant name (standby_tenant_name), and sync timeout (NET_TIMEOUT). The pair (standby_tenant_name, ip_list) uniquely identifies one standby. Under maximum protection or maximum availability you must not change standby_tenant_name, but you may change user_name, password, and ip_list because they do not change which standby is targeted. Under maximum performance, all of these fields may be changed.

      You cannot change a single attribute in isolation: resend the full SYNC_STANDBY_DEST string each time. The syntax is the same as for the initial set.

    Note: After a strongly synchronized downstream is configured, if the primary is in maximum protection or maximum availability and you need to point strong sync at a different standby, do the following:

    1. Follow Set the protection mode and switch the tenant to maximum performance.
    2. Use the commands under Clear the strongly synchronized downstream in this topic to clear the existing downstream.
    3. Follow this topic again to configure the new strongly synchronized downstream.
    4. Follow Set the protection mode to set maximum protection or maximum availability again.

    References

    • Set the protection mode

    Previous topic

    Protection mode and protection level
    Last

    Next topic

    Set the protection mode
    Next
    What is on this page
    Limitations and considerations
    Procedure
    What to do next
    References