Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to attach the sample databases, for example, AdventureWorks2012_Data.mdf from codeplex "Adventure Works for SQL Server 2012" into a MS SQL Server 2012 (default) instances on a a virtual machines under MS Windows Server 2008 and MS Windows 7.

Each time I am getting the error:

The header for file 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2012_Data.mdf' is not a valid database file header. The FILE SIZE property is incorrect. (.Net SqlClient Data Provider)

------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.3128&EvtSrc=MSSQLServer&EvtID=5172&LinkId=20476

What can be done to attach the MS SQL Server 2012 sample databases?

Tried to install these sample databases ак the script(s), also always getting the error, the different one, about which I shall ask in a separate question.

share|improve this question
1  
Are you sure your don't simply have a corrupt/mis-downloaded file? –  Mat Sep 22 '13 at 13:10
add comment

1 Answer

up vote 1 down vote accepted

Try downloading from AdventureWorks Databases – 2012, 2008R2 and 2008.

This might be due to corrupt installs.

share|improve this answer
    
Thanks. It has worked though I already reinstalled the server and computer since the question –  Fulproof Nov 19 '13 at 8:18
    
And AdventureWorksDW2012 I could install from AdventureWorksDW Databases – 2012, 2008R2 and 2008 –  Fulproof Dec 15 '13 at 5:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.