Then, executing the above command will work and it will restore AdventureWorks2016.bak file. MOVE N'AdventureWorks2016_Log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\DATA\AdventureWorks2016_Log.ldf', MOVE N'AdventureWorks2016_Data' TO N'C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\DATA\AdventureWorks2016_Data.mdf', Copy the AdventureWorksDW2012Data.mdf file to the Microsoft SQL Server DATA.
Microsoft adventureworks database download 2012 how to#
ldf with logical names, use them as below RESTORE DATABASE AdventureWorks2016 FROM DISK = N'E:\AdventureWorks2016.bak' WITH FILE = 1, How to install the sample AdventureWorks database onto SQL Server 2012. ldf file, so execute the below command RESTORE FILELISTONLY Then you need to try to find the location of. If you are getting error when executing above command like below Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQL2016RTM\MSSQL\DATA\AdventureWorks2016_Data.mdf" failed with the operating system error 3(The system cannot find the path specified.). RESTORE DATABASE AdventureWorks2016 FROM DISK = 'E:\AdventureWorks2016.BAK' Suppose, your AdventuraWorks.bak file is located in "E:\", then your SQL query would be as below If you don't want to use above GUI method, you can directly run the T-SQL query Here is the Gif Image of complete process To Check your SQL server version check here For example if you are trying to install AdventureWorks2017.bak on SQL server 2016 or 2012 then you will get error and you will not be able to restore it. Note: If your SQL server version is lower than AdventureWorks Sample database version, it will throw error. Once the restore is ready, you will screen like belowĬlick OK and Database will be restored completely. Now, right-click on "Databases" and Select "Restore Database"įrom the new pop-up, select "Device"-> "Browse" -> "Add" ( From new pop-up)Ĭlick on "Add"-> Navigate to "E:\AdventureWorks.bak" and Select it, Click "Ok" and the again click "Ok" Once you have downloaded the above file, open your local SQL server Management Studio, using which we will be restoring the above downloaded.
Step 2: Open your SQL server Management Studio and Restore. Once you have downloaded it, open the "Downloads" Folders (Where file is downloaded) and copy/paste it in root folder of D: or E: Drive, basically we are doing this, so we don't get any error related to protection rights. It is around 46.7Mb in Size.ĪdventureWorks2016_EXT.bak (883MB) This is an extended version of AdventureWorks, designed to showcase SQL Server 2016 features I will be downloading AdventureWorks2016.bak for this tutorial. So, this is our first step to download complete sample database of AdventureWorks, there are many SQL server versions of the sample database.
Basically, we will be restoring the AdventureWorks sample database in our local SQL server. In this article, I have explained from where you can download AdventureWorks sample database and congifure it to use in local SQL server database.