Solved

Multiple Server Instances: Cannot connect

Posted on 2004-08-23
2
224 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 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

726 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