Install Adventure Works 2014 OLTP database from a backup
The Adventure Works 2014 OLTP database can be installed by restoring a database backup.
-
Download the
Adventure Works 2014 Full Database Backup.zip
.
-
From File Download, click Save.
Once it is saved,open the folder.
-
Extract the AdventureWorks2014.bak file to a location on your local server.
Note:The default 64-bit
path is C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup. Use C:\Program Files (x86)\... for 32-bit SQL Server 2014
-
From SQL Server Management Studio connect to the 2014 instance.
-
On the Standard toolbar, click the New Query button.
-
Execute the following code in the query window:
Note:The file paths in
the scripts are the default paths. You may need to update the paths in the scripts to match your environment.
USE
[master]
RESTORE
DATABASE
AdventureWorks2014
FROM disk='C:\Program
Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup\AdventureWorks2014.bak'
WITH
MOVE
'AdventureWorks2014_data'
TO
'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\AdventureWorks2014.mdf',
MOVE
'AdventureWorks2014_Log'
TO
'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\AdventureWorks2014.ldf',
REPLACE
As an alternative to steps 5 and 6, you can restore the database using the SQL Server Management Studio user interface. For
more detailed information, see Restore a Database Backup
(SQL Server Management Studio).