Restore a SQL Server availability database to a secondary replica
This procedure describes how to restore a SQL Server availability database to a secondary replica. Follow this procedure if a secondary replica is unavailable for an extended time and needs to be synchronized with the primary. Or follow these instructions after you add a new secondary replica to the availability group.
To restore a SQL Server availability database to a secondary replica
- Log on to the node that hosts the secondary replica and perform the following actions:
Close any connections to the database on the secondary replica.
Remove the secondary database from the availability group.
- On the left, select Workloads > Microsoft SQL Server.
- Select the Availability groups tab and then click on the availability group name.
- On the Replicas tab, click on the instance that is hosted on the secondary replica.
- On the Databases tab, click on the database that you want to restore.
- Select the Recovery points tab and locate the latest transaction log backup.
By default NetBackup uses the primary copy. To select a different copy, select Copies.
- From the Actions menu select Perform complete database recovery.
- Select one of the following options.
Recovery point selected
Restore the database to the time indicated.
Point in time
Select a different point in time to which you want to restore the database.
Transaction log mark
Choose whether to restore at or before the transaction mark.
Enter the name of the transaction mark.
To select a transaction mark that occurs after a certain date, select After specific date and time. Then specify the date and time.
- If the replicas in the availability group use different paths for the database file, select Restore files to different paths and edit the file path.
- Enter the credentials of the instance that you want to restore to and select Next.
The user account must be a member of the Windows administrator group and a member of the local SQL Server sysadmin role.
- Select the following settings:
Restoring
Overwrite existing database
(Optional) Select Disconnect users. This option disconnects any active users of the database.
- Select Next. Then select Start recovery.
- When the restore completes, join the database to the availability group.