About this release
This release consolidates AdventureWorks databases for SQL Server 2012, 2008R2 and 2008 versions to one page. Each zip file contains an mdf database file and ldf log file. This should make it easier to find and download AdventureWorks databases since all OLTP versions are on one page. There are no database schema changes.
For each release of the product, there is a light-weight and full version of the AdventureWorks sample database. The light-weight version is denoted by the LT abbreviation in the filename.
An AdventureWorks database can be installed by attaching the database, or using the CREATE DATABASE statement.To attach an AdventureWorks database
CREATE DATABASE statement
- Download a database for your SQL Server version.
- Unzip the database (mdf) file and log (ldf) file.
- From Microsoft SQL Server Management Studio, connect to a SQL Server instance.
- Right click Databases.
- Click Attach.
- Click the Add button.
- Locate the AdventureWorks database mdf file. For instance, AdventureWorks2012_Data.mdf.
- Click the OK button on the Locate Database Files dialog window.
- Click the OK button on the Attach Databases dialog window to attach the database.
From SQL Server Management Studio, execute the following T-SQL:Example T-SQL
CREATE DATABASE AdventureWorks2012 ON (FILENAME = 'M:\Data\AdventureWorks2012_Data.mdf'), (FILENAME = 'L:\Tlogs\AdventureWorks2012_Log.ldf') FOR ATTACH;