Installing Sample Databases

To install all the sample databases for SQL Server 2008 perform the following steps:
  1. Using the object explorer in SSMS delete any earlier version of the AdventureWorks sample databases you may have installed.
  2. Using the file explorer ensure all .MDF and .LDF files have been deleted from the data directory for all sample databases in the instance you will be installing the new sample databases. For the default instance, the path to the data directory for OLTP, LT, and DW sample databases is typically C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA.
  3. Navigate to and respond to all the dialogs presented by the installer as detailed below.

Click one of the Windows Installer (.msi) links in the highlighted area of the samples database download page based on the architecture of the machine which will be running the installer.

Click the Run button for the File Download - Security Warning dialog

Click the Run button for the Internet Explorer - Security Warning dialog

Click the Next button on the Welcome page of the installer.

Click the license agreement check box, then click the Next button.

Click the Next button of the Custom Setup dialog.

Use the pull down selector to choose the instance to install the sample database in. Be sure to read all the content in this dialog. Then press the Next button.

Click the Install button on the Ready to install dialog.

Cannot resolve image macro, invalid image name or id.
This dialog will appear to indicate installation progress. On Vista, a User Access Control dialog may appear asking for administrator permission. Be sure to grant permission in this dialog if it appears. When the installation is complete, click the Finish button.

Last edited Dec 16, 2008 at 12:27 AM by bonniefe, version 2


13817824120sh Jul 2, 2011 at 3:24 AM 
i Extract the .exe file using WinRAR or winzip in a specified folder.
but i didnt see any .mdf or .idf files,i see many folders like AdventureWorks 2008 Analysis Services Project,AdventureWorks 2008 Data Warehouse,AdventureWorks 2008 LT,AdventureWorks 2008 OLTP...still dont know how to install...

13817824120sh Jul 2, 2011 at 3:16 AM 
I was never able to get the installer to work due to A fatal error occured during installation. Details: Object reference not set to an instance of an object."? i have a windows XP...

uwa Apr 15, 2011 at 3:49 PM 
Hi All,
I am a new comer to SQL Server 2008 or any SQL server at all. I am still learning the installation process. I downloaded and installed the AdventureWorks database. It completed without any error, but then, the database did not show up in the SQL Server Management Studio. I tried to manually run the "instawdwdb.sql" but I got errors. Not knowing exactly what to do, I decided to run the "C:\Program Files\Microsoft SQL Server\100\Tools\Samples\DatabaseInstaller.exe". It executed without error and the Adventureworks database is now intsalled. Everything seems to be working so far. It would seem that when I ran the AdventureWorks-SR4.exe, only the file extraction was done, it did not install the database. I hope this information is useful to somebody out there. I equally hope that I have not misrepresented what actually happened behind the scene. I leave it to the experts to explain. Thanks. By the way, I am using SQL server 2008 Enterprise edition x64.

PatrickLambin Feb 12, 2011 at 10:26 PM 
This old installer is working smoothly and is quick
Thanks and cheers for Bonniefe and all the people who have worked on it
I have checked the pre-requisites ( especially for FileStream ) , it is why i had no problem to do the install on my old XP SP3 with SQL Server Express 2008 RTM

nepalisql Dec 29, 2010 at 5:07 AM 
Here are the steps if you get a error such as "Object reference not set to an instance of an object"
1.0) Extract the .exe file using WinRAR or winzip in a specified folder.
2.) Once you extract it, you can see .mdf and .ldf files, You can attach those files and you are all set to go.
:). Merry christmas and Happy new year

santai May 21, 2010 at 2:06 PM 
I have installed successfully the AdventureWorks sanple database. However, I can not see the AdventureWorks on my SQL server management studio. When I clik Database nothing in there. Anyone have ant idea why this happens?? I need this database for my assignment. Thanks

ctatum Apr 15, 2010 at 11:36 AM 
I'm running Windows XP everything set as directed. But, I'm getting this error below. There only one user account, which is the admin. So, what's the problem. ...Why does that database need an additional directory. None of the other databases. I have tried everything I know and ask some people as well. Someone please enlighten me

Installation started at 4/15/2010 6:45 AM.
Copying scripts and CSV files to C:\Program Files\Microsoft SQL Server\100\Tools\Samples\.
Script copying succeeded.
Beginning installation of database AdventureWorks2008 on 4/15/2010 6:47 AM.
Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)
Jul 9 2008 14:43:34
Copyright (c) 1988-2008 Microsoft Corporation
Enterprise Evaluation Edition on Windows NT 5.1 <X86> (Build 2600: Service Pack 3)

Started - 2010-04-15 06:47:10.920

*** Dropping Database

*** Enabling FileStream
Configuration option 'filestream access level' changed from 2 to 2. Run the RECONFIGURE statement to install.

*** Creating Database
Error: Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER1\MSSQL\DATA\Documents". Operating system error -2147024891: "0x80070005(Access is denied.)".
Installation Terminated
Finished installation of database AdventureWorks2008 on 4/15/2010 6:47 AM.

