Cannot connect to [database name]. 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)

Server Name: Make sure you are typing server name (i.e. host name or computer name) correctly along with the proper instance name of an installed instance of SQL Server.

As, even using ‘(local)’ or ‘(localhost)’ can also cause this error:

Correct format is: Server-name\db-instance-name. e.g. Server01\SQLExpress2008

Also (if using Windows Authentication mode) make sure the format of the username is as follows: Server-name\User-name. e.g. Server01\Administrator