Solved

Multiple Server Instances: Cannot connect

Posted on 2004-08-23
2
220 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
2 Comments
 
LVL 10

Accepted Solution

by:
AustinSeven earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
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.
Viewers will learn how the fundamental information of how to create a table.

912 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now