GaryWithRockton Apr 10, 2010 at 1:49 AM 
Wow, this was a PITA. So many of us read what to do about FreeText and FileStream but when you install and you do not get the primary database we all want, the AdventureWorks2008 database, then what? I tried everything a dozen times and like many of us, I got all the databases I didn't care about but I did not get the one I needed, the AdventureWorks2008 database so that the sample SSRS reports would work without errors like field BusinessEntityID cannot be found.

All the other databases install just fine and the reason the AdventureWorks2008 database does not install can be found in the event viewer.

FCB::Startup () failed: Could not open file C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Documents for file number 65537. OS error: 0x80070005(Access is denied.).

Now tells you this might be an issue. And they say …

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.

However when I tried to use the Local System user account, I would get an error …
“A new member could not be added to a local group because the member has the wrong account type.” To which I could not find a decent solution to anywhere so I went on to trying other things.

That was the mistake. Set the Log On As account to the domain administrator and run the exe again and you will get your AdventureWorks2008 database so you can move on and finally get some work done. Ridiculous IMHO.

msusanearle Apr 9, 2010 at 5:00 PM 
I installed this release without a hitch BUT when I go to deploy the analysis services I get a notice saying that the solution is in a directory that the application does not have permission to work in. When I try and grant permission using the User Account control feature of the operating system it still won't let me grant permissions. I am the admin. I have logged in as admin. What do I need to do to fix this?

ctatum Mar 23, 2010 at 6:40 PM 
Installation is successfull .but i did not get Adventureworks2008 database .adventureworks,adventureworksDW2008 are there. What must I do to get the that db to be added. Please, help..

dudeman1963 Mar 23, 2010 at 2:57 PM 
I was never able to get the installer to work due to A fatal error occured during installation. Details: Object reference not set to an instance of an object."? - but i was able to download - and attach to the sample db that way

Aad1970 Mar 11, 2010 at 11:25 AM 
Are there any solutions on the error: "A fatal error occured during installation. Details: Object reference not set to an instance of an object."?
My machine runs Windows 7 Enterprise with SQL Server 2008 SP1. This error pops up after clicking NEXT at the Licence screen.

ravishenoy_x13 Feb 9, 2010 at 5:44 AM 
i am getting the same error as mstavra. i have a windows server 2008 r2 standard, sql server 2008 enterprise evaluation version. whilst installing the adventure works i get a fatal error.

any recommended solutions?

annapoorani_muthu Jan 28, 2010 at 10:44 AM 
Installation is successfull .but i did not get Adventureworks2008 database .adventureworks,adventureworksDW2008 are there.

i used adventureworks2008_sr4

parishcdattnet Jan 26, 2010 at 6:31 PM 
Worked like a charm. No issues.

Cedric Parish

edzatarin Jan 18, 2010 at 12:56 PM 
I have Windows Vista Premiun and SQLServer 2008, all x86. I followed these instructions and the installation ocurred perfectly for me too.

mstavra Jan 14, 2010 at 11:30 AM 
I have a windows server 2008 r2 standard, sql server 2008 enterprise sp1 and when i try to install adventureworks2008_sr4 after license aggreement i get the following error:
A fatal error occured during installation. Details: Object reference not set to an instance of an object.

I have filestream enabled and all the sql server services up. What am i doing wrong? :/

wikigrl Jan 5, 2010 at 5:01 AM 
I followed these instructions, and pictures, and everything matched up. Installation worked perfectly for me - Window 7 x64 running SQL Server 2008 (64-bit). Thanks!

nachid Oct 31, 2009 at 5:47 PM 
What someone should do when he gets an error message saying
"The setup wizard ended prematurely because of error"
Why on the hell this is so difficult?

trcoley Oct 24, 2009 at 2:20 AM 
I have SQL Server 2008 x64, apparently an Express edition, so I cannot use these samples.
Can you update the prerequisites instructions to describe how to "upgrade" to Express with Advanced Services without destroying my current development environment?

Bodica Oct 21, 2009 at 9:18 AM 
I installed SQL 2008 Standard on Windows XP Professional SP3 on my laptop. I can't install the SQL2008.AdventureWorks_All_databases.x86.msi - when I choose the default instance MSSQLSERVER(Engine) the NEXT button doesn't activate. Can anyone help me how to fix it? All prerequisites are fulfilled:Full text search,Filestream enabled,Full-text filter Daemon Lancher running.

mcastel Oct 14, 2009 at 6:29 PM 
Executed SQL2008.AdventureWorks_All_Databases.x64.msi on SQL Server 2008 x64 Developer Edition. Install was quick and simple without any issues. Thanks.

paul60135 Oct 8, 2009 at 10:23 PM 
I have found a solution, keep my project in Oracle

lcknarr Sep 20, 2009 at 2:23 AM 
I am learning SQL Server 2008 and have been trying to download the Express version all day. I have just done a download for the 3rd time today. Before I tried this latest version I removed everything, including the Web Platform Installer and cleaned up the registry.

I am able to connect to the system tables in the Management Studio, but I cannot download the Adventureworks database. I keep getting the error “full-text search” missing even though I downloaded the “runtime with advanced services” version that say it comes with “full-text search”. I have tried the suggestions on the AdventureWorks download site, but nothing has worked.

What do I need to do to get this set up correctly? I had SQL Server 2005 – from a CD – and had no problems. I really don’t want to go back to that version.

adamcl Aug 24, 2009 at 2:19 PM 
I've been working my way through the Analysis Services tutorial which usd the AdventureWorks DB. At the start of lesson 4 it requires you to open the lesson 4 tutorial.sln in: C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\Tutorials\Lesson4 Start. It says if this file does not exist, you should install the samples found on codeplex. I cannot find the actual tutorial samples anywhere on this site, only the generic AdventureWorks installer. After reinstalling the .msi several times as well as downloading the .zip, I cannot find these these tutorial samples. During the .msi installation I made sure the Samples option was definitly enabled. Can anyone help me with this issue?

AKCodeRat Jul 17, 2009 at 11:00 PM 
The AdventureWorks20008 database did not install with this package. When I download the zip files and try to install it I get the following error.
*** Creating Database
Msg 5120, Level 16, State 106, Line 2
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Documents". Operating system error -2147024891: "0x80070005(Access is denied.)".
** An error was encountered during execution of batch. Exiting.

FileStream is enabled, as well as, full text index.

Anyone have any ideas that could help me out?

ChrisJ Jul 9, 2009 at 5:43 PM 
Received "An unhandled win32 exception occurred in SQLCMD.exe[2320]" (a few times). The install said it was successful, but the databases were not created.

bonniefe Jul 1, 2009 at 11:44 PM 
We've now added detailed instructions for configuring the prerequisites for the sample databases. Hopefully this addresses some of the concerns raised in these comments.

just_a_guy Jun 1, 2009 at 3:03 PM 
Hi, I think another option for Microsoft to consider is removing the option for "Tool"
for SQL Express 2008. The "Tools" option does not come with Full-text-indexing.
That is the version I downloaded and installed. I read that Full-text_indexing is now the
default configuration for SQL Server. This is probably why the TUTORIAL sample database
is looking for Full-text-indexing. To prevent hours of research by other persons, the Tools
option should just be deleted (or at least explain on the Tools option that the Sample database will not function and recommend using the "Advanced" option if you expect to use the sample database).

Just a thought.

snowdon May 8, 2009 at 7:03 AM 
Hi, I think it would be wise to note at the top of the installation instructions, that it you're running the Express version, as I think is the case with many people downloading these databases, that you need Advances Services. Or, make a "lighter" version of the install, which doesn't require these services.

Zalakain May 7, 2009 at 5:50 PM 
Hi there, yep in my case the installer failed too. Instead of running "instawdwdb.sql" you can also run CreateAdventureWorks.cmd which will do the job fine. It should be located at C:\Program Files\Microsoft SQL Server\100 (W7 in my case, Vista should be the same) then launch it passing the following params: 1. the Id of your DB (ex. PC1\SQLEXPRESS); 2. the path to the insta*.sql folder (ex. "C:\Program Files\Microsoft SQL Server\100\Tools\Samples\"); 3. and the location where the .mdf files should be created (ex. "C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\").

jackinthegreen May 7, 2009 at 1:47 PM 
To get the Full Text Search feature in express 2008, you need the Microsoft® SQL Server® 2008 Express with Advanced Services , then just follow Doobs instuctions.

I also see no DB after the install, though,like d1m0s. Guess I'll run that script

MBhutta Apr 22, 2009 at 5:38 PM 
I had errors messages during installation and did not let me complete the installation. Error "PrepInstance() cannot proceed because the selected instance was not running and could not be started successfully" Please Help Thanks.

rdmorris Apr 21, 2009 at 4:30 PM 
Had the same problem as d1m0s - ran the msi, no errors reported. However no Adventureworks db created either. Attempting to run instawdwdb.sql script manually gave lots of errors.
Any suggestions?

lparkerjr Apr 14, 2009 at 3:49 PM 
I received the same error as Meister1867. I am also using SQL Express 2008. Doobs' solution did not work for me, because I have no "SQL Full-text Filter Daemon Launcher" service . Any other solutions?

d1m0s Mar 19, 2009 at 1:27 PM 
I had no errors or other messages during installation. The problem was that the installer did not create AdventureWorksDW2008 database. Thus I had torun instawdwdb.sql manually.

Doobs Jan 27, 2009 at 4:09 PM 
I saw this message after my recent install of Enterprise Edition. The way I solved it was to go into Administrative Tools\Services, and set the "SQL Full-text Filter Daemon Launcher" service to start automatically. This was disabled after the installation completed, and is needed to run Full Text Searching. Hope that helps!

Meister1867 Jan 24, 2009 at 12:31 AM 
As with many people, we receive an error message about installing the DB due to Full-Text Search not being enabled. How can this be enabled? I've been searching to see if there's a site to explain how to do this, but it seems like nothing works. I should mention I'm using SQL Express 2008.