Monday, February 13, 2012

ADO Connection port with clustered servers

I am using ADO to connect to clustered SQL Servers, how do I know which port to use?
My current connection string format is:
Provider=sqloledb;Network Library=DBMSSOCN;Data Source=<server ip>,<server port>;Initial Catalog=<my catalog>;/<user>/<pass>
But with clustered servers this will not work as ports are assigned dynamically.
Thanks
If the client machine is using MDAC 2.6 or greater it will figure out the
port number.
MDAC sends a UDP packet to the server to gather this information before
sending the login packet.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||So should I just not include the port number in the connection string?
"Kevin McDonnell [MSFT]" wrote:

> If the client machine is using MDAC 2.6 or greater it will figure out the
> port number.
> MDAC sends a UDP packet to the server to gather this information before
> sending the login packet.
>
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>

No comments:

Post a Comment