Friday, February 3, 2012

SQL Server : ActiveX component can’t create object: ‘SQLDMO.SQLServer’

Recently I uploaded a VB script to generate the DDL for all the jobs. But when I ran the same VB Script against a SQL Server 2008 instance I got the following error.

Activex component can’t create object: ‘SQLDMO.sqlserver’ on SQL Server 2008

Error: activex component can’t create object: ‘SQLDMO.sqlserver’
Code: 800A01AD
Source: Microsoft vbscript runtime error

Upon further investigation I found that this is caused due to fact that on SQL Server 2008 SQLDMO is not installed by default and the best workaround is to install the Microsoft SQL Server 2005 Backward Compatibility Components.

This could be useful if you have other VB Scripts that were running until you migrated to SQL Server 2008.

But I would also recommend to start working on a new script that does not need SQLDMO. 

No comments:

Post a Comment