During log synchronization for a standby tenant, you can pause and resume the synchronization of logs.
Pause log synchronization
Log in to the standby tenant or the
systenant of the cluster where the standby tenant is located, using the administrator.Execute the following statement to pause log synchronization:
ALTER SYSTEM RECOVER STANDBY [TENANT = tenant_name] CANCEL ;Note that the parameter
TENANT = tenant_nameis only required when you execute the statement with thesystenant to specify the name of the standby tenant.An example of pausing log synchronization for a specified standby tenant through the
systenant is as follows:ALTER SYSTEM RECOVER STANDBY TENANT = standby_tenant CANCEL ;An example of a standby tenant pausing log synchronization for itself is as follows:
ALTER SYSTEM RECOVER STANDBY CANCEL;Notice
After log synchronization is paused, the standby tenant will no longer synchronize any logs from the primary tenant. Try to avoid log interruption in the standby tenant caused by pausing log synchronization.
After pausing log synchronization, you can separately query the
DBA_OB_TENANTSandGV$OB_LOG_STATviews to find that the synchronization progress of the log stream remains at the time when the statement was executed.For instructions on querying the synchronization progress of the log stream through the
DBA_OB_TENANTSandGV$OB_LOG_STATviews, see View the log synchronization progress.
Resume log synchronization
After pausing log synchronization, you can resume it by changing the recovery endpoint of the standby tenant.
Log in to the standby tenant or the
systenant of the cluster where the standby tenant is located, using the administrator.Execute the following statement to resume log synchronization:
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 resuming log synchronization 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 resuming log synchronization for itself is as follows:
ALTER SYSTEM RECOVER STANDBY UNTIL UNLIMITED;