473,802 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Enum SQLServers and Instances that are running

Hi All,

How do I enumerate the SQL Servers that are on the network and the
instances that are running on those servers
I have to develope a wizard and part of the wizard is to ask the user
what sqlserver they would like to use, it is also possible that the
sql server is running more than one instance.
Thank you
Mark Hollander
Nov 20 '05 #1
4 1174
ListAvailableSQ LServers Method of the SQL DMO object??

Rgds,
Anand
VB.NET MVP
http://www.dotnetindia.com

"Mark Hollander" wrote:
Hi All,

How do I enumerate the SQL Servers that are on the network and the
instances that are running on those servers
I have to develope a wizard and part of the wizard is to ask the user
what sqlserver they would like to use, it is also possible that the
sql server is running more than one instance.
Thank you
Mark Hollander

Nov 20 '05 #2
* Mark Hollander <ma**@atcom.co. za> scripsit:
How do I enumerate the SQL Servers that are on the network and the
instances that are running on those servers


<URL:http://groups.google.d e/groups?selm=uak e%233JlBHA.2480 %40tkmsftngp04>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
Hi,

Here is an example of using the sql dmo like Anand recommends. Add a
reference to Microsoft sqldmo object library in the com tab.

Dim sqlServers As SQLDMO.NameList

Dim sqlServer As String

' Get a list of servers

sqlServers = New SQLDMO.Applicat ion().ListAvail ableSQLServers

For Each sqlServer In sqlServers

Debug.WriteLine (sqlServer)

Next

Ken

-----------------
"Mark Hollander" <ma**@atcom.co. za> wrote in message
news:5e******** *************** *********@4ax.c om...
Hi All,

How do I enumerate the SQL Servers that are on the network and the
instances that are running on those servers
I have to develope a wizard and part of the wizard is to ask the user
what sqlserver they would like to use, it is also possible that the
sql server is running more than one instance.
Thank you
Mark Hollander

Nov 20 '05 #4
Thanks, It works well,
now can one specify what domain to look in.

Thank you
Mark Hollander
On Mon, 12 Jul 2004 11:32:25 +0200, Mark Hollander <ma**@atcom.co. za>
wrote:

Hi All,

How do I enumerate the SQL Servers that are on the network and the
instances that are running on those servers
I have to develope a wizard and part of the wizard is to ask the user
what sqlserver they would like to use, it is also possible that the
sql server is running more than one instance.
Thank you
Mark Hollander


Thank you
Mark Hollander
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2828
by: Reza Alirezaei | last post by:
How can I have a list of all sql servers avaiable on our LAN populated in a DropDownList exacly like what we have when we want to specify Datasource in ADO.Net or wherever? Thanks
31
3622
by: Michael C | last post by:
If a class inherits from another class, say Form inherits from control, then I can assign the Form to a variable of type Control without needing an explicit conversion, eg Form1 f = new Form1(); Control c = f; An enum value inherits from int but it doesn't get implicitly converted: HorizontalAlignment h = HorizontalAlignment.Center;
18
11375
by: Visual Systems AB \(Martin Arvidsson\) | last post by:
Hi! I have created an enum list like this: enum myEnum : int { This = 2, That, NewVal = 10, LastItm
6
2901
by: Michael Isaacs | last post by:
Regarding use of enum's, I am wondering what the cost of memory is when creating the enumeration on the calling side, and then using it on the function/method side. See example below. If I understand correctly, what is actually happening on the calling side is an instance of the enum class FavoriteSport is getting created and sent to the PrintFavorite routine with a default value of type int. Is this correct? Say I have a couple hundred uses...
16
8389
by: Chad | last post by:
In VB6, Enums that I declare within a class as PUBLIC are know outside of this class. In otehr words, the enum is global and may be referenced outside of the class in which it is declared. In VB.Net, a Public enum is local to the class in which it is declared or instances of the class or classes that inherit from the class in which the Enum declaration resides.
2
1875
by: Alex Feldman | last post by:
Which of the following is better? Defining an enum type inside a class as a nested type, or in the the namespace? An example of nested type enumerated type would be: public Class Product Public Enum Status psNormal psCharged End Enum
0
1309
by: Ben Finney | last post by:
Howdy all, I've uploaded enum 0.3 to the Cheeseshop. <URL:http://cheeseshop.python.org/pypi/enum/> Enumerations are now sequences, iterable (as before) *and* indexable:: >>> from enum import Enum >>> Weekdays = Enum('sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat')
34
11209
by: Steven Nagy | last post by:
So I was needing some extra power from my enums and implemented the typesafe enum pattern. And it got me to thinking... why should I EVER use standard enums? There's now a nice little code snippet that I wrote today that gives me an instant implementation of the pattern. I could easily just always use such an implementation instead of a standard enum, so I wanted to know what you experts all thought. Is there a case for standard enums?
0
1293
by: velu5 | last post by:
Hello, I want to enumerate all the RUNNING SQL instances 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.
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10305
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10063
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9115
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.