Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Connection string with instance name Expand / Collapse
Author
Message
Posted Tuesday, January 9, 2007 6:08 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, December 3, 2014 3:26 AM
Points: 142, Visits: 141
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..



Post #335312
Posted Tuesday, January 9, 2007 7:16 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, September 28, 2009 7:01 AM
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?
Post #335332
Posted Tuesday, January 9, 2007 7:50 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, December 3, 2014 3:26 AM
Points: 142, Visits: 141
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 =)



Post #335346
Posted Tuesday, January 9, 2007 8:27 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, December 3, 2014 3:26 AM
Points: 142, Visits: 141
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



Post #335360
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse