Sql-server – deactivate log shipping jobs without raising errors

log-shippingsql serversql-server-2008

I've set up log shipping from Server A to Server B. I then set it up from B to A when B was the primary.

I've reverted back to A being primary and disabled the backup, copy and restore jobs associated with B to A shipping. However, I have a failure of the LSAlert job on both A and B.

Is there a way to suppress these error or must I remove Log Shipping from B to A while A is primary?

My goal is to leave the log shipping configuration in place for DR, but have it not raise errors stating that databases have not been sync'd.

Thanks

Best Answer

This normally occurs when the log-shipping is not removed cleanly. To remove the orphan entries you have to delete them from msdb logshipping tables.

On Primary :
delete from msdb..log_shipping_monitor_secondary
where secondary_database = '' -- secondary db name goes here 
delete from dbo.log_shipping_secondary
where primary_database='' -- primary db name goes here 

On Secondary:

delete from msdb..log_shipping_monitor_primary
where primary_database='' -- primary db name goes here 

delete from dbo.log_shipping_primary_secondaries
where secondary_database='' -- secondary db name goes here 
Related Question