Could not insert a backup or restore history/detail record in the msdb database error

  • Hello --

    I have set up e-mail notifications for log file backup failures on our servers, and one such condition occurred over the weekend. A check of the log file revealed the following entry:

    Could not insert a backup or restore history/detail record in the msdb database. This may indicate a problem with the msdb database.

    There have been subsequent log file backups without the recurrence of the error condition. It seems like it was an isolated event, but I could run the following command to check the integrity of the database:

    DBCC CHECKDB('msdb') WITH TABLOCK, NO_INFOMSGS, ALL_ERRORMSGS

    Am making much ado about nothing, or is the above command good to use?

    Thanks.

  • Do you have plenty of free space on the disk(s) on which the msdb data and log files are located?

    John

  • Hello --

    Yes, I did confirm there was enough space on the drive for the backups.

  • No, do you have plenty of space on the disk(s) on which the msdb data and log files are located?

    John

  • Sorry about that. Yes, I did confirm there was enough space.

  • Did you copy/paste the complete error message? Most SQL Server errors include at least an error number, and having the exact text of the error can help.

    Also, you state that there is sufficient free space on the disk where the msdb data and log files are allocated. But is autogrow enabled for msdb? And if not, how much free space is left in the data file?

    If this was a one time issue, and later backups have run without problem, then my guess as to what happened is that perhaps a deadlock occurred and a transaction had to be rolled back. If that is true, then it has not affected any actual backups, but it might have caused data about the backups to be incomplete in the msdb database. And that, in turn, might affect the ability of SSMS to generate a restore script for you.

    Once the next full backup for the same database has been run, this will no longer be relevant.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply