The following changes have been made in the design of AdventureWorks2008:
  • The way people and businesses are represented has changed. Some tables have been added, renamed, and deleted. These changes enable better integration with the Microsoft ADO.NET Entity Framework.
  • New data types and attributes are now demonstrated in the database including:
    • date and time
    • hierarchyid
    • geography
    • filestream
  • Integrated full-text support has been incorporated into the database.
The schema introduces the idea of a business entity. A business entity is a person or business which has zero or more addresses and zero or more people related to it. For example, the people related to a store would typically be purchasing agents of a retail sporting or bicycle store who buy bicycles wholesale from AdventureWorks Cycles. A person related to an employee might be the employee’s emergency contact. All business entities have a common key (the BusinessEntityID). This allows us to build a conceptual model using the Entity Framework which demonstrates table per type inheritance. It also simplifies the schema by having a single table (Person.BusinessEntityAddress) relate addresses to business entities instead of using specialized tables (for example CustomerAddress, VendorAddress, EmployeeAddress.

The concept of a customer has also been broadened. In AdventureWorks for SQL Server 2005, a customer is either a store (wholesale) or an individual (retail). In AdventureWorks2008, a customer can be any person or a store. This enables employees (for example) to be customers without storing redundant information about them.

The hierarchyid data type is used to organize employees and their managers into a tree, and organize production documents into a tree (much like a file system).

The date and time data types are used instead of the datetime data type when appropriate (date for columns like HireDate in the HumanResources.Employee table, and time for columns like StartTime in HumanResources.Shift table).

The integrated full-text feature of SQL Server 2008 is used to demonstrate full-text querying over resumes stored in the HumanResources.JobCandidate table.

Fictitious addresses stored in the Person.Address table have been fictionally geocoded and the result stored in the SpatialLocation column to demonstrate the new spatial features in SQL Server 2008.

For specific information about these changes an entity relational diagram showing the conceptual model of business entities, a relational schema diagram, a Transact-SQL script and the CSV data files necessary to build the database are included in the AdventureWorks2008Scripts.msi installer located in The Sample Databases at CodePlex project.
AdventureWorks 2008 Installation
To install AdventureWorks2008 perform the following steps:

1. Download and invoke the appropriate installer from The Sample Databases at CodePlex. The appropriate installer will have “2008” in the name and the name will match the machine architecture of the machine on which you will be installing the samples. For example AdventureWorks2008.msi will work on x86 machines, and AdventureWorks2008_x64.msi will work on x64 machines.

2. Follow the directions on the installer screens.

3. A backup of the database and any schema diagrams will be installed by default into the systemdrive:\Program Files\Microsoft SQL Server\100\Tools\Samples where systemdrive represents the disk drive letter of the disk where you installed windows.

4. If you have not already enabled the file stream feature, execute the following statement in SQL Server Management Studio (SSMS):
EXEC spfilestreamconfigure @enable_level = 3;

5. Use to restore the database or use a Transact-SQL command similar to the following in SQLCMD or SSMS (where systemdrive is replaced with the appropriate drive letter):
RESTORE DATABASE AdventureWorks2008
FROM DISK = 'systemdrive:\Program Files\Microsoft SQL Server\100\Tools\Samples\AdventureWorks2008.bak';

Last edited Feb 27, 2008 at 8:33 PM by bonniefe, version 5

Comments

mtrahan Aug 7, 2011 at 11:29 PM 
I am running Win 7 64x SQL 2008R2 .....There are some issues with these installs.... I was unable to get filestream working ... I have even ran the MS Hot fix for the service pack but that did not work for me. So I downloaded the Adventureworks that does not use filestream and am now getting this error: The database 'AdventureWorks2008R2' cannot be opened because it is version 661. This server supports version 662 and earlier. A downgrade path is not supported.

*** Any help would be greatly appreciated *** Thanks mtrahan17@cox.net

bangarraju Nov 10, 2010 at 5:56 AM 
I am getting an error while installing the AdventureWorks2008R2_RTM.exe:
Failed Object Initilization (ISupportInitilize.EdnInit). An exception occurred while executing a Transact SQL statement or batch. Error at object'Databse Selection' in markup file, DatabseInstaller/component/databseselection.xaml' line 78 position 3.

Can any one help me what to do.

Bangarraju

m.bangarraju@gmail.com

naveedqadri Sep 22, 2010 at 5:50 AM 
AdventureWorks2008_SR4, while installation produce following error: A fetal occurred during Instalation Detail:Failed Object Initilization (ISupportInitilize.EdnInit). An exception occurred while executing a Transact SQL statement or batch. Error at object'Databse Selection' in markup file, DatabseInstaller/component/databseselection.xaml' line 78 position 3, what should i do , keep in mind i ve log on in administrative mode.
Naveed
Malaysia

MickySmig Jun 7, 2010 at 1:48 PM 
Hi,

I'm relatively new to databases and I have a problem. I've recently purchased the book 'Pro Entity Framework 4' and it requires that I use the adventureworks database in order to complete the code samples. The problem is that it needs the adventureworks database before the schemas had been updated.

Does anyone know where there is a site that has all of the previous versions of the adventureworks databases, as I've downloaded every version that Microsoft has to offer and non of them are the right one.

Many thanks in advance for the help.

mzahedi Feb 4, 2010 at 12:54 AM 
I downloading the advature2008 , but I am not able to install it .

paul60135 Oct 8, 2009 at 11:18 PM 
I cannot get adventureworks db installed. Even though installation says it completed succesfully, AdventureWorks db is nowhere to be found. I wnat to setup SSIS training for my team and it is becoming very difficult. If Microsoft really wants people to use these products, they should make them more accesible.

qrphai Apr 22, 2009 at 2:26 PM 
I have donwloaded the AdventureWorks for the SQL 2008 to find out how the new GEOGRAPHY-type works. The described column "SpatialLocation" in the table "Person.Adress" does not exists.
Very bad: there are no GEOGRAPHY-type in any table! Microsoft: Did you give up the new types?

amanyshousha Jan 24, 2009 at 9:55 AM 
hello all there was a file called SQL2008.AdventureWorks_OLTP_DB_v2008.x86.msi that have the new DB version and it modification for adventureworks2008
currently when i go to the link provided and downloaded the DB i found it the old adventureworks of version 2005
does anyone has an idea about where to get the setup file of AdventureWorks2008.msi

jb3 Sep 2, 2008 at 4:29 PM 
To gregoryacya:

I followed the instructions for enabling FILESTREAM for "Transact-SQL access" and "file I/O streaming access" listed in the blog entry referenced in Item 5 above (note that two checkboxes need to be checked). This enables the feature through the SQL Server Configuration Manager (SSCM).

I then followed the instructions given by "debdrup" to set "filestream_access_level" to "2". I opened a "sqlcmd" window by typing "sqlcmd -S yourServerName\sqlexpress" at a cmd shell prompt. I just copied the three commands from this web page and pasted them into the sqlcmd window. After the SQL commands executed, I entered two "exit" commands, one to exit the "sqlcmd" sessions and the second to close the cmd shell window.

Next, I opened an Explorer window, navigated to "C:\Program Files\Microsoft SQL Server\100\Tools\Samples", and double-clicked on the "RestoreAdventureWorks2008.sql" script file. This action opened the script file in a Microsoft SQL Server Management Studio window. I clicked the "connect" button to accept the defaults on the "Connect to Database Engine" dialog. Line 3 of the script must be edited to point the @source_path variable to the location where Microsoft SQL Server was installed. In my case, I used the default installation directory and Line 3 reads as follows:

SET @source_path = 'C:\Program Files\Microsoft SQL Server\100\'

You can save the updated script file if you wish.


Finally, I clicked on the "! Execute" toolbar button to run the script. With the FILESTREAM feature FULLY configured, the script executed without complaint and created a new copy of the AdventureWorks2008 database (I did not have any existing .mdf or .ldf files in the "samples" directory).

I hope you are successful as well.

jb3 Sep 2, 2008 at 4:26 PM 
To Sondang:

The error message you are receiving is caused by a sanity check that was intentionally placed in the original, installed copy of the "RestoreAdventureWorks2008.sql" script file. Line 3 of the script must be edited to point the @source_path variable to the location where Microsoft SQL Server was installed. In my case, I used the default installation directory and Line 3 reads as follows:

SET @source_path = 'C:\Program Files\Microsoft SQL Server\100\'

I will try to update my original procedure to include this step and re-post it.

Sondang Aug 31, 2008 at 12:48 AM 
Hi All,
I folowed instruction from JB3 but when i "Execute" to run the script, I got the message " Msg 50000, Level 16, State 1, Line 8
@source_path must not be empty. Set this value above to the path for the root directory of your SQL Server 2008 installation" please help me resolve this problem. thank in advance

gregoryayca Aug 26, 2008 at 9:23 PM 
Now I tried the installation using the SQL script provided with the Database sample "RestoreAdventureWorks2008.sql"
I got an error "Filestream disabled" even when I enabled it as per instructions above.
I right clicked in the SQLX2008 Server then clicked on "Properties", the click on "Advanced" then Enabled Filestream to "Transact SQl access enabled" and clicked OK. Ran again the script and this time worked OK.

gregoryayca Aug 26, 2008 at 8:52 PM 
This is my experience installing SQL2008.AdventureWorks_OLTP_DB_v2008.x86.msi
I followed all the instructions above. When I reached step 6 I tried to restore the DB using "Restore a DB" with SQL Server Management Studio.
I had to create first a blank AdventureWorks2008 DB because Restore asks for a DB Name to restore to. Then I provided the source Backup DB location and name and I got the following error screen:
"Microsoft Sql server Management studio failed for server SQLX2008 (This is the name for the instance)
The backup Set hold a Backup of a DB other than the existing AdventureWorks2008."
So it did not restore it.

debdrup Aug 13, 2008 at 3:54 PM 
Just as a folow-up: Turns out you have to do it both by SSCM and a sp_configure, so here's the command for the latter:
EXEC sp_configure 'filestream_access_level', '2'
RECONFIGURE
GO

Note: I'm not responsible for any effects this may have on what people can do on your server. It just works on my production enviroment, but before anyone tries it I'd suggest someone look into what it does to the database security.

debdrup Aug 13, 2008 at 3:32 PM 
I followed above blog entry on how to enable filestream and filestream I/O, but I still get:

FILESTREAM feature is disabled.

I've already tried restarting the server without any luck and I can't figure out what else is wrong.
I've also simply tried restoring it from the rightclick menu but I get the same error there.

JohnH123 Jul 31, 2008 at 6:48 PM 
I came from SQL Server 2000 and decided to install SQL Server 2008 for a new project. I installed SQL Server 2008, RC0 Express+ version. For SQL Server 2000 I have one installed program, that being labeled "Microsoft SQL Server" in the programs directory. For SQL Server 2008 I have six program entries, two of which are other versions of SQL Server those being SQL Server 2005, and SQL Server Compact 3.5. Seems to me this could use some explanation. I also spent at least a day wandering through the Microsoft SQL swamp looking for useful vegetation and trying not to get bitten by the varmints. I am feeling pretty well bitten at the moment. You really need to differentiate between Sample Databases and Samples. In paragraph #2, above and many other places the two terms seem to be intertwined. Also how many Adventureworks databases are there? I keep seeing references to what appear to be three different databases, Adventureworks, AdventureworksDW, and AdventureworksAS. I would really like to just be able to download and install a single Adventureworks database for my SQL Server 2008 RC0 Express + code. Is that possible? If so can you point me to some information on how to do that. If I want the code samples I will download those separately.

tvtran01 Apr 23, 2008 at 12:30 AM 
When I tried to restore the sample databases as instructed above, the script generated the following error.

"OSTST99\SQL2([username]): Msg 3169, Level 16, State 1, Line 1
The database was backed up on a server running version 10.00.1300. That version is incompatible with this server, which is running version 10.00.1075. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server.
OSTST99\SQL2([username]): Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally."

It means I need either a sample database backup that was created in the version 10.00.1075 or I need to update my current server version which is CTP release in the Microsoft Launch 2008 event into 10.00.1300. Please get me updated in this topic.

ReedMe Mar 12, 2008 at 7:33 PM 
Bonnie updated the instructions above (see #4 in the installation bullets) for a link Joanna's blog on the proper method for enabling filestream post-installation.

vijayp21 Mar 11, 2008 at 12:03 AM 
executed sql as given for installing on AdveturworksDB2008. I get response for the first one as Filestream already enabled and for the restore it says filestream not enabled.
please document how to to restore. Also there is no MDF file.