Recovering a SQL database to an alternate location
Perform the following steps to restore SQL databases to a new location. Before you proceed, note the following:
SQL AG databases support recovering to an alternate location only.
The RECOVERY and NORECOVERY restore options are applicable to SQL databases only.
For AG databases, if you are recovering to a primary replica you must select the RECOVERY option during the restore. If you are recovering to a secondary replica, select the NORECOVERY option during the restore.
The same steps are applicable for restoring a same name database to a new location.
If a database with the same name already exists at the new location, you must select the overwrite existing option to perform the restore successfully.
To restore a SQL database to an alternate location
- Sign in to the NetBackup Web UI.
- From the left navigation pane, click Workloads > Cloud and then select the Applications tab.
- Select the SQL asset that you want to recover, then click View details, and then select the Recovery points tab.
The pane displays all the recovery points snapshots that are available for restore.
- Click to select a recovery point snapshot that you want to use for the restore.
- From the right side, click Recover and then select Alternate location from the drop-down menu.
- On the Recover to alternate location dialog box, choose the database recovery options and then click Start recovery to trigger the recovery job.
The following options are available:
Recovery option
Description
Restore with RECOVERY
Select this option if you want to perform a single restore on the database and bring it back to a consistent and operational state.
The database becomes accessible immediately after the restore is complete.
Note:
Select this option if you are recovering an AG database to a primary replica.
Restore with NORECOVERY
Select this option if you intend to perform multiple database restores from a group of backups. For example, if you want to perform a restore using a full backup snapshot and then restore transaction logs.
The database remains in the restoring state and remains inaccessible. You can work with the database only after the transaction logs are restored with the RECOVERY option.
Note:
Select this option if you are recovering an AG database to a secondary replica.
Overwrite existing database
If a database with the same name exists at the target location, select this option if you want the restore operation to replace that database.
- You can monitor the recovery job from the Activity monitor pane.
A status code 0 indicates that the recovery job is successful. You can now verify that the SQL database is recovered.
- If recovering SQL database in restoring mode, then after the recovery operation is complete, verify that the state of the database on the SQL host appears as
(Restoring...). - If applicable, you can now manually restore any transaction logs on the recovered database.