Running Setup to Install AdventureWorks Sample Databases and Samples

The AdventureWorks (OLTP), AdventureWorksDW (data warehouse), and Adventure Works DW (analysis services) sample databases, as well as the companion samples, are not installed by default in SQL Server 2005. You can download these from SQL Server 2005 Samples and Sample Databases at the Microsoft Download Center, or you can use the following procedures to install the sample databases and samples during or after setup. Additional instructions for deploying the Adventure Works DW analysis services project are also provided.

Note

The following procedures do not apply to SQL Server 2005 Express Edition or SQL Server Compact Edition. To download AdventureWorks for these editions, see SQL Server 2005 Samples and Sample Databases at the Microsoft Download Center.

Important

When the AdventureWorks and AdventureWorksDW sample databases are installed, the collation used is SQL_Latin1_General_CP1_CI_AS and not the collation selected for the instance of SQL Server. To change the collation of a sample database to match the server collation, drop the database and recreate it from the installation script. For more information, see Reinstalling Sample Databases from Script.

Installation During Setup

To install the sample databases and companion samples during setup, use the following instructions.

  1. On the Components to Install page, select Workstation components, Books Online and development tools.

  2. Click Advanced and then expand Documentation, Samples, and Sample Databases.

  3. Select Sample Code and Applications.

  4. Expand Sample Databases and then select the sample databases to install.

    Note

    The OLAP database (Adventure Works DW) cannot be installed unless the data warehouse (AdventureWorksDW) database is selected for installation. The analysis services project, Adventure Works DW must be deployed before the Adventure Works DW analysis services database can be accessed.

  5. To complete the installation of the samples, after setup, perform one of the following steps:

    1. From the Start menu, click All Programs, click Microsoft SQL Server 2005, click Documentation and Tutorials, click Samples, and then click Microsoft SQL Server 2005 Samples.
    2. Alternatively, using Windows Explorer, navigate to <drive>:\Program Files\Microsoft SQL Server\90\Tools\Samples\ and double-click SqlServerSamples.msi to launch the installer.

    Important

    The samples are installed to <drive>:\Program Files\Microsoft SQL Server\90\Samples. Be sure to read and follow the installation instructions in the Readme files that accompany the samples you want to use. For a list of samples, see Samples.

Installation After Setup

If you did not install the sample databases or samples during the initial setup of SQL Server 2005, you can install them later.

Important

You cannot use the following procedure to re-create a sample database that has been deleted. To re-create a deleted sample database, reinstall the database from the installation script. For more information, see Reinstalling Sample Databases from Script.

  1. From Add or Remove Programs, select Microsoft SQL Server 2005 and click Change. Follow the steps in the Microsoft SQL Server 2005 Maintenance wizard.

  2. From Component Selection, select Workstation Components and then click Next.

  3. From Welcome to the SQL Server Installation Wizard, click Next.

  4. From System Configuration Check, click Next.

  5. From Change or Remove Instance, click Change Installed Components.

  6. From Feature Selection, expand the Documentation, Samples, and Sample Databases node.

  7. Select Sample Code and Applications.

  8. Expand Sample Databases and then select the sample databases to be installed. Click Next.

  9. To install and attach the sample databases, from Sample Databases Setup, select Install and attach sample databases, and then click Next.
    The database files are created and stored in the folder <drive>:\Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\Data. The database is attached and ready for use.

  10. To install the sample database files without attaching, from Sample Databases Setup, select Install sample databases without attaching, and then click Next.
    The AdventureWorks database files are created in the folder <drive>:\Program Files\Microsoft SQL Server\90\Tools\Samples\AdventureWorks OLTP. AdventureWorksDW files are created in the <drive>:\Program Files\Microsoft SQL Server\90\Tools\Samples\AdventureWorks Data Warehouse folder. You must attach the database before you can use it. For more information, see Detaching and Attaching Databases.

  11. Select the instance of SQL Server on which to install the sample databases and samples.

  12. Complete the steps in the wizard.

  13. To complete the installation of the samples, after setup, perform one of the following steps:

    1. From the Start menu, click All Programs, click Microsoft SQL Server 2005, click Documentation and Tutorials, click Samples, and then click Microsoft SQL Server 2005 Samples.
    2. Alternatively, using Windows Explorer, navigate to <drive>:\Program Files\Microsoft SQL Server\90\Tools\Samples\ and double-click SqlServerSamples.msi to launch the installer.

    Important

    The samples are installed to <drive>:\Program Files\Microsoft SQL Server\90\Samples. Be sure to read and follow the installation instructions in the Readme files that accompany the samples you want to use. For a list of samples, see Samples.

Deploying the Adventure Works DW Analysis Services project

  1. Make sure that the AdventureWorksDW and Adventure Works DW databases have been installed.
  2. Make sure Analysis Services has been installed.
  3. From the SQL Server Business Intelligence Development Studio toolbar, click File, point to Open, and then click Project/Solution.
  4. Browse to <drive>:\Program Files\Microsoft SQL Server\90\Tools\Samples\AdventureWorks Analysis Services Project, select the file Adventure Works.sln, and then click Open.
  5. From Solution Explorer, right-click Adventure Works DW and select Deploy or Process.

See Also

Tasks

Reinstalling Sample Databases from Script

Concepts

Downloading Northwind and pubs Sample Databases

Other Resources

Installing Samples
Installing AdventureWorks Sample Databases and Samples

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

17 July 2006

New content:
  • Added a link to the SQL Server 2005 Samples and Sample Databases download page.

5 December 2005

New content:
  • Added SQL Server 2005 Express Edition and SQL Server Compact Edition note.
Changed content:
  • Corrected user interface references.