Generally, it is
surface area configuration error or
sql service configuration issue. Have a look at this thread for potential reasons and resolutions:
Resolving A network-related or instance-specific error occurred while establishing a connection to SQL Server[
^]
If needed, See steps for setting up Surface area configuration
here..
Here, look at the following blog entries related to the same:
Under the default settings SQL Server does not allow remote connections[
^]
It says:
I. Make sure that Remote Connections are enabled in Surface Area Configuration tool
II. Check Whether TCP/IP protocol is enabled in the SQL Server Configuration Manager
III. Make sure that SQL server Browser service is running
Also look at this:
SQL SERVER – FIX : ERROR : (provider: Named Pipes Provider, error: 40...[
^]
It says:
I. SQL Server should be up and running.
II. Enable TCP/IP in SQL Server Configuration
III. Open Port in Windows Firewall
IV. Enable Remote Connection
V. Enable SQL Server Browser Service
VI. Create exception of sqlbrowser.exe in Firewall
VII. Recreate Alias
If these does not resolve your issue, have a look at these thread:
How to configure SQL Server 2005 to allow remote connections[
^]
Similar issues: A network-related..[
^]
SQL SERVER FIX ERROR (provider: Named Pipes [
^]