Installing Microsoft SQL Server AdventureWorks Sample Data

Leave a comment

Microsoft provides sample SQL Server databases called AdventureWorks. You can download the files from the CodePlex website for your relevant SQL Server version here – http://msftdbprodsamples.codeplex.com/.  You can then attach the databases to your SQL Server instance. To do this, copy the files to a location on the SQL Server and run the following command:

CREATE DATABASE [AdventureWorks2012] ON (FILENAME = N’C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2012_Data.mdf’)
FOR ATTACH_REBUILD_LOG
GO

CREATE DATABASE [AdventureWorksDW2012] ON (FILENAME = N’C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorksDW2012_Data.mdf’)
FOR ATTACH_REBUILD_LOG
GO

Once complete, the sample databases will be installed.

 

 

Carl de Souza
Keep learning. Keep building.

Explore AI, agents & Microsoft technology.

I share practical ideas, tutorials, and videos about AI, AI agents, Microsoft technologies, and the Power Platform.

Subscribe on YouTube →
Carl de Souza Enterprise Architect at Microsoft · AI Technology Expert

Leave a Reply

Your email address will not be published. Required fields are marked *