Article Number: 000206971
When you restore to the original availability group, the restore process can automatically restore the databases on both the primary replica and the secondary replicas.
You can also restore databases only on the primary replica.
When you restore a database only on the primary replica, the corresponding database on the secondary replicas is in a restoring state.
To restore the databases on the secondary replicas as part of the availability group, manually prepare and restore the databases, and join them to the availability group on the secondary replicas.
You can also set the databases on a secondary replica online without rejoining them to the availability group by restoring the databases with the RECOVERY recovery operation.
SELECT msdb.dbo.backupset.database_name,
msdb.dbo.backupset.backup_start_date,
msdb.dbo.backupset.backup_finish_date,
msdb.dbo.backupset.type,
msdb.dbo.backupset.database_backup_lsn,
msdb.dbo.backupset.first_lsn,
msdb.dbo.backupset.last_lsn
FROM msdb.dbo.backupmediafamily
INNER JOIN msdb.dbo.backupset
ON msdb.dbo.backupmediafamily.media_set_id = msdb.dbo.backupset.media_set_id
WHERE database_name IN ('ABC')
--and msdb.dbo.backupset.backup_finish_date between '1/20/2022' and '12/23/2022'
ORDER BY
2 DESC,
3 DESC
31 Jul 2023
2
How To