Provider named pipes provider error 40 could not open a connection to SQL Server error 2
Well I have an easy solution for your question. Follow the steps:
- Go to SQL Server Configuration manager
- SQL Server Network Configuration:
- Protocol for MSSQLSERVER
- In the right pane split page you will have to disable VIA as follows
- Shared Memory - Enable
- Named Pipes - Enable
- TCP/IP - Enable
- VIA - Disable
Search for services in control panel, there you will find and entry View Local Services in Admin tool section
select it that will show a window with all services in your system, find your service SQLEXPRESS and click on Start. It should start your server instance :)
In Sql Server Configuration Manager program, start SQL SERVER, enable the TCP/IP connection. After, allow the port in the firewall to be sure that's ok.