0

SQL Server 2008 does not install DMO by default. Is there a function or script I can use from the command prompt to check remote servers to see if DMO has already been installed? We were using a registry key check but thought that might not be the best option. Any advice is appreciated!

1 Answer 1

0

I'm assuming you mean SMO (DMO was replaced by SMO in SQL 2005).

You can do this as a quick and dirty test within Powershell:

PS C:\> [Reflection.Assembply]::LoadWithPartialName("Microsoft.SqlServer.Smo")

If SMO is registered it'll come back with some info on where it found the SMO dll and what version it is.

GAC     Version          Location
---     -------          --------
True    v2.0.50727       C:\.........

You could also use this VBS script if you don't want to do it in Powershell:

Dim sqlServer
set sqlServer = CreateObject("Microsoft.SQLServer.Management.SMO.Server")
set sqlServer = nothing

If it returns a runtime error "ActiveX component can't create object: 'Microsoft.SqlServer.Smo.Server'" then SMO not installed (or at least not registered).

1
  • Sorry, I did not want SMO. DMO installation is required for a bug in SCOM 2007.
    – Ddono25
    Apr 14, 2010 at 21:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .