Resolving DataSource if IP has multiple SQL Server instances

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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."
 
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?
 
Back
Top