[Solved] ActiveX component can’t create object: ‘SQLDMO.SQLServer’ on SQL Server 2008

If you execute a vb script which use SQL-DMO on SQL Server 2008, you will notice that the script doesn’t work at all.

You will see the error message as similar to this one when you execute the vb script:

Error: ActiveX component can't create object: 'SQLDMO.SQLServer'
Code: 800A01AD
Source: Microsoft VBScript runtime error

ActiveX component can't create object: 'SQLDMO.SQLServer'

Cause

This is because SQLDMO is deprecated since SQL Server 2005. But SQLDMO is installed on SQL Server 2005 by default so you can run a vb script which uses SQLDMO without any error on SQL Server 2005. On SQL Server 2008, SQLDMO is not installed by default . If you want to use SQLDMO, you have to install it manually.

Solution

To use SQL-DMO on SQL Server 2008, you need to download and install Microsoft SQL Server 2005 Backward Compatibility Components to solve the problem. You can go to Microsoft Download Center and search for “Microsoft SQL Server 2008 Feature Pack” and sort by Release Date to find the latest version.

Step-by-step

  1. Download Microsoft SQL Server 2005 Backward Compatibility Components from Microsoft or at SQLServer2005_BC (32-bit, x86). Next, execute the setup file.
  2. On Welcome to the Install Wizard for Microsoft SQL Server 2005 Backward compatibility Setup, click Next.
    Microsoft SQL Server 2005 Backward compatibility Setup
  3. On License Agreement, select ‘I accept the terms in the license agreement‘. Then, click Next.
    License Agreement
  4. On Registration Information, enter your personal information. Then, click Next.
    Registration Information
  5. On Feature Selection, ensure that SQL Distributed Management Objects is selected. Then, click Next.
    Note: SQL-DMO is the feature that is require to run a vb script that uses DMO.
    Feature Selection - SQL Distributed Management Objects (SQL-DMO)
  6. On Ready to Install the Program, click Install.
    Ready to Install the Program
  7. Installing Microsoft SQL Server 2005 Backward compatibility.
    Installing Microsoft SQL Server 2005 Backward compatibility
  8. On Completing the Microsoft SQL Server 2005 Backward compatibility Setup, click Finish. Now try to run vb script again, the problem should be gone!
    Completing the Microsoft SQL Server 2005 Backward compatibility Setup

Reference

Where the Heck is DMO?

8 Comments

  1. oleg January 22, 2010
  2. RB January 29, 2010
  3. Jeremy June 30, 2010
  4. Samuele September 23, 2010
  5. Suresh Nair December 1, 2010
  6. DaveW June 3, 2011
  7. Ken Jett October 5, 2011
  8. Letoine October 10, 2012

Leave a Reply

%d bloggers like this: