?
Solved

Multiple Server Instances: Cannot connect

Posted on 2004-08-23
2
Medium Priority
?
227 Views
Last Modified: 2012-05-05
I have 2 server instances, one called "SQLMACHINE" and the other "SQLMACHINE\MYINSTANCE".  When I attempt to connect with the OLEDB driver (connection string), it WILL connect to SQLMACHINE\MYINSTANCE, but it WILL NOT connect to SQLMACHINE.  It is unable to find the server.

The workaround so far has been to STOP the SQL Service on the SQLMACHINE\MYINSTANCE, which apparently forces OLEDB to the other server by some kind of default.  How can I CHOOSE which server I want to connect to?  Ofcourse, I have tried all the basic stuff, i.e., "local", "SQLMACHINE", "localhost", "127.0.0.1", you name it.  Can't find that server.

Help!
0
Comment
Question by:born4code
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
AustinSeven earned 2000 total points
ID: 11870288
I think you need to append the allocated port number in the connection string.   If you do server properties in EM for "SQLMACHINE" and "SQLMACHINE\MYINSTANCE", click 'Network Configuration' and then 'TCP/IP in the 'Engabled Protocols' window... Then click 'Properties'.   This will give  you the allocated port number for each.   It is probably 1433 for SQLMACHINE and it should be something else for the instance.  Then, in your connection string, append ',port number' (eg. ',1488').   In such situations, I've always used the IP address, eg. 192.1.1.100,1488 .   Not sure if you can use the SQL Server names or Instance names.

I grabbed this from a similar post...

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21060898.html

 oConn.Open "Provider=sqloledb;" & _
           "Network Library=DBMSSOCN;" & _
           "Data Source=xxx.xxx.xxx.xxx,1433;" & _
           "Initial Catalog=myDatabaseName;" & _
           "User ID=myUsername;" & _
           "Password=myPassword"


AustinSeven
0
 
LVL 2

Author Comment

by:born4code
ID: 11872079
Thanks.
I'll give that a try...  great advice.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question