dbTalk Databases Forums  

Enumerate SQL Instances on a server

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss Enumerate SQL Instances on a server in the microsoft.public.sqlserver.clients forum.



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

Default Enumerate SQL Instances on a server - 07-11-2007 , 07:01 AM






Hi,

I'm looking for a way to enumerate SQL Server instances on a given
server. I've seen the GetDataSources() method of the
SqlDataSourceEnumerator class, but this does not cover my needs as it
omits too many instances (reports less than half of the instances) -
probably due to network segments.

So what I would like is to connect to a specific server and check which
instances are running, then connect to the next server etc as I do have
a complete list of all servers and this will run as part of a nightly
inventory process.

Any tips? Is parsing the registry the best method? Is there a way to
"talk" to the SQL browser running on UDP/1434 on each server? Or should
I look into calling the SQLBrowserConnect ODBC call?

I'm programming in C# on .NET 2.0, but any tips are welcome.


Regards,

Arild

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.