Purpose
You can use this statement to set a restore system change number (SCN) for a standby tenant.
Syntax
/* Restore to a specified timestamp */
ALTER SYSTEM RECOVER STANDBY
[TENANT tenant_name] UNTIL TIME='timestamp';
/* Restore to a specified SCN */
ALTER SYSTEM RECOVER STANDBY
[TENANT tenant_name] UNTIL SCN=scn_no;
/* Unlimited restore */
ALTER SYSTEM RECOVER STANDBY
[TENANT tenant_name] UNTIL UNLIMITED;
/* Cancel database restore from archived redo logs */
ALTER SYSTEM RECOVER STANDBY
[TENANT tenant_name] CANCEL;
Note
- You must specify the
TENANT tenant_nameparameter when you execute this statement in the sys tenant. - In a user tenant, you can execute this statement only for the current tenant.
Parameters
| Parameter | Description |
|---|---|
| timestamp | The timestamp to restore to. |
| scn_no | The SCN to restore to. The specified SCN is included in the restore range. You must add an equal sign (=) before the SCN. |
| UNLIMITED | Specifies to continuously replay logs from the archive source for unlimited restore. |
Examples
Enable continuous synchronization for the standby tenant restore_oracle_tenant.
obclient> ALTER SYSTEM RECOVER STANDBY TENANT restore_oracle_tenant UNTIL UNLIMITED;
Query OK, 0 rows affected