AdventureWorks 2008 Sample Databases Installer Help
Yes, we hear that there are some issues with the current installer. Below is some advice to work around the problems until we can post a new installer which will hopefully correct the issues currently being experienced. Thank you very much for your patience.
If you are having trouble installing AdventureWorks 2008 SR3 sample databases here is some advice which you may find helpful:
- Be logged in as an administrator, or have an administrator grant access to the directories you will be modifying (see below). Be in the sysadmin role on the installation instance.
- Remove all previous releases of SQL Server 2008 AdventureWorks sample databases if present. Actually inspect the DATA directory of the installation instance (exact path depends on the instance, but a typical path is C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA) and make sure any files or directories which begin with "AdventureWorks2008" or "Documents" are removed. If you can't delete files in this directory, try stopping your SQL Server instance first.
- Be sure all prerequisites are installed and configured properly. See Database Prerequisites for details.
- Be sure you have Analysis Services installed. This installer installs all sample databases including the AS sample database.
- If you are running on Windows XP or Windows Server 2003, you may be hitting a windows bug which prevents installation. The current work around is to run SQL Server under an account other than NT Authority\Network Server. Local System works just fine. Use SQL Server Configuration Manager to change the Log On As account of the installation instance. We are working with the Windows team to get a QFE out ASAP that fixes this issue.
- If you are trying to install onto SQL Express, be sure to use SQL Server Express with Advanced Services. The installation approach using the Zip file (described below) is recommended for SQL Express.
- SQL Server 2008 is the only release supported for this installer. Installing on SQL Server 2008R2 is not supported. We're working on separate installers for SQL Server 2008R2 which we also hope will clean up these issues. You can try installing on SQL Server 2008R2 using zip files described below, but you'll need to modify the scripts to do so.
If none of the above advice helps, then try installing using the zip file as described below.
Installing using the zip file
- Follow all the advice presented in the above section. Almost all of it applies to this technique as well, except for requiring Analysis Services to be installed (unless you want to install the AS database!).
- Download SQL2008.AdventureWorks_AllDatabases.zip from http://msftdbprodsamples.codeplex.com/Release/ProjectReleases.aspx, using the open option.
- Extract all files to (typically) *C:\Program Files\Microsoft SQL Server\100\* . The exact destination will depend on how SQL Server was installed.
You can then use the SQL Server Management Studio
(SSMS) GUI or the SQLCMD
console application to install the databases.
SQL Server Management Studio (SSMS) approach
- Start SSMS
- Click File / Open / File...
- Navigate to *C:\Program Files\Microsoft SQL Server\100\Tools\Samples\*
- Navigate to *AdventureWorks 2008 OLTP* , *AdventureWorks 2008 Data Warehouse* , or *AdventureWorks 2008 LT* , depending on which database you wish to install.
- Select the database installation script ( *instawdb.sql* for OLTP, *instawdwdb.sql* for the Data Warehouse, or *instawltdb.sql* for LT). Click Open.
- Connect to the instance where you want to install the database using the Connect To Database dialog which pops up.
- Enable SQLCMD mode (click Query / SQLCMD)
- Locate the part of the script which contains two lines that begin with *--:setvar*
- Uncomment them (remove the *--* part).
- Look at the paths and make sure they are accurate for your instance. For SqlSamplesDatabase path (the first one) if you are not sure, run the following query in the installation instance: *select physical_name from master.sys.database_files where name = 'master'* . The directory part of the result should match, and there should be a trailing backslash (\) after the last part of the directory path. Typically the path in the script is accurate for the default instance. You'll have to modify this if you intend to install to SQL Server 2008R2. The path looks something like *C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\* (note the _50 after MSSQL10). SqlSamplesSourceDataPath should be the directory where you unzipped the files ( *C:\Program Files\Microsoft SQL Server\100\Tools\Samples\* ) with *tools\samples\* added on to the end.
- Click ! Execute
The database should be installed. Repeat for the other databases you wish to install.
This approach is especially useful for SQL Express customers who may not have SSMS installed.
- Start a Command Prompt, running as administrator.
- Type *set SqlSamplesDatabasePath=C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\* , updating the path depending on installation instance (see the path discussion in the SSMS section).
- Type *set SqlSamplesSourceDataPath=C:\Program Files\Microsoft SQL Server\100\Tools\Samples\* , again updating the path as discussed in the SSMS section.
- CD to *C:\Program Files\Microsoft SQL Server\100\Tools\Samples\*
- CD to *AdventureWorks 2008 OLTP* , *AdventureWorks 2008 Data Warehouse* , or *AdventureWorks 2008 LT* , depending on which database you wish to install.
- type *SQLCMD -S* _ServerName_ *-E -i* _ScriptFileName_ where ServerName is the name of your server for the default instance, and the name of your server plus a backslash and the name of your instance for an instance other than the default one. ScriptFileName should be *instawdb.sql* for OLTP, *instawdwdb.sql* for the Data Warehouse, or *instawltdb.sql* for LT.
The database should be installed.
If for some reason all of this fails, and you've follow all the advice in this document, then please file a work item on http://msftdbprodsamples.microsoft.com
under the Item Tracker
tab. Please include operating system, version of SQL Server, any error messages including screen captures or text captured from the command prompt window. Thanks very much!