This topic describes the parameters in restore statements.
Parameters in the RESTORE statements
Statements
Restore to a specified timestamp
obclient [(none)]>ALTER SYSTEM RESTORE dest_tenant_name FROM uri UNTIL TIME=timestamp WITH restore_option [DESCRIPTION description];Restore to a specified SCN
obclient [(none)]>ALTER SYSTEM RESTORE dest_tenant_name FROM uri UNTIL SCN=scn WITH restore_option [DESCRIPTION description];Restore to the latest checkpoint
obclient [(none)]> ALTER SYSTEM RESTORE dest_tenant_name FROM uri WITH restore_option [DESCRIPTION description];
Parameters
| Parameter | Description |
|---|---|
| dest_tenant_name | The name of the destination 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 kms_encrypt. Separate the options with ampersands (&).
|
| description | Optional. The description. |
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
Statement
obclient [(none)]> ALTER SYSTEM SET ha_high_thread_score =10 TENANT = mysql;
Parameter
| Parameter | Description |
|---|---|
| ha_high_thread_score | Specifies the weight of threads for the restore job queue. |
Parameters in the RECOVER statements
Statements
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
Statement
obclient [(none)]> 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. |