Monday, March 19, 2012

Log shipping monitor our of sync SQL Server 2005

I have set up log shipping between two servers with a third serving as a monitoring server. Recently the monitoring for the eight databases that I am log shipping began to indicate that everything was failing. Upon further inventigation of the log_shipping_monitor_history_detail tables on the prinary and secondary everthing appears to working properly but I have been unable to resyncronize the monitoring. I have attempted to use the stored procedure sp_refresh_log_shipping_monitor to no avail, it does not appear to do anything with respect to the data in the dbo.log_shipping_primary_databases and log_shipping_monitor_primary tables on the primary server or the log_shipping_monitor_secondary and dbo.log_shipping_secondary_databases tables on the secondary. I have also manually updated the records in these tables in an attempt to syncronize but after the next sucessful backup, copy and restore this monitoring data is not updating. Does anyone have any ideas as to what I am doing wrong or how I might rectify this situation.Moving to availability forum.|||

I took a shot at reproducing this issue. I could not reproduce the scenario that you describe, but here is some information that may help.

1) Executing sp_refresh_log_shipping_monitor probably hurt more than it helped in this case. There is a bug in this stored procedure that is fixed in SP2 which results in the data that is supposed to be refreshed on the monitor server actually being deleted.

2) After getting my local test monitor server into a bad state, the only way to recover was to remove log shipping and then add it again. When adding it back, you could bypass initializing the secondary database because the primary and secondary are already in synch. After doing this and running through one cycle of backing up a tlog, copy, and restore the monitor server once again had current information on the log shipped database.

Tom

This posting is provided "AS IS" with no warranties, and confers no rights.

No comments:

Post a Comment