"SQL Distributed Management Objects (SQL-DMO) is a collection of objects encapsulating Microsoft® SQL Server™ database and replication management." Well pretty much sums it up for me!
But in all honesty, SQL-DMO is a great tool that you can use for accessing and manipulating your SQL Server DB's from within your .NET applications. One such application [here comes the obligatory plug] is subText! We are currently using SQL-DMO in a custom database connection string builder that we use to get information about local (or network) SQL Servers while installing the subText platform. This allows us to have a quazi-wizard method for building the db connection string, and we hope that will equate to a better user experience.
As usual, I'm starting off on a tangent... so what I'm driving at here is that last week when I updated my local codebase to the latest subText bits, along with it came Simo's work on the connection string builder it's use of SQL-DMO. So, like always I fired up VS.NET, and built the solution with the new codeset. And what did I see? Build Errors! The cause was an unresolved assembly SQLDMO. The issue... I didn't have SQL-DMO (which is part of SQL Server, SQL Server client tools, and MSDE... none of which were installed on my development box. My SQL Sever sits on another box on my local network, and any apps I'm working on on my dev box just point to it. Then, just for kicks, I tried to run some subText assemblies that were compiled on a machine that did have SQL-DMO installed. What happened? This:
System.Runtime.InteropServices.COMException: COM object with CLSID {10020100-E260-11CF-AE68-00AA004A34D5} is either not valid or not registered.

So, you need to have the SQLDMO COM installed on what ever box it is that you're attempting to run the code utilizing SQL-DMO on. I didn't want to install SQL Server nor MSDE on my dev box, just the Client Tools... so I followed
these instructions. One thing to pay attention to when installing is the
Select Components dialog box. As you can see to the above, you need to be sure to select the
Headers and Libraries option. Also, in order to install database components from a network share, you must first do one of the following:
- Map the network share containing the extracted service pack files to an available drive letter on the local computer, navigate to the folder on the mapped drive that contains Setup.bat, and then run Setup.bat.
- Start Setup by running the Setupsql.exe file found in \X86\Setup, which is a subfolder of the folder on the network share that contains the extracted service pack files.
This is what will actually install and register the SQLDMO.dll as needed.
Unfortunately, you're not done yet. When I re-compiled and ran my code on my dev box (hoping for the best) I got the following:
System.InvalidCastException: QueryInterface for interface SQLDMO.NameList failed.
A quick
Google search revealed that I needed to install SQL Server SP2 or greater to fix this issue. So, after installing SP4, I again rebuilt
subText and tried to run the connection string builder.
SUCCESS!