Solved

Multiple Server Instances: Cannot connect

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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.

746 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

10 Experts available now in Live!

Get 1:1 Help Now