dbTalk Databases Forums  

Enum the running SQL instances using DMO

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Enum the running SQL instances using DMO in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
velu5
 
Posts: n/a

Default Enum the running SQL instances using DMO - 02-12-2008 , 12:28 AM






Hello,

I want to enumerate all the RUNNING SQL instances[in a mixed env where
SQL 2000 and SQL2005 are deployed] using SQL DMO.
But any of the following methods would not help

ListAvailableSQLServers Method
ListInstalledInstances Method

because they list all the installed instances and while my intent is
getting only the running instances.

Is there any other direct API ? Pls advise.

Regards,
Velu

Reply With Quote
  #2  
Old   
Plamen Ratchev
 
Posts: n/a

Default Re: Enum the running SQL instances using DMO - 02-12-2008 , 07:19 AM






You can try the SqlDataSourceEnumerator class in ADO.NET:
http://msdn2.microsoft.com/en-us/library/a6t1z9x2.aspx

Here is an article that describes a couple methods to enumerate instances,
including the newer approach using SMO:
http://www.sqldbatips.com/showarticle.asp?ID=45

In my experience SMO does work much better than DMO.

HTH,

Plamen Ratchev
http://www.SQLStudio.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.