This topic describes the parameters in restore statements.
Parameters in the RESTORE statements
Syntax
Restore to a specified timestamp:
ALTER SYSTEM RESTORE dest_tenant_name FROM uri UNTIL TIME='timestamp' WITH 'restore_option' [WITH KEY FROM 'backup_key_path' ENCRYPTED BY 'password'] [DESCRIPTION description];Restore to a specified SCN:
ALTER SYSTEM RESTORE dest_tenant_name FROM uri UNTIL SCN=scn WITH 'restore_option' [WITH KEY FROM 'backup_key_path' ENCRYPTED BY 'password'] [DESCRIPTION description];Restore to the latest checkpoint:
ALTER SYSTEM RESTORE dest_tenant_name FROM uri WITH 'restore_option' [WITH KEY FROM 'backup_key_path' ENCRYPTED BY 'password'] [DESCRIPTION description];Cancel the restore of a tenant:
ALTER SYSTEM CANCEL RESTORE dest_tenant_name;
Parameters
| Parameter | Description |
|---|---|
| dest_tenant_name | The name of the target tenant to which the data is to be restored. |
| uri | The data backup path backup_data_dest and log archive path log_archive_dest specified during restore. The value must contain at least one data backup path and one log archive path that are separated with a comma (,). |
| timestamp | The timestamp to which data is restored. Join the parameter name and value with an equal sign (=). The timestamp must be in the YYYY-MM-DD HH24:MI:SS.FF format, accurate to nanoseconds. |
| scn | The SCN to which data is restored. Join the parameter name and value with an equal sign (=). |
| restore_option | The restore options, including pool_list, locality, primary_zone, and concurrency. Separate the options with ampersands (&).
|
| WITH KEY FROM 'backup_key_path' ENCRYPTED BY 'password' | Specifies the backup information of the key for encrypting the tenant. You need to specify the related information for key backup during restore only when transparent encryption is configured for the source tenant. The parameters are described as follows:
|
| description | The description. This parameter is optional. |
Constraint for specifying the timestamp and SCN
The timestamp and SCN must be greater than or equal to the minimum restore SCN indicated by MIN_RESTORE_SCN in the data backup view CDB_OB_BACKUP_SET_FILES, and smaller than or equal to the maximum archive SCN indicated by CHECKPOINT_SCN in the log archive view CDB_OB_ARCHIVE_LOG. Log archiving may be interrupted. Therefore, you must consider inconsecutive ranges of logs when you specify the restore SCN. The restorable window may be discontinuous.
Assume that:
Two log archive rounds were initiated, with the
round_idvalues of1and2.Three data backup jobs were initiated, which produced three valid data backup sets:
full_backup_set_1,full_backup_set_2, andinc_backup_set_3.
The following figure shows the restorable window for physical restore. The right boundary of a data backup set is specified by MIN_RESTORE_SCN. For example, MIN_RESTORE_SCN of full_backup_set_1 corresponds to scn 300 in the figure. The right boundary of a log archive is specified by CHECKPOINT_SCN. For example, CHECKPOINT_SCN of round 1 corresponds to scn 500 in the figure.

Log archiving may be interrupted. Therefore, you must consider the inconsecutive time ranges when you calculate the restorable window. As a result, the restorable window is discontinuous. In the figure, the restorable window is [scn 300, scn 500] u [scn 900, scn 1500].
Parameters in the restore performance tuning statement
Syntax
ALTER SYSTEM SET ha_high_thread_score =10 TENANT = mysql;
Parameters
| Parameter | Description |
|---|---|
| ha_high_thread_score | The weight of threads for the restore job queue. |
Parameters in the RECOVER statements
Syntax
Replay logs to the specified timestamp:
ALTER SYSTEM RECOVER STANDBY [TENANT tenant_name] UNTIL TIME='timestamp';Replay logs to the specified SCN:
ALTER SYSTEM RECOVER STANDBY [TENANT tenant_name] UNTIL SCN=scn;Continuously replay logs from the archive source without specifying the end point:
ALTER SYSTEM RECOVER STANDBY [TENANT tenant_name] UNTIL UNLIMITED;Cancel a log replay:
ALTER SYSTEM RECOVER STANDBY TENANT tenant_name CANCEL;
Parameters
| Parameter | Description |
|---|---|
| tenant_name | The tenant name. |
| timestamp | The timestamp to which data is restored. Join the parameter name and value with an equal sign (=). The timestamp must be in the YYYY-MM-DD HH24:MI:SS.FF format, accurate to nanoseconds. |
| scn | The SCN to which data is restored. Join the parameter name and value with an equal sign (=). |
| UNLIMITED | Specifies to continuously replay logs from the archive source without specifying the end point. |
Parameters in the ACTIVATE statement
Syntax
ALTER SYSTEM ACTIVATE STANDBY TENANT tenant_name;
Parameters
| Parameter | Description |
|---|---|
| tenant_name | The name of the standby tenant that is restored. You can use this statement to change the role of only one tenant at a time. |