Resolving DataSource if IP has multiple SQL Server instances

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?
 
K

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."
 
G

Guest

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top