-3

I have SQL Server 2014 on my Windows 8.1 Pro machine. However, I couldn't find any sample database for 2014 version and hence I am trying to attach AdventureWorks2012_Data.mdf file by right clicking the database on my SSMS's database icon in object explorer, and I couldn't navigate to the location to where the file actually exists.

Is there any database available which is compatible with 2014 version? I believe SQL Server 2012 can't be installed on Windows 8 as per the specs mentioned here

Please let me know how should I solve this problem?

6

I couldn't find any sample database for 2014 version

The AdventureWorks sample databases (including 2014) can be downloaded from CodePlex.

I believe SQL Server 2012 can't be installed on Windows 8

The download page you reference lists Windows 7 as a requirement for 2012 Express. These pages aren't always updated when a new version of Windows is released. In fact, SQL Server 2012 Express, Standard, and Developer are supported for installation on Windows 8.

I couldn't navigate to the location to where the file actually exists

If you run sp_helpfile in the master database on your SQL Server 2014 instance, this will tell you where your main database files are, e.g.:

Screenshot

Copy your extracted AdventureWorks.mdf file to that location, then attempt to attach. That should work. The reason you probably can't 'see' the directory you want is that SQL Server does not have access to it. You might also try running SSMS as an administrator.

Alternately, grant the SQL Server service account access to the current location of your .mdf file and script the CREATE FOR ATTACH:

CREATE DATABASE AdventureWorksDW2012 ON
(FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\DATA\AdventureWorksDW2012_Data.mdf' )
FOR ATTACH

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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