Click here to Skip to main content
15,898,036 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm about to give up. I've been working on getting SQL SERVER 2012 onto my LONOVO Laptop running Windows 7 for the past 3 weeks. I have a C# program I'm developing using the SQL database (I can't afford to lose the data that is already present). I've downloaded SQL SERVER and associated software about 3 times (3 hours per download) and each time in the end I am unable to connect to my database receiving an assortment of error messages most referring to errors 26, 40, 53, and 50. I know there are about 1000 references to this problem upon Googling for the various error messages. I have attempted to apply a good number of them without success and many others don't apply to my situation or my configuration (Windows 7, attempting to access the database on my local machine with C#).
It's unfortunate that for some reason or other I attempted to upgrade from SQL SERVER 2008 R1 that worked perfectly on this machine. The following are a typical selection of error messages I have received:

"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)"

ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

Yes, I've made sure MSSQLSERVER is running
NO SQLBROWSER is not running and when I attempt to start it I get the message:
"This operation could not be completed. Access Denied"
Yes I have attempted to connect with the firewall disabled (same error messages)
I have not been able to manually check whether or not Port 1433 is blocked because I'm not sure how to do this.

This represents just a small number of the things I have attempted.

Question:
1) Any advice on steps I might try on my system to see if I can connect to SQL SERVER 2012 with C#?
2) Is it best to just give up, go back to SQL SERVER 2008 R1, try to get it working and forget about SQL Server 2012?
3) Any other suggestions on how to get my data back?
Posted
Comments
Suvendu Shekhar Giri 10-Jan-15 22:49pm    
The Network related or instance specific error occurs when it could not connect to the server due to either server name id incorrect or the server is not running. If you are in the same machine then make sure that the server name you are trying to connect to is correct. I suggest to click "Browse More" from Server Name dropdown and select the appropriate server.
Tipton Tyler 11-Jan-15 12:24pm    
Thank all of you for your suggestions, they did help. Yes, I found the connection protocols in the SQL Network Configuration tab of the SQL Server Configuration Manager and enabled "Named Pipes" (it had been disabled). Some how I was able to get the SQL Server Browser running (perhaps setting the Advanced Properties Start Mode to "Automatic" allowed me access. I don't know if anyof this really helped. In the end I found out that the Server Name was simply the name of my computer, "LENOVO_Laptop": not SQLEXPRESS, not SQLEXPRESS, not MSSQLSERVER, not Local, or Localhost or LocalDB but just the name of my computer, Go figure. Again, thanks for your help. I think I'm back in business :-)

1 solution

 
Share this answer
 
Comments
Maciej Los 11-Jan-15 11:29am    
+5
Mehdi Gholam 11-Jan-15 14:41pm    
Cheers Maciej!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900