OceanBase Database allows you to set the log transfer parameter to control log transfer.
Procedure
Log on to the
systenant as therootuser.In the primary cluster, execute the following statement to set
REDO_TRANSPORT_OPTIONSfor a standby cluster.Example:
obclient> ALTER SYSTEM MODIFY CLUSTER 'obcluster' CLUSTER_ID 3 SET REDO_TRANSPORT_OPTIONS = 'SYNC NET_TIMEOUT=30000000';In this example:
The cluster name is
obcluster.The cluster ID is 3.
The transfer mode is
SYNC, andNET_TIMEOUTis set to 30 in seconds.SYNC/ASYNC: specifies the log transfer mode.SYNCindicates the synchronous mode, andASYNCindicates the asynchronous mode. The default value isASYNC.NET_TIMEOUT: specifies the timeout duration for the primary cluster to wait for a response from a standby cluster in SYNC mode when the MAXIMUM AVAILABILITY protection mode is adopted. If no response is received after the timeout duration elapses, the primary cluster is automatically downgraded to the ASYNC mode.NET_TIMEOUTis meaningless in other modes.
View the log transfer settings of a standby cluster
You can view the log transfer settings of a cluster in the following ways:
Log on to the sys tenant as the root user.
Execute the following statement to query the
V$OB_STANDBY_STATUSview of the primary cluster to view the log transfer settings of each standby cluster:obclient> SELECT CLUSTER_ID, REDO_TRANSPORT_OPTIONS FROM V$OB_STANDBY_STATUS;For more information about the fields in the
V$OB_STANDBY_STATUSview, see v$ob_standby_status.Execute the following statement to query the
V$OB_CLUSTERview of a cluster to view its log transfer settings:obclient> SELECT CLUSTER_ID, REDO_TRANSPORT_OPTIONS FROM V$OB_CLUSTER;For more information about the fields in the
V$OB_CLUSTERview, see v$ob_cluster.