Friday, February 24, 2012

error:25 - connection string is not valid

I have installed SQL Server 2005 Developer edition. When I open SQL Server Management Studio, and try to connect to the database engine, I enter these credentials:

Server name: LT2000\MSSQLSERVER
Login: sa
Password: my password

When I try to connect I receive the following error:
An error has occured while trying to establish a connection to the server. When connecting to SQL server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.(provider: sql network interfaces, error:25 - connection string is not valid)(Microsoft SQL Server, Error:87)

What can I do?

Is that an error message you are seeing via a ASP.NET page trying to connect?|||

Peter Smith:

I have installed SQL Server 2005 Developer edition. When I open SQL Server Management Studio, and try to connect to the database engine, I enter these credentials:

What can I do?

I don't understand what you mean by connecting to the database engine because I have not had the need for that in 8years plus using SQL Server, but your error means you are trying to connect with only named pipes you need to use both named pipes and TCP/IP. Then enable remote connection that is covered by Microsoft below. Hope this helps.

http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx

http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

|||

The surface area configuration tool used to configure SQL Serve 2005 check the doc below remote connection.

http://msdn2.microsoft.com/en-us/library/ms178763.aspx

|||

Actually the error has nothing to do with pipes. If you look in the error message you find the message "error:25 - connection string is not valid", that is the error. If you are sure those are that is your valid credential you should use a connection string just like this one: "Data Source=LT2000\MSSQLSERVER;Initial Catalog=Northwind;User ID=sa;Password=mypassword"; Initial catalog is of course the name of your database. If that doesn't work, then use a data source wizard and enter your credentials, then test the connection and see if it works. If it doesn't you probably have wrong credentials. You can try also using the Windows Authentication('cause you set your sql server to user mixed authentication mode), in that way your connection string will be: "Data Source=LT2000\MSSQLSERVER;Initial Catalog=Northwind;Integrated Security=true".

Tell us if that works for you.

|||

Hi,

When I use MS SQL Management Studio and I want to connect, I get to see a dropdown...in this dropdown I can select "database engine".
I then fill in the type of authentication (sql server in this case), and I can log on.

I dont have the problem anymore, but that might be that out of frustration I just reinstalled SQL Server...it works fine now :)

No comments:

Post a Comment