Monday, February 20, 2012

Ports reported as servers via SQLDMO

Does anyone know how to get SQLDMO not to interpret ports
as server instances? I presume this is due to named
pipes being turned off on these servers.
SQLDMO.NameList sqlServers = sqlApp.ListAvailableSQLServers();
This misbehaves for a SQL Server named instance that is
specified as "somewhere.domain.net, 1433".
The ListAvailableSQLServers() method comes back with...
"somewhere.domain.net"
"1433"
Any suggestions?The method ListAvailableSQLServers() is practically
useless. What are you trying to accomplish?
Linchi
>--Original Message--
>Does anyone know how to get SQLDMO not to interpret ports
>as server instances? I presume this is due to named
>pipes being turned off on these servers.
>SQLDMO.NameList sqlServers =>sqlApp.ListAvailableSQLServers();
>This misbehaves for a SQL Server named instance that is
>specified as "somewhere.domain.net, 1433".
>The ListAvailableSQLServers() method comes back with...
>"somewhere.domain.net"
>"1433"
>Any suggestions?
>.
>|||I have an application that needs to support a
configuration module. The module needs to provide an
administrator of the app to select a SQL Server instance
to which to bind for all data access. This app will
roam -- that is, travel on laptops and be run from
various states. SQL Server instances will also come and
go over time, so I do not want to store this info in any
config files. I need dynamic scanning of the network for
exposed instances so that the admin can select the
desired one.
ListAvailableSQLServers() does do that for me, but it
looks like it uses dbnetlib.dll whereas I need it to use
dbmssocn.dll in order to detect TCP/IP connections.|||You know that ListAvailableSQLServers() sees only those servers that are
being broadcast. If all your SQL instances happen to be detectable that way,
lucky you! That's not common in most bigger environments.
--
Linchi Shea
linchi_shea@.NOSPAMml.com
"Martin Douglas" <martin_douglas@.fsafood.com> wrote in message
news:033f01c3a002$5a16ac80$a401280a@.phx.gbl...
> I have an application that needs to support a
> configuration module. The module needs to provide an
> administrator of the app to select a SQL Server instance
> to which to bind for all data access. This app will
> roam -- that is, travel on laptops and be run from
> various states. SQL Server instances will also come and
> go over time, so I do not want to store this info in any
> config files. I need dynamic scanning of the network for
> exposed instances so that the admin can select the
> desired one.
> ListAvailableSQLServers() does do that for me, but it
> looks like it uses dbnetlib.dll whereas I need it to use
> dbmssocn.dll in order to detect TCP/IP connections.
>|||1433 can show up because you have an alias configured with that name on the
machine you are running from, or there is garbage in the Registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\SuperSocketNetLib,
which is effectively what get enumerated.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2003 All rights reserved.
"Linchi Shea" <linchi_shea@.NOSPAMml.com> wrote in message
news:uZqtJMDoDHA.964@.TK2MSFTNGP10.phx.gbl...
> You know that ListAvailableSQLServers() sees only those servers that are
> being broadcast. If all your SQL instances happen to be detectable that
way,
> lucky you! That's not common in most bigger environments.
> --
> Linchi Shea
> linchi_shea@.NOSPAMml.com
>
> "Martin Douglas" <martin_douglas@.fsafood.com> wrote in message
> news:033f01c3a002$5a16ac80$a401280a@.phx.gbl...
> > I have an application that needs to support a
> > configuration module. The module needs to provide an
> > administrator of the app to select a SQL Server instance
> > to which to bind for all data access. This app will
> > roam -- that is, travel on laptops and be run from
> > various states. SQL Server instances will also come and
> > go over time, so I do not want to store this info in any
> > config files. I need dynamic scanning of the network for
> > exposed instances so that the admin can select the
> > desired one.
> >
> > ListAvailableSQLServers() does do that for me, but it
> > looks like it uses dbnetlib.dll whereas I need it to use
> > dbmssocn.dll in order to detect TCP/IP connections.
> >
>

No comments:

Post a Comment