Solved

How many sql server in the network?

Posted on 2002-06-27
2
153 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 50 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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
Course of the Month5 days, 23 hours left to enroll

627 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