Does anyone know how you can get a list of all the SQL Server's in the
network?
You have something similar if you want to register a server in the
enterprice manager.
Thanks in advance,
Johan Thijsen.
You can use DMO to get a list of the SQL Servers. You can use the
Application object's ListAvailableSQLServers().
This will return a NameList object that you can iterate through to get all
the servers on the network.
Andy
Johan Thijsen <jthi...@rug.be> wrote in message
news:u3ELpYcC$GA....@cppssbbsa02.microsoft.com...
To enumerate all network-visible SQL servers using SQL-DMO objects,
create a
new standard EXE project and add a reference to sqldmo.rll. This file
can be
found in \Binn\Resources\1033\sqldmo.rll under the SqlServer70
directory.
Now add this code and declaration in your form's code:
Private Function GetAllSqlServerCollection(colSqlServers As Collection)
As
Boolean
Dim intIndex As Integer
Dim oApplication As SQLDMO.Application
Dim oNameList As SQLDMO.NameList
Set oApplication = New Application
With oApplication
Set oNameList = .ListAvailableSQLServers
With oNameList
For intIndex = 1 To .Count
colSqlServers.Add (oNameList.Item(intIndex))
Next
End With
End With
Set oApplication = Nothing
GetAllSqlServerCollection = True
End Function
This code quickly fetches a list of SQL servers and can be put inside a
combo box's drop-down event to always get a refreshed list of SQL
servers on
your form.
In article <u3ELpYcC$GA....@cppssbbsa02.microsoft.com>, Johan Thijsen
<jthi...@rug.be> writes
>Hi,
>
>Does anyone know how you can get a list of all the SQL Server's in the
>network?
>
>You have something similar if you want to register a server in the
>enterprice manager.
>
>Thanks in advance,
>
>Johan Thijsen.
>
>
--
Darren Green
SQL/DTS - http://www.swynk.com/friends/green/
Thanks, this is just what I need.
I still have a small question. Our NT domain struncture is a single master
domain:
Master Domain
|-------------- -----------------|
Domain1 Domain2
The SQL Servers are located in Domain1 and Domain2. So If I capture the
list of network-visible SQL Servers, I only get the ones in the domain I'm
sitting in.
If I'm in domain2, I can perfectly register (in the enterprice manager for
instance) a server in Domain1 by typing in its name, so there is no matter
of security problem.
Do you know how I can get also a list the servers of the other domain? (I
know offcourse the name of the domain)
Best wishes,
Johan.
Andy Barshinger <Andy.Ba...@wonderware.com> wrote in message
news:#nyRcjeC$GA.230@cppssbbsa05...
> Hi Johan,
>
> You can use DMO to get a list of the SQL Servers. You can use the
> Application object's ListAvailableSQLServers().
> This will return a NameList object that you can iterate through to get all
> the servers on the network.
>
> Andy
> Johan Thijsen <jthi...@rug.be> wrote in message
> news:u3ELpYcC$GA....@cppssbbsa02.microsoft.com...
Thanks, this is just what I need.
I still have a small question. Our NT domain struncture is a single master
domain:
Master Domain
|-------------- -----------------|
Domain1 Domain2
The SQL Servers are located in Domain1 and Domain2. So If I capture the
list of network-visible SQL Servers, I only get the ones in the domain I'm
sitting in.
If I'm in domain2, I can perfectly register (in the enterprice manager for
instance) a server in Domain1 by typing in its name, so there is no matter
of security problem.
Do you know how I can get also a list the servers of the other domain? (I
know offcourse the name of the domain)
Best wishes,
Johan.
Darren Green <dgr...@shortie.demon.co.uk> wrote in message
news:sdJV6GA7...@shortie.demon.co.uk...
> >Hi,
> >
> >Does anyone know how you can get a list of all the SQL Server's in the
> >network?
> >
> >You have something similar if you want to register a server in the
> >enterprice manager.
> >
> >Thanks in advance,
> >
> >Johan Thijsen.
> >
> >
>
--
Darren,
Do you know how to do this from DMO in SQL 6.5? The
ListAvailableSQLServers method does not exist in this version.
Thanks,
--Sil
-Sil Zendejas
Sent via Deja.com http://www.deja.com/
Before you buy.
I have no idea how to talk across domains as I only have the one. I'm
guessing it must have something to do with trust relationships between
the domains.
In article <eFhXsxxC$GA.254@cppssbbsa03>, Johan Thijsen
<jthi...@rug.be> writes
>Hi Darren,
>
>Thanks, this is just what I need.
>
>I still have a small question. Our NT domain struncture is a single master
>domain:
>
> Master Domain
> |-------------- -----------------|
> Domain1 Domain2
>
>The SQL Servers are located in Domain1 and Domain2. So If I capture the
>list of network-visible SQL Servers, I only get the ones in the domain I'm
>sitting in.
>If I'm in domain2, I can perfectly register (in the enterprice manager for
>instance) a server in Domain1 by typing in its name, so there is no matter
>of security problem.
>
>Do you know how I can get also a list the servers of the other domain? (I
>know offcourse the name of the domain)
>
>Best wishes,
>Johan.
>
>
>Darren Green <dgr...@shortie.demon.co.uk> wrote in message
>news:sdJV6GA7...@shortie.demon.co.uk...