SQL Server Connection Error: Network Issue

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).

CMD

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.

SQL Server

Step 2. Next SQL Server Management Studio View Tap object explorer.

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.

Logs

“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).

Select Logs

Step 3. “All programs”, point to SQL server configuration tools, “SQL server configuration management”

SQL Configuration Manager

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 

Tcp POst

Step 4. Next, Click “Start” and start “Firewall.cpl” in the run box.

Run

Click on “Advanced Settings.

Advanced Setting

Tap the Inbound Rules from the left pane of the “Windows Firewall with Advanced Security” and click the New Rule from the “Actions” window. 

Inbound Rules

Select “Port” under “Rule Type” and press the “Next” button.

Port

Now select “Specific local ports” and set it to 1433.

Rule type

Now select “Allow the connection” in the “Action” dialog and press the Next button.

Action

Profile

Give the rule a “title” on this stage and press the “Finish” button.

SQL Browser

Then finally solved the problem of the migration database.

Problem solved

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.


Similar Articles