?
Solved

How many sql server in the network?

Posted on 2002-06-27
2
Medium Priority
?
159 Views
Last Modified: 2010-05-03
Hi All,

How would I know how many SQL servers (server name) in the network?

Sean.
0
Comment
Question by:whsean
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
DrMaltz earned 200 total points
ID: 7115619
there's an API called NetServerEnum which will enumerate the number of SQL Servers broadcasting on the network (Named Pipes a protocol). You can pass an option to this function that finds any server running Microsoft SQL Server.  Here's an article.. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/ntlmapi2_1vl9.asp

Here's an article showing how to accomplish from vb.. http://www.codeguru.com/vb/articles/1916.shtml

Also, you can take a look at the SQL DMO Object. Using the SQL-DMO object model you can programmatically control SQL Server.  It contains a method ListOfAvailableServers.

Hope this helps.
Good Luck

DrMaltz
0
 

Author Comment

by:whsean
ID: 7117728
Thanks a million!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question