SQL Server Logshipping – Extend LS_Alert Window

log-shippingsql serversql-server-2017

We have a logshipping setup, where the LS_Restore job on the secondary database is switched off every night for the datawarehouse to grab its data. The restore cycle is set to 15 minutes and if LS_Restore would kick in, the datawarehouse connection would get severed – the interface therefore switches off LS_Restore. When the datawarehouse interface is done, the LS_Restore job is turned back on.

However, this window can be longer than one hour (by just ten minutes or there-abouts), and this then triggers the LS_Alert job to raise errors.

How can we extend the range on LS_Alert to, say, 1,5 hours?

Best Answer

update the relevant row and column (backup_threshold (in minutes)) in the log shipping config table

https://docs.microsoft.com/en-us/sql/relational-databases/system-tables/log-shipping-monitor-primary-transact-sql?view=sql-server-2017