This is the common error when we are working with sql server.It will
occur while establishing a connection to sqlserver.In this post i will
explain how to resolve network and remote connection error.First we need to check the given data source name is correct or not in connection string.The
TCP/IP protocol or in some instance the Named Pipes protocol should be enable to made such type connection.The
following steps will describe how to enable TCP/IP or Named Pipes protocol in sql
server configuration manager
Go To-->Configuration Tools folder which is in MS Sql Server 2008 folder in start menu
Go To-->Configuration Tools folder which is in MS Sql Server 2008 folder in start menu
2.Select server Network configuration-->click on protocols for SQLEXPRESS.
Then we can see the protocols at Right side panel.By default the
TCP/IP status is in disable mode.So we need to change status to enable
3.Select SQL Server Services --> right-click on your instance of SQLEXPRESS / SQLServer and click "restart"
Reference