Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Connection string with instance name


Connection string with instance name

Author
Message
kangarolf
kangarolf
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 Visits: 205
Hi all

Ive just recently installed sql2005 for a slow migration from 2000.

The box is used from numerous websites conecting via TCP/IP. Previously our connection strings were of the form;
Provider=SQLOLEDB; Data Source=1.1.1.1; Initial Catalog=dbname; User ID=user; Password=password; Language=BRITISH ENGLISH"

Since the new server has both 2005 and 2000 running (2005 was installed first in this case) the instance of 2000 has been given the name servername/SQL2000.

I have tried using Data Source=1.1.1.1\SQL2000 and Server=1.1.1.1\SQL2000 neither of which works...just get sever does not exist or access denied errors.

Any help appreciated..



Vidas Zabinskas
Vidas Zabinskas
SSC-Addicted
SSC-Addicted (402 reputation)SSC-Addicted (402 reputation)SSC-Addicted (402 reputation)SSC-Addicted (402 reputation)SSC-Addicted (402 reputation)SSC-Addicted (402 reputation)SSC-Addicted (402 reputation)SSC-Addicted (402 reputation)

Group: General Forum Members
Points: 402 Visits: 23
The situation has changed, now you have a SQL server named instance instead of default. Have you tried to create an TCP\IP server alias with the  correct port number of the named instance?
kangarolf
kangarolf
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 Visits: 205
No I havent' I have never done that before. I thought that adding the instance name at the end would direct the request through to the right database but apparently not!

I'll look up the aliases now.

Incidentally I have also tried running the sql2000 instance on a different port and using server=1.1.1.1\instancename,1434 to no avail.

It shouldnt be this hard to achieve =)



kangarolf
kangarolf
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 Visits: 205
OK I've managed to get it to work now..I still dont fully understand the changes in sql2005 but here goes for the sake of others who might find themselves in the same position.

SQL2005 by default doesnt listen on TCP only local traffic and named pipes, which might catch you out on first installing it.

SQL2005 has a defualt port of 1433 same as sql2000 which of course causes problems if you have an installation of sql2000 on the same server because of course both services cant be listening on the same port! Sql2005 takes precendence in my installation but I dont know if thats always the case.

SQL2005 has an extra service on port 1434 the SQL browser service - I initially set my instance of sql2000 to listen on port 1434 so of course that didnt work either!

Once I set up the sql2000 instance to listen on an unused port this form of connection string worked ok.

"Provider=SQLOLEDB; Server=1.1.1.1\instance,port; Initial Catalog=ITBuy; User ID=SilverSurferAccess; Password=G1ll1anD1ane; Language=BRITISH ENGLISH"

Thanks for the help,
Rolf



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search