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!
Asked
Active
Viewed 910 times
1 Answers
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).

squillman
- 37,883
- 12
- 92
- 146
-
Sorry, I did not want SMO. DMO installation is required for a bug in SCOM 2007. – Ddono25 Apr 14 '10 at 21:12