Introduction
A network-related or instance-specific error occurred while establishing a connection to the SQL server. the server was not found or was not accessible. verify that the instance name is correct and that the SQL server is configured to allow remote connections. (provider: named pipes provider, error: 40 - could not open a connection to SQL server).
I will provide step by step for Troubleshooting with screenshots below.
Step 1. Go to the services Page and check the SQL Server (SQL EXPRESS) Status Running.
Step 2. Next SQL Server Management Studio View Tap object explorer.
Next expand “SQL server log” and click on the current log on which you have to apply filter.To apply filer click apply filter and type ” server is listening on” in Message contains text box. Click apply filter and press ok.
“server is listening on [‘any’ <ipv4> 1433]” should be shown. SQL Server instance is listening on all computers with IP address IPv4 and TCP port is 1433 (default).
Step 3. “All programs”, point to SQL server configuration tools, “SQL server configuration management”
Next Enabling protocols for port 1433 Select “protocols for MSSQL server”. Click on “TCP\IP” in the right panel
In the tab “protocol” set enable as “yes”.
then Choose the “IP Address tab” from the window and set “TCP Port” equal to “1433″ in the “IP All” entry. click Ok
Step 4. Next, Click “Start” and start “Firewall.cpl” in the run box.
Click on “Advanced Settings.
Tap the Inbound Rules from the left pane of the “Windows Firewall with Advanced Security” and click the New Rule from the “Actions” window.
Select “Port” under “Rule Type” and press the “Next” button.
Now select “Specific local ports” and set it to 1433.
Now select “Allow the connection” in the “Action” dialog and press the Next button.
Give the rule a “title” on this stage and press the “Finish” button.
Then finally solved the problem of the migration database.
Conclusion
This article taught us A network-related or instance-specific error occurred while establishing a connection to an SQL server. If you have any questions, please contact me.
Thanks.