I have 4 databases on a secondary server two of which are using Sql Server log shipping and two of which are using a "manual log shipping" config (there are just 2 primary databases).

Both implementations on the secondary server were initialized using Backups from the two primary databases.

The issue I currently have is only one of the databases which is being replicated on the secondary server is writing information to msdb..restorehistory.

To be clear it is working for both implementations of one database but neither implementation of the other.

I can't see a setting somewhere that would mean this would not happen and it's definitely not getting cleared as I'm checking instantly after a restore operation.

Anybody any thoughts on why a restore operation wouldn't be getting written to msdb..restorehistory?

  • RestoreHistory in msdb can be deleted by anyone with the required privileges or the command sp_delete_backuphistory. Could this be your problem? Do you have some purging jobs? – Giova Jan 14 '16 at 13:23
  • 99.99% certain that's not happening. It's certainly not another user and there are no jobs set up. Thanks – MrEdmundo Jan 14 '16 at 17:01
  • Have you did someting like detach/attach with database wothout history? – Giova Jan 16 '16 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.