|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Resolving DataSource if IP has multiple SQL Server instancesWhen 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 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? -- Show quoteMichael Hockstein "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." > > Thanks. I guess that was too obvious for me to figure out :)
-- Show quoteMichael Hockstein "Jesús López" wrote: > Yes: "Data Source=192.164.0.1\InstanceName" > > > |
|||||||||||||||||||||||