Sunday, June 19, 2011

Fatal Error : Failed object initialization when Installing AdventureWorks2008R2 Sample Databases

I recently installed AdventureWorks 2008R2 SR1 as a sample database in my SQL Server 2008 R2 to test SharePoint 2010 Enterprise Search with custom databases.While installing the AdventureWorks 2008R2 SR1 I faced some issues and I thought to share those issues and ways to solve those issues with you all.

First you can download AdventureWorks 2008R2 SR1 for free from the following link.
    Download  AdventureWorks 2008R2 SR1

After you have finished downloading, there will be a single self extracting zip file which contains all of the AdventureWorks sample databases for SQL Server 2008R2. When this zip file is run, all content is unzipped to a temporary directory and an installer application is automatically started. This application copies the database scripts and data files to the directory specified, and optionally installs sample databases. If some databases cannot be installed, a brief explanation is displayed and a link is provided for more information about how to resolve the installation issues.

This is what you will get when you ran the self extracting zip file.



Then I ticked that I accept the licence terms and clicked Next hoping that installation will go smoothly. Then the following Error appeared.


It says,

A fatal error occurred during installation. Details:

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


First I was little bit surprised. Then I started to troubleshoot the error. First what I did was check the Installation Guide for installing AdventureWorks 2008R2 SR1.

In that there were three main steps to follow. They were,
  1. Installing Full-Text Search.
  2. Enabling the SQL Full-text Filter Daemon Launcher Service.
  3. Enabling FILESTREAM,
I was pretty sure, I have enabled all features with Full-Text Search when I was installing SQL Server 2008 R2. But I wasn't sure about the other two. So after reading the Installation guide I went for Enabling the SQL Full-text Filter Daemon Launcher Service. And for that I needed to go to SQL Server Configuration Manager. I followed StartAll Programs, then Microsoft SQL Server 2008, then Configuration Tools, and then clicked on SQL Server Configuration Manager. And when I clicked on it I was astonished. I got another error.


It says,

Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 and later servers with SQL Server Configuration Manager. Invalid class [0x80041010]

Again I am pretty sure that I do have the permission and I am running on SQL Server 2008 R2. Then I Googled for this error and I found out the reason. Microsoft has provided you the full explanation of this error and answer in this link. After reading Microsoft's solution, in an elevated Command Prompt, I typed the following.

mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof"

Then I navigated to SQL Server Configuration Manager and clicked on it. Now there was no error and successfully managed to open Configuration Manager. Now according to AdventureWorks 2008R2 SR1 Installation Guide, enabled the SQL Full-text Filter Daemon Launcher Service and fixed it's Start Mode to Automatic.

Then enabled the FILESTREAM by opening the SQL Server Management Studio (SSMS), and in the query window, running the below code,

EXEC sp_configure filestream_access_level, 1
RECONFIGURE

Now everything was good to go. Again I ran the self extracting zip file of AdventureWorks 2008R2 SR1. Finished extracting files and installer application automatically started. Again ticked that I accept the licence terms and clicked Next. Now there was no fatal error and AdventureWorks 2008R2 SR1 sample databases were ready for installation.

Hope someone gets needed help from this post. Appreciate your feedback.

Happy Coding.

Regards,
Jaliya

9 comments:

  1. this was of great help thanks a lot..
    cheers
    sk

    ReplyDelete
  2. this worked perfectly.. thank you!!!

    ReplyDelete
  3. Hi, I had the same problem..only difference was I had installed Visual Studio 11 Developer Preview on my machine which installed Denali on it and Denali was creating problems. (not sure if VS11 did this...but something installed it on my system)

    So I uninstalled Denali and things got working for me.

    Thanks for the hint :)

    ReplyDelete
  4. You are welcome Juzar.

    Happy Coding.

    Regards,
    Jaliya

    ReplyDelete
  5. For me, these steps doesn't work...... :( after doing everything, the same error message is coming while installing AW DW

    ReplyDelete
  6. It works for me, thanks a ton for posting in detail explanation.

    ReplyDelete
  7. I the same issue but also noticed that I could also not view any services in SQLServer 2008R2 (RPC error). Turns out these errors are related. I installed SQLServer 2008R2 SP2 and both errors now corrected.

    I hope this helps someone.

    ReplyDelete
    Replies
    1. When I enter "EXEC sp_configure filestream_access_level, 1
      RECONFIGURE" I receive the error "Configuration option 'filestream access level' changed from 1 to 1. Run the RECONFIGURE statement to install.
      Msg 5593, Level 16, State 1, Line 2
      FILESTREAM feature is not supported on WoW64. The feature is disabled."

      All the information I have read on this error stated it is due to the OS and SQL running on different instances.
      I have verified that both SQL and my OS are 64bit versions but still cannot enable filestream.....Could this possible be due to the fact that I am running all of my software through VMware Workstation?

      Delete
    2. Hi Awint,

      It has nothing to do with everything installed in VMware Workstation. Please refer the following link for Enabling and Configuring FILESTREAM on Microsoft SQL Server.

      http://msdn.microsoft.com/en-us/library/cc645923.aspx

      Delete