Question: I had SQL Server Express 2008, 2008 R2, and 2012 RC0 installed when I created an `.mdf` file. Now I cannot open it in 2008 R2. How can I check which version the file is, if I don't have 2012 RC0 installed anymore?

I removed all SQL Server versions from the computer and reinstalled 2008 R2. Looking through other posts, I see that I probably should have "detached" the database file first, but I did not know that at the time.

Answer: 
[How to determine the database version of an MDF file](http://rusanu.com/2011/04/04/how-to-determine-the-database-version-of-an-mdf-file/):

> 
> the version of the MDF will be the DWORD value at offset 0×12064 in
>  the file.
> 
> 
>
Files are not versiones by express or not - only by file version / sql server version.

All the ones you name are downward compatible (2001 R2 opens a 2008 file and updates it). At the end thus.... it has to be 2012 RC0 if it is not able to be opened with 2008 R2. Simple logical elimination, no file check needed.