Help: SQL Server

Sharing my knowlege about SQL Server Troubleshooting Skills

Explanation : Error: 5125, Severity: 24, State: 2

Posted by blakhani on December 4, 2014


While playing with log shipping and backup restore, one of my database gone bad and was not coming online. I checked ERRORLOG and found below messages.

2014-11-20 22:16:59.37 spid51s     Error: 5125, Severity: 24, State: 2.
2014-11-20 22:16:59.37 spid51s     File ‘C:\SQLServerData\MyTestLogShippping.ndf’ appears to have been truncated by the operating system.  Expected size is 19325 KB but actual size is 0 KB.

 

The error message is pretty clear and takes away blame from SQL Server. I checked the size of MyTestLogShippping.ndf and it was indeed zero KB. In my case, I was copying the file over the network and something might have gone wrong during that. It is clear that SQL Server checked for “expected” size and “actual” size during recovery of database and if there is a mismatch, above error is logged.

What can be done to fix the issue? Well, restore from backup is option to get out from this situation. Or, if you can get back the original copy of the problematic file (which is close to impossible) then use that for recovery.

If its frequent on your environment then you may need to check if you have some third party tool which is doing disk defragmentation.

hope this helps.

  • Cheers,
  • Balmukund Lakhani
  • Twitter @blakhani
  • Advertisements

    One Response to “Explanation : Error: 5125, Severity: 24, State: 2”

    1. Guru said

      I think the admin of this web site is actually working hard in favor of his website, since here every information is quality based information.

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

     
    %d bloggers like this: