SQL Server Error 1421: Fix Remote Communications
In this article
SQL Server error 1421 ("Communications to the remote server instance failed") means the local SQL Server could not establish or maintain a connection to a linked server or remote instance. The fix is almost always network reachability first, then the SQL Server Browser service and firewall rules, then authentication and linked-server configuration. Work through the steps below in order; most people resolve it by step 4.
What You'll Need
- Administrative access to the SQL Server instance (to run queries and view error logs).
- Permission to change Windows services and firewall rules on both the local and remote machines, or a network admin who can.
- The exact server name or IP and instance name of the remote SQL Server.
- A way to test basic network connectivity, such as
pingandtelnetorTest-NetConnectionin PowerShell.
Step-by-Step
- Confirm the exact error and where it occurs. Run the failing query or linked-server call and note the full message. Error 1421 often appears alongside a lower-level error such as "A network-related or instance-specific error" or a timeout. Check the SQL Server error log (SSMS > Object Explorer > Management > SQL Server Logs) for the same timestamp; the log usually names the remote server and the reason.
- Test basic network reachability. From the local server, run
ping <remote-server>. If ping fails, stop here and involve your network team: DNS resolution, routing, or a VPN may be the problem. If ping succeeds, test the SQL Server port. The default instance listens on TCP 1433; a named instance uses a dynamic port unless configured otherwise. Use PowerShell:Test-NetConnection <remote-server> -Port 1433. A failed port test points to a firewall or a service that is not listening. - Make sure the remote SQL Server service is running. On the remote machine, open Services (services.msc) and confirm the SQL Server service for that instance is started. If it is stopped, start it and retry. Also confirm the instance is configured to allow remote connections: in SQL Server Management Studio, right-click the server > Properties > Connections, and ensure "Allow remote connections to this server" is checked. Labels can differ slightly by version.
- Start and verify the SQL Server Browser service for named instances. If you connect to a named instance (for example
SERVER\SQLEXPRESS), the SQL Server Browser service on the remote machine must be running so clients can discover the port. Open Services on the remote machine, find SQL Server Browser, and set it to start automatically, then start it. Without it, connections to named instances can fail even when the instance itself is healthy. - Check Windows Firewall rules on both machines. On the remote server, open Windows Defender Firewall with Advanced Security > Inbound Rules and confirm there is an allow rule for SQL Server (TCP 1433 for the default instance, or the configured port for a named instance). If the instance uses a dynamic port, either configure a static port in SQL Server Configuration Manager (SQL Server Network Configuration > Protocols for [instance] > TCP/IP > IP Addresses) or add a rule for the SQL Server program. On the local machine, outbound rules rarely block SQL traffic, but check if a third-party firewall is installed.
- Verify the connection string or linked-server definition. For a linked server, expand Server Objects > Linked Servers in SSMS, right-click the linked server, and open Properties. Confirm the server name matches exactly what the remote machine reports (run
SELECT @@SERVERNAMEon the remote instance). Check the Security page: if it uses "Be made using the login's current security context" or a specific login, make sure that login exists on the remote server with the needed permissions. A wrong name or missing login can surface as error 1421. - Test with a direct connection from the local machine. In SSMS on the local server, try connecting to the remote instance using the same name and credentials. If that works but the linked server fails, the problem is in the linked-server configuration rather than the network. If the direct connection also fails, return to the network and service checks above.
- Restart the SQL Server service on the local machine if needed. After changing firewall rules, the Browser service, or network configuration, restart the local SQL Server service so it re-resolves the remote name and re-establishes connections. This is safe for the service but will briefly disconnect active sessions, so do it in a maintenance window.
Common Mistakes
- Testing only with
pingand assuming the port is open. Ping uses ICMP, which firewalls often allow while blocking TCP 1433. - Forgetting the SQL Server Browser service on named instances, then chasing firewall rules that were never the issue.
- Using a server alias or DNS name that resolves differently from the local machine than from the remote one.
- Changing firewall rules but not restarting the SQL Server service, so the old connection state persists.
- Assuming error 1421 is always a network fault. It can also come from a linked-server login that lacks permissions or a remote instance that is paused or starting up.
Tips
- Configure a static TCP port for named instances so firewall rules stay valid across restarts.
- Keep the remote server name consistent: use the same name in the linked-server definition that the remote instance reports via
SELECT @@SERVERNAME. - When testing, use
Test-NetConnectionrather thantelnet; it is available by default on modern Windows and reports the port state clearly. - Check the SQL Server error log on both machines at the exact failure time; the remote log often shows a login attempt or a refused connection that explains the local error.
Troubleshooting
If the port test fails, confirm the SQL Server service is listening by running netstat -ano | findstr :1433 on the remote machine. If nothing is listening, the instance may be configured for shared memory only, or the service is not running. If the port is listening but connections still fail, check for a firewall between the two machines, including any network appliance, and confirm the client is using TCP rather than named pipes. If authentication is the issue, test with a SQL login that has explicit permissions on the remote instance. If the linked server works for one login but not another, review the Security page of the linked-server properties and the remote login mappings. If all else fails, remove and recreate the linked server definition, which clears stale metadata; note that this deletes the linked-server configuration and any saved credentials, so record them first.
Frequently Asked Questions
What does SQL Server error 1421 mean exactly?
It means the local SQL Server could not communicate with a remote server instance, usually a linked server or a remote query target. It is a wrapper error; the underlying cause is in the accompanying message or the error log.
Is error 1421 always a firewall problem?
No. It can be caused by a stopped service, a missing SQL Server Browser service, a wrong server name, or a login without permissions on the remote instance.
Do I need to open port 1433 for a named instance?
Not necessarily. Named instances often use dynamic ports. Either open the specific port the instance is using or configure a static port in SQL Server Configuration Manager and open that.
Can error 1421 happen intermittently?
Yes. Intermittent failures usually point to network instability, DNS resolution issues, or a remote instance that is restarting or under load. Check the error log timestamps against network events.
Does restarting SQL Server fix error 1421?
Sometimes, because it forces the service to re-resolve the remote name and rebuild connections. It is a safe step but only a temporary fix if the underlying network or configuration problem remains.