, ,

So, I had an interesting experience today – I was knocking up a basic MVC4 site using the default template and Entity framework code-first because I wanted to do a quick test on validators.

However, the site failed, with a message I’d not seen before.


The file “c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\BlogContext-20130903103345.mdf” is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.

So, it turns out that I was using NTFS file compression on the Program Files directory because the transparent compression it has provided over the years has been very worthwhile. The C: drive on my company machine has limited space, and some applications (I’m looking at you Microsoft) insist on installing a proportion of themselves on the C: drive no matter where you tell them to install.

SQL Express puts its data files under Program Files (why?) and it turns out that the transparent file compression isn’t so transparent – SQL doesn’t like it.

I uncompressed that SQLExpress directory and things worked just like normal.

The moral of the story is that you can’t always trust software which says “trust me, it’s magic” without knowing what is actually going on behind the scenes, even when doing toy proof of concept stuff!