DotNet Mirror
  DNM facebook   DNM Google+   DNM Twitter   

install AdventureWorksDW Database on SQL Server2012

By Ashok Nalam on 25 Nov 2013 | Category: SQL Server | Tagged: SQL Server 2012 database 
  Discuss Add Comment   |  
Add rating Rate this resource   
The tip shows how to attach AdventureWorksDW2012 database on SQL Server 2012

Where to Downlaod
Download AdventureWorksDW database from http://msftdbprodsamples.codeplex.com/downloads/get/670502
It downloads AdventureWorksDW2012.zip file to downloads folder. If you extract the zip file, it creates two files(AdventureWorksDW2012_Data and AdventureWorksDW2012_log).

Installation:
Copy the extracted two files(AdventureWorksDW2012_Data and AdventureWorksDW2012_log) to C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER2012\MSSQL\DATA\ (verify the path your instance might be different)

Attach AdventureWorksDW2012 to SQL Server:
SQL Server Instance > DataBases Right Click > Attach... > select MDF file from C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER2012\MSSQL\DATA\AdventureWorksDW2012_Data.mdf. > OK > it creates AdventureWorksDW2012 under databases

Using SQL:
USE [master]
GO
CREATE DATABASE AdventureWorksDW2012 ON 
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER2012\MSSQL\DATA\\AdventureWorksDW2012_Data.mdf' ),
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER2012\MSSQL\DATA\\AdventureWorksDW2012_log.ldf' )
 FOR ATTACH ;
GO

Error:
While attaching database, If you any get any error like "The file "../AdventureWorksDW2012_Data.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed." Do the following resolution.

Navigate to C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER2012\MSSQL\DATA\ > Right click on AdventureWorksDW2012_Data.mdf file > Click “Properties” > Click “Advanced...” > Uncheck “Compress contents to save disk space” > OK
  Discuss Add Comment    
Add rating Rate this resource   
About the Contributor
Member Since : 10 Dec 2012
Member Points (Level) : 9526  (Professional)
Location : INDIA
Home Page : http://dotnetmirror.com
About : I am admin of this site.
Rate this resource
 
Add your Comment
Name Email WebSite
Captcha Refresh


Comments (2)
 
1. By ZAP on 23 Oct 2023

 
2. By ZAP on 23 Oct 2023

 
cheap jordans|wholesale air max|wholesale jordans|wholesale jewelry|wholesale jerseys