Standby tenants should be in continuous synchronization mode be default. This topic describes the procedure for setting a standby tenant to continuous synchronization mode.
Procedure
Log in to the standby tenant or the
systenant of the cluster where the standby tenant is located, using the administrator.Execute the
RECOVERstatement to set the log recovery endpoint for the standby tenant.ALTER SYSTEM RECOVER STANDBY [TENANT = tenant_name] UNTIL UNLIMITED;Note that the parameter
TENANT = tenant_nameis only required when you execute the statement with thesystenant to specify the name of the standby tenant.UNLIMITEDindicates that the endpoint is infinite.An example of setting the log recovery endpoint for a specified standby tenant through the
systenant is as follows:ALTER SYSTEM RECOVER STANDBY TENANT = standby_tenant UNTIL UNLIMITED;An example of a standby tenant setting the log recovery endpoint for itself is as follows:
ALTER SYSTEM RECOVER STANDBY UNTIL UNLIMITED;
After the statement is executed, the standby tenant will enter continuous synchronization mode.
More information
OceanBase Database also allows you to execute the RECOVER statement to set the log recovery endpoint for the standby tenant to any reasonable time point. The syntax is as follows:
Recover to a specified timestamp
ALTER SYSTEM RECOVER STANDBY [TENANT = tenant_name] UNTIL TIME='timestamp';Recover to a specified SCN
ALTER SYSTEM RECOVER STANDBY [TENANT = tenant_name] UNTIL SCN =scn;where
TENANT = tenant_nameis only required when you execute the statement with thesystenant to specify the name of the standby tenant.timestampis a specified timestamp in nanoseconds.scnis a specified SCN, which is a logical internal timestamp.
After the statement is executed, the standby tenant will recover to the specified time point, including that time point.