Walkthrough: Installing the AdventureWorks Database
This walkthrough shows how to install the AdventureWorks2008 sample database on your local machine, which is a prerequisite for other walkthroughs provided in the ReportViewer documentation. AdventureWorks2008 is not automatically installed with SQL Server or SQL Server Express, but can be downloaded from Codeplex. You can use the instructions provided in this walkthrough to download, install, and configure a connection to the AdventureWorks2008 database.
To successfully install the AdventureWorks2008 database, you must have installed the full-text search feature and enable FILESTREAM for your SQL Server 2008 R2 instance. If you want to use SQL Server 2008 R2 Express, be sure to install the SQL Server 2008 R2 Express with Advanced Services edition with the full-text search feature and with FILESTREAM enabled. You can download SQL Server 2008 R2 Express with Advanced Services from the Microsoft Download Center.
To learn more about using the AdventureWorks2008 sample database, you can search for "AdventureWorks Sample OLTP Database" in SQL Server Books Online.
You must have a SQL Server instance installed on your local machine for which you have permissions. If you installed SQL Server 2008 R2 Express with Advanced Services, the default instance name is (local)\sqlexpress.
The following steps describe how to download, save, attach, and configure the AdventureWorks2008 database.
To install AdventureWorks 2008 sample database
Navigate to this Codeplex download page, and then click the Downloads tab.
Download and run the latest version of the SQL Server AdventureWorks2008 database.
Follow the prompts of the installation wizard and choose the SQL Server instance to install the AdventureWorks OLTP 2008 sample database.
When the installation is complete, the current user will be added as an owner to the AdventureWorks2008 database and will have read access to the database. This allows the Web pages in the walkthrough projects to access the database because the ASP.NET development server that you will use to run the walkthrough projects executes the Web pages in the security context of the current user. For more information on the ASP.NET development server, see Web Servers in Visual Studio for ASP.NET Web Projects.
If you create a Web application in a Web site in IIS, the default security context of the ASP.NET process that runs the Web pages depends on the IIS version. For more information, see Accessing SQL Server from a Web Application.
You have now installed and configured the AdventureWorks2008 database and can proceed to the ReportViewer walkthroughs that use it as a data source: Walkthrough: Creating a ReportViewer Report, Walkthrough: Using a Database Data Source with the ReportViewer Windows Forms Control in Local Processing Mode, and Walkthrough: Using a Database Data Source with the ReportViewer Web Server Control in Local Processing Mode.