Database Log Backups failing on SQL 2014 Availability Group
My current setup is two servers running Windows 2012 R2 and SQL 2014. I have the two servers in an availability group and all seems to be functioning normally other than the log backups for a specific db. It is running every 15 minutes and when run it generates this error
ource: Back Up Database Task Execute SQL Task Description: Executing the query "DECLARE @preferredReplica int SET @preferredRep..." failed with the following error: "Log backup for database "Database" on a secondary replica failed because the last backup LSN (0x00000512:000306f0:0001) from the primary database is greater than the current local redo LSN (0x00000512:000306ef:0001). No log records need to be backed up at this time. Retry the log-backup operation later. BACKUP LOG is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error Progress: 2016-02-17 08:15:01.20
These backups were working just fine until one of my servers crashed (SQL01) which was originally the primary. I had a problem with the master database so SQL02 became the primary until I was able to restore the master DB from a backup a few days earlier. Since then when SQL02 is the primary the backups work great. Once I make SQL01 (which previously had the master DB problem) then this is when the log backups fail.
Any assistance would be appreciated.
Microsoft SQL Server
Last Comment
Jeff Perry
8/22/2022 - Mon
Jose Torres
Check and make sure the the AUTOMATED_BACKUP_PREFERENCE is set to PRIMARY
SELECT * FROM master.sys.availability_groups
Jeff Perry
ASKER
The Automated Backup is set to secondary, This is most likely because on the properties of the AG under backup preferences it is set to Prefer Secondary
SELECT * FROM master.sys.availability_gr