Click here to Skip to main content
15,911,789 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi,
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).. anyone have a solution???
Posted
Updated 26-Sep-14 3:14am
v2
Comments
[no name] 26-Sep-14 9:15am    
check ur connection string..
Rajan from Thiruvananthapuram 26-Sep-14 9:16am    
This is not a connection string problem
[no name] 26-Sep-14 9:28am    
so. question is not clear please explain..
[no name] 26-Sep-14 9:30am    
How do you know that? The error message clearly tells you that the server cannot be found.
Leo Chapiro 26-Sep-14 9:15am    
Unclear or incomplete

Did you Google for[^]?
 
Share this answer
 
 
Share this answer
 
Comments
Rajan from Thiruvananthapuram 26-Sep-14 9:37am    
i already referred that site.. but the same error occurred..
King Fisher 27-Sep-14 0:05am    
Then check your Event Viewer. if any issue occured
check these things
1. Make sure your database engine is configured to accept remote connections(I you are using centralized database)
•Start > All Programs > SQL Server 2005 > Configuration Tools > SQL Server Surface Area Configuration
•Click on Surface Area Configuration for Services and Connections
•Select the instance that is having a problem > Database Engine > Remote Connections
•Enable local and remote connections
•Restart instance

2. Check the SQL Server service account
•If you are not using a domain account as a service account (for example if you are using NETWORK SERVICE), you may want to switch this first before proceeding

3.If you are using a named SQL Server instance, make sure you are using that instance name in your connection strings in your ASweb P.NET application
•Usually the format needed to specify the database server is machinename\instancename
•Check your connection string as well
 
Share this answer
 
Comments
Rajan from Thiruvananthapuram 26-Sep-14 9:34am    
i'm using sql server 2012

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