Monday, March 26, 2012

Establishing connection to SQL 2005 Server Express

Using localhost (127.0.0.1) an error occurred while establishing a connection to SQL Server 2005.

Error message - An error has occurred while establishing 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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (.Net SqlClient Data Provider)

Error Number: 10061
Event Source: MSSQLServer

Message text: Cannot connect to 127.0.0.1.

Any ideas?

I have just tried this idea and it worked ! ! !

- Removed SQL Native Client through Add or Remove programmes

- Reinstalled SQLServer 2005 Express

- Used .\sqlexpress as server name

- Clicked Connect

and I got connected to the server ! ! !

Thanks.

|||I was having trouble connecting to the sql server from visual studio.
Then I realized that "server name" actually means "sql server name".
I'll consider it a bug.

The drop down list contains server names, such as the name of my local computer as well as other servers on my LAN. Since the list contains server names, and the label says server name, you'd think they mean server name.... but they don't; they mean sql server name.

It's easiest to use ".\" as the server name for localhost, and "sqlexpress" as the name of the sql server instance. So for server name, enter ".\sqlexpress".

By the way, visual studio 2005 is great. What's gotten into microsoft? Ever since windows xp, they seem to be getting their act together... taking time to make things right (e.g. delaying vista, adding visual queues for docking so you don't have to guess where things are gonna land when you drop them). Good job!|||thanks for posting this! was having the same problems but now it worked in a few seconds!|||Thank you! Thank You! This is most helpfull. I won't say how much time I spent trying to reconnect to my server after upgrading SQL Express to SP2.

Great formum. Hopefully I'll know enough to give back some day.|||

Another greatful user of your post. Allow me to add that my database name ended up being msdb

I had been trying to use Northwind

No comments:

Post a Comment