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 command 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.Example of the
systenant pausing log synchronization for a specified standby tenant:ALTER SYSTEM RECOVER STANDBY TENANT = standby_tenant CANCEL ;Example of a standby tenant pausing log synchronization for itself:
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 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 command was executed.For more information about how to view the log stream synchronization progress 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 command 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.Example of the
systenant resuming log synchronization for a specified standby tenant:ALTER SYSTEM RECOVER STANDBY TENANT = standby_tenant UNTIL UNLIMITED;Example of a standby tenant resuming log synchronization for itself:
ALTER SYSTEM RECOVER STANDBY UNTIL UNLIMITED;