What is the last and latest RESTORED backup file (FULL/DIFF/LOG)
Get link
Facebook
X
Pinterest
Email
Other Apps
SQL Script
SELECT
rh.restore_date AS [RestoreTime],
rh.destination_database_name AS [Database],
CASE rh.restore_type
WHEN'D'THEN'Full Database'WHEN'I'THEN'Differential'WHEN'L'THEN'Log'WHEN'F'THEN'File'WHEN'G'THEN'Filegroup'WHEN'P'THEN'Partial'WHEN'V'THEN'VerifyOnly'ENDAS [RestoreType],
bs.backup_start_date AS [BackupMadeAt],
bmf.physical_device_name AS [SourceFile],
rh.user_name AS [RestoredBy]
FROM msdb.dbo.restorehistory rh
INNER JOIN msdb.dbo.backupset bs
ON rh.backup_set_id = bs.backup_set_id
INNER JOIN msdb.dbo.backupmediafamily bmf
ON bs.media_set_id = bmf.media_set_id
WHERE rh.destination_database_name = 'dbname'-- Change thisORDER BY rh.restore_date DESC;
I am configured SSRS on Always on Environment. Here I have NODE1 and NODE2 servers, NODE1 is primary replica and NODE2 is secondary replica. I have installed SSRS on both the nodes after downloading setup file from the internet. The below images will explain about how to configure things from "SSRS Configuration Manager". Images below are self explanatory.
The query below will tell us how much of the REDO log needs to harden in the secondry replica of secondary database. Run the query in SECONDARY REPLICA. If the "redo_queue_size" in KB value reducing means the database soon will come into "Synchronized"state have patience and wait for it. select is_primary_replica, synchronization_state_desc, is_commit_participant, synchronization_health_desc, redo_queue_size from sys.dm_hadr_database_replica_ states
Comments