Home All Groups Group Topic Archive Search About

Resolving DataSource if IP has multiple SQL Server instances

Author
16 Jan 2006 5:31 PM
michael
When assigning values to DataSource in a connection string (say with the
SqlConnectionStringBuilder), I have generally used either the IP address or
the name of the SQL Server instance as a value.

With SQL Server 2005 I understand that a given computer can have multiple
instances of SQL Server running simultaneously. I assume that each instance
has its own name (which could be assigned to the DataSoure property). What
happens though if you assign the IP address to a DataSource when that IP may
have 2 instances of SQL Server running on it simultaneously?

--
Michael Hockstein

Author
17 Jan 2006 3:36 AM
Kevin Yu [MSFT]
Hi Michael,

If you connect using only the IP address of the machine, it will connect to
the default instance on that machine.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Author
17 Jan 2006 11:27 AM
michael
So, if there are more than one instances of SQL Server on a single IP
address, using the IP address alone as the DataSource will connect to the
Default instance. Otherwise, to connect to the other instances I will have to
use the instance Name.

Is there a notation that combines IP address and Name that can be used as a
valid DataSource?

--
Michael Hockstein


Show quote
"Kevin Yu [MSFT]" wrote:

> Hi Michael,
>
> If you connect using only the IP address of the machine, it will connect to
> the default instance on that machine.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>
>
Author
17 Jan 2006 2:08 PM
Jesús López
Yes: "Data Source=192.164.0.1\InstanceName"
Author
17 Jan 2006 5:52 PM
michael
Thanks. I guess that was too obvious for me to figure out :)
--
Michael Hockstein


Show quote
"Jesús López" wrote:

> Yes: "Data Source=192.164.0.1\InstanceName"
>
>
>

AddThis Social Bookmark Button