SQLServer: Unable to restore database – Msg 5118, Level 16, State 3

Nowadays storage is cheap (relatively) and the problems of shortage of space are less frequent. But sometimes they do happen. And some of these times, someone could think enabling NTFS Folder Compression is a good idea. Maybe it is, but just for one folder and not the whole drive. Especially drive C:.
Well, I have no idea why this ever happened. But Windows will allow you to do so on a folder with a live database (even though it shouldn’t) – at least it will do this if you compress the whole drive. And when you try to restore any database or create a new one on that drive, you will be greeted by this error:


Msg 5118, Level 16, State 3, Line 1
The file "C:\MSSQL\Your_File.ldf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Msg 3119, Level 16, State 1, Line 1
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

To fix it simply disable NTFS compression on the folder used by SQL. Or disable it for the whole drive. Well, never use it in the first place! cya!
Advertisements

About mauriciorpp

Hi, I am Piccolo - but not the one from Dragon Ball. I'm from a highly competitive and fast-paced world too, the IT industry, and this space will be used to share some challenges I face daily on my career. As you will see, I don't do brawls but I need to be a fighter! Stay tuned.
This entry was posted in SQLServer, Windows and tagged , , . Bookmark the permalink.

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