November 9, 2010 | SQL Server

SQL Server v.Next (Denali) : Installing AdventureWorks2008R2

After five tries, I've given up trying to install AdventureWorks on machines where Denali exists – even in cases where 2008 or 2008 R2 instances also exist, and when my goal is to install AdventureWorks on earlier releases.  The installer crashes before I can even select which instance to use.

First, I downloaded AdventureWorks2008R2_RTM.exe from CodePlex (which is where Denali's Books Online currently points you):

http://msftdbprodsamples.codeplex.com/releases/view/45907

Ran the EXE, agreed to the license terms, and the next screen was:

 

(For searchability, here is the error message in plain text):

———————
Fatal Error
———————
A fatal error occurred during installation. Details:

Failed object initialization (ISupportInitialize.EndInit). An exception occurred in SMO while trying to manage a service. Error at object 'DatabaseSelection' in markup file 'DatabaseInstaller;component/databaseselection.xaml'
Line 78 Position 3.

On five different VMs.  My only success with this installer thus far has been on a machine where Denali was not already present.  So in my limited sample size, it would seem that something installed with Denali is blocking the sample database installer from succeeding.

Initially I thought that there would be an easy fix to this scenario: install 2008 R2, then AdventureWorks2008R2, then perform an in-place upgrade to Denali.  Unfortunately this won't be possible until much later in the public beta cycle (and maybe not even until the final release), since you can't use the upgrade path in setup when installing Enterprise Evaluation edition (which is the only edition available at this time that is capable of running AdventureWorks functionality – Express won't cut it, though it might be okay for AdventureWorks LT ("Light")).

So the solution seems pretty straightforward, for now: if you want to play with AdventureWorks, don't install Denali.  But what if you want to play with AdventureWorks in Denali?  You may be tempted to find and download the script-only install from CodePlex, and it may work, but I am guessing you will have issues when it tries to set up FileStream.  So, if you want to install the 2008 R2 version of AdventureWorks (so far I've only tried this for the OLTP database, not other versions such as DW or Lite), you can try the following procedure, which worked for me:

  1. either install AdventureWorks2008R2 on another server, or wait to install Denali until after you've installed a 2008 R2 instance and installed AdventureWorks2008R2 there;
  2. take a backup of the AdventureWorks2008R2 database, as follows, replacing <path> with your favorite backup location:
     BACKUP DATABASE AdventureWorks2008R2 
        TO DISK = '&lt;path&gt;\AW2008R2.BAK'
        WITH INIT, COMPRESSION;

    (If you need a copy of this backup file, for example if you don't have another server where you can install 2008 R2 without Denali already present, let me know, and I will try to find out the legality of providing it for you.)

  3. install Denali, if you haven't already, and make sure your Denali instance meets all of the AdventureWorks prerequisites; and,
  4. on the Denali instance, restore the backup with the following command, replacing <path> with your favorite backup location and <DenaliDataFolder> with Denali's data folder:
     RESTORE DATABASE AdventureWorks2008R2
        FROM DISK = '<path>\AW2008R2.BAK' 
        WITH
        MOVE 'AdventureWorks2008R2_Data' TO '<DenaliDataFolder>\AW2008R2.mdf',
        MOVE 'AdventureWorks2008R2_Log'  TO '<DenaliDataFolder>\AW2008R2.ldf',
        MOVE 'FileStreamDocuments2008R2' TO '<DenaliDataFolder>\FStreamData\';

    (Note that the FileStreamDocuments2008R2 "file" is actually a non-empty folder, and does not show up in either sp_helpfile or sys.files.)

Now, whether or not this leaves you in a supported state, I'm not sure, and I don't want to be held accountable for the state of your system at this point (or your ability to use every single piece of functionality in AdventureWorks).  Not that you should have Denali installed anywhere other than a throwaway VM anyway.

2 comments on this post

    • AaronBertrand - November 10, 2010, 3:58 AM

      And of course, after all that hassle, Denis Gobo has pointed me to these samples:
      http://msftdbprodsamples.codeplex.com/releases/view/55330

    • AaronBertrand - January 26, 2011, 6:07 PM

      Some further information.  If you're trying to install the 2008 R2 AdventureWorks sample database on a 2008 R2 instance which happens to be on the same machine as any Denali bits, you may come across the same error as above.  My conclusion is that the problem relies solely in the installer and whatever it is checking on the machine is not prepared to deal with changes caused by Denali.  
      There is a workaround for this, if you don't need FILESTREAM – CodePlex offers the data file on its own, without the installer.  So you can just download the data file and then create the AW database using FOR ATTACH_REBUILD_LOG.  Get it here:
      http://msftdbprodsamples.codeplex.com/releases/view/59211

Comments are closed.