AdventureWorks 2008 Sample Databases Installer Help
In response to your feedback we've posted an updated installer which we hope will address your concerns.
If you are having trouble installing AdventureWorks 2008 SR4 sample databases here is some advice which you may find helpful:
- CodePlex is having some issues with downloads. They are aware of this issue and plan to fix it in the next release. Meantime, they suggest trying the download from http://msftdbprodsamples.codeplex.com/Wikipage. If the security bar pops up mentioning downloads are blocked and you give permission to download, you may need to click on the download again to restart the download for it to succeed.
- 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 2005 and 2008 AdventureWorks sample databases if present. Actually inspect the DATA directory of the installation instance (the 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 "AdventureWorks" 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.
- Windows Server 2008 and Windows Server 2008R2 are secure by default, which can interfere with downloading some kinds of software installation packages including the sample database installer. See the documentation for your operating system for information on overcoming these limitations. In particular, it is helpful to turn off IE Enhanced Security Configuration. For Windows Server 2008 R2 this can be done using the Server Manager.
- 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 Service. 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.
- If you are trying to install onto SQL Express when using Vista, sometimes Filestream is not enabled on the instance of Express even though it appears to be configured correctly. It seems that enabling Filestream and restarting the instance isn't enough. That is, it sets the filestream configuration to enabled but doesn't actual change the running value of the Filestream property.
To confirm that filestream is actually enabled as a running value (instead of a configured value), you can run this query:
SELECT SERVERPROPERTY ('FilestreamConfiguredLevel'),SERVERPROPERTY ('FilestreamEffectiveLevel');
If the values return are 0, filestream is not enabled.
Here's how to fix this.
- Log on to the machine with an administrator account.
- Run SQL Server Configuration Manager as administrator. (Right-click Configuration Manager and select Run as administrator).
- From Configuration Manager, right-click the SQLServer(SQLExpress) instance (or the name of your Express instance if you didn't use the default name) and selected Properties.
- Click the Filestream tab and check the box for Enable Filestream For Transact-SQL access. You can check or skip the other check boxes, they're not required.
- Run SQL Server Management Studio as administrator (Right-click SQL Server Management Studio and select Run as administrator).
- Click New Query and in the query editor run the following code:
EXEC sp_configure filestream_access_level, 1
It will prompt you to run RECONFIGURE again. Select the RECONFIGURE statement and click Execute.
Run the SELECT SERVERPROPTY statement again. It should return the value 1 in both columns.
- This installer is for SQL Server 2005 and SQL Server 2008 sample databases. If you need SQL Server 2008R2 sample databases, the installer is located here.
Manually creating databases
- Follow all the advice presented in the above section. All of it applies to this technique as well,
- 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 SqlSamplesDatabasePath (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.
- 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.
Deploy the AS Database
- Open the appropriate AS database solution for your edition of SQL Server (typically C:\Program Files\Microsoft SQL Server\100\Tools\Samples\AdventureWorks 2008 Analysis Services Project\enterprise\Adventure Works.sln for enterprise and developer editions, and C:\Program Files\Microsoft SQL Server\100\Tools\Samples\AdventureWorks 2008 Analysis Services Project\standard\Adventure Works.sln for standard edition in BI Development Studio. If you don't have BI Development Studio then your edition of SQL Server may not support this database.
- Click right on Adventure Works DW 2008 in the solution explorer then click Deploy.
If for some reason all of this fails, and you've followed all the advice in this document, then please file a work item on http://msftdbprodsamples.codeplex.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!