How to Check If SQL Server Allows Remote Connections
To check whether SQL Server allows remote connections, connect from another computer to the instance’s actual TCP port and run a query. A reachable port confirms network access, while a successful SQL login and query confirm that the connection works for that client and account. The steps below cover SQL Server on Windows, with separate checks for named instances and Azure SQL Database.
What Allows Remote SQL Server Connections
Remote client access depends on a working network path to the Database Engine and a successful login, not the legacy remote access setting.
For a TCP connection to work, the Database Engine must be running, TCP/IP must be enabled on the appropriate interface, and firewalls must allow traffic to the instance’s listening port. The client must also satisfy authentication and encryption requirements.
The confusing part is the Allow remote connections to this server checkbox in SQL Server Management Studio (SSMS). It controls the deprecated remote access option for SQL Server-to-SQL Server stored-procedure execution, not ordinary application connections, according to Microsoft’s remote access documentation.
Enabling that option and opening the usual SQL Server port can still leave an instance unreachable. Test the actual endpoint from the computer that needs access before changing settings.
How to Check and Enable SQL Server Remote Connections
Start with a client-side connection attempt. If it succeeds, you do not need to change the server configuration. Server-side changes require appropriate administrative access, and a Database Engine restart interrupts existing connections.
Use the result of your test to choose the next action.
| Test Result | What It Establishes | Next Action |
|---|---|---|
| A remote SQL query succeeds over TCP | The instance accepts connections from this client using this login | Verify the application’s database access |
| The TCP port test fails | The client cannot establish a TCP connection to that endpoint | Check the service, listening address, port, firewall, and routing |
| The TCP port test succeeds, but SQL reports “Login failed” | A listener is reachable, but authentication was rejected | Check the login, authentication method, and SQL Server error log |
| The connection reports a certificate or TLS error | The attempt reached encryption negotiation | Check certificate trust, hostname matching, and client encryption requirements |
| The explicit port works, but the instance name fails | The Database Engine is reachable; instance discovery may be failing | Check SQL Server Browser or use the explicit port |
Step 1: Try a TCP Connection From the Remote Computer
- Open SSMS on the workstation or application host that needs access, not on the SQL Server host itself.
- Select Database Engine.
- Enter the server endpoint. If you know its listening port, use this format, replacing the placeholders:
tcp:<servername>,<portnumber>The
tcp:prefix forces TCP, and the comma separates the hostname from the port. This format also works for a default instance configured to use a nondefault port. - Choose the authentication method your account is configured to use, then connect.
- Run this read-only query:
SELECT SERVERPROPERTY('ServerName') AS server_name, CONNECTIONPROPERTY('net_transport') AS net_transport, CONNECTIONPROPERTY('local_net_address') AS server_ip, CONNECTIONPROPERTY('local_tcp_port') AS server_port, CONNECTIONPROPERTY('client_net_address') AS client_ip;
A successful result showing TCP, the intended instance, and the expected endpoint confirms remote TCP connectivity for that client and login.
If you know only the usual server or instance name, try that endpoint first. If the connection fails, save the complete error message and determine the actual listening port before concluding that remote access is blocked.
Step 2: Verify That the Database Engine Is Running
- On the SQL Server host, open PowerShell and list the SQL Server services:
Get-Service | Where-Object { $_.DisplayName -like 'SQL Server*' } - Find the Database Engine service for the intended instance: –
SQL Server (MSSQLSERVER)is the default instance. –SQL Server (<InstanceName>)is a named instance. - Confirm that its status is
Running. A running SQL Server Browser or SQL Server Agent service does not mean the Database Engine is running. - If the Database Engine is stopped and is supposed to be available, open Windows Services, select the correct SQL Server service, and choose Start. If it fails to start, inspect the SQL Server error log before changing firewall rules.
For a newly installed instance, check the edition as well. SQL Server Developer, Express, and Evaluation editions initially restrict access from other computers; their network protocols, ports, and firewall access must be configured before external clients can connect. You can confirm the installed edition through the instance’s Server Properties > General page in SSMS.
Step 3: Check TCP/IP and the Actual Listening Port
- Open SQL Server Configuration Manager on the server. Match the console file to the installed SQL Server major version. For SQL Server 2025 (17.x), open:
C:\Windows\SysWOW64\SQLServerManager17.mscFor SQL Server 2022 (16.x), open:
C:\Windows\SysWOW64\SQLServerManager16.msc - Navigate to SQL Server Network Configuration > Protocols for \<InstanceName>.
- Check whether TCP/IP is enabled. Inspect the server’s protocol configuration, not just the client protocol settings.
- Open TCP/IP > Properties > IP Addresses and inspect the port configuration.
The default instance normally listens on TCP port 1433, but it can be configured differently. Named instances, including SQL Server Express, commonly use dynamic ports.
When Listen All is set to Yes, inspect IP Addresses > IP All > TCP Port and TCP Dynamic Ports. When Listen All is No, inspect the individual IP address sections and verify that the interface clients need is enabled.
Do not assume a blank TCP Port field means there is no listener: dynamic-port configuration uses a separate field. Also, configuration changes may be waiting for a restart.
To verify the active listener, open Management > SQL Server Logs > Current in SSMS and find the current startup entries containing “Server is listening on.” Identify the Database Engine’s client listener and its port, rather than a dedicated administrator connection entry. Confirm that it listens on an address reachable by remote clients, not only a loopback address.
Step 4: Test the Port From the Client
- From the remote Windows computer, test TCP connectivity to the SQL Server host using its actual listening port.
- Open PowerShell and run this command. Enter the server hostname or IP address and the actual listening port when prompted:
Test-NetConnection -ComputerName (Read-Host "SQL Server hostname or IP address") -Port ([int](Read-Host "SQL Server TCP port")) - Inspect
TcpTestSucceeded.
A result of True means the client established a TCP connection to that host and port.
A result of False means the endpoint is not reachable from that client. Check the resolved address in the output, then investigate the listener, host firewall, intermediate network controls, and routing.
If you suspect DNS, test the expected IP address to isolate name resolution. Keep the correct DNS hostname for the final SQL connection, particularly when certificate validation depends on it. A successful ping alone does not establish SQL Server port access, and a blocked ping does not establish that SQL Server is unavailable.
Step 5: Correct Only the Failed Settings and Retest
If the instance already accepts the remote query, leave its connectivity settings alone. Otherwise, make only the changes your checks justify.
- Enable TCP/IP if it is disabled. In SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for \<InstanceName>, right-click TCP/IP and select Enable.
- Use a stable port when a named instance needs a port-based firewall rule. Dynamic ports can change when the instance restarts. For a new named-instance static-port assignment, choose an available port from 49152 through 65535, following Microsoft’s SQL Server connection tutorial. With Listen All set to Yes, open TCP/IP > Properties > IP Addresses. Clear TCP Dynamic Ports in the IP All section and enter the chosen number in IP All > TCP Port. If the instance deliberately uses individual IP settings, configure the intended enabled address instead of assuming IP All controls it. Do not replace an existing approved static port merely to match an example.
- Restart the correct Database Engine service after protocol or port changes. In SQL Server Configuration Manager > SQL Server Services, restart SQL Server (\<InstanceName>) during an approved maintenance window. Restarting SQL Server Browser does not apply Database Engine protocol changes. Confirm the resulting listener in the current SQL Server error log.
- Allow the actual listening port through the firewall. In Windows Defender Firewall with Advanced Security > Inbound Rules > New Rule > Port, select TCP and enter the configured port under Specific local ports. Choose Allow the connection, apply the appropriate firewall profiles, and give the rule a descriptive name. In the rule’s Properties > Scope, restrict remote addresses to the approved client addresses or subnets. Check any intervening network firewall or cloud security rule as well. Do not disable the firewall or expose the database broadly to the internet as a diagnostic shortcut.
- Finish with a remote SQL connection. From the client, connect in SSMS using the explicit TCP hostname-and-port endpoint and the intended account. Run:
SELECT SERVERPROPERTY('ServerName') AS server_name, DB_NAME() AS database_name, CONNECTIONPROPERTY('net_transport') AS net_transport;
If the listener is reachable but SQL Server rejects the login, investigate the configured authentication method, login status, credentials, and requested database. Error 18456 means “Login failed”; its accompanying server error-log details help identify the reason.
For a certificate or TLS error, correct certificate trust, hostname matching, or incompatible client settings. Do not treat disabling encryption or bypassing certificate validation as the normal fix.
Check Named-Instance Discovery
An explicit TCP hostname-and-port connection bypasses named-instance port discovery.
A connection using a computer name and instance name usually relies on SQL Server Browser to find the instance’s port:
<computer_name>\<instance_name>
SQL Server Browser receives discovery requests on UDP port 1434. If the service is stopped, discovery traffic is blocked, or the instance is hidden from Browser, a client may fail to connect by instance name even though the Database Engine’s TCP listener is reachable.
There are two practical options:
- Use the explicit TCP endpoint. Configure a stable Database Engine port, allow that TCP port from approved clients, and connect using the hostname and port. Finish by logging in remotely and running a query.
- Keep instance-name discovery. Confirm that SQL Server Browser is running and that the intended instance is available for discovery. Allow the Browser’s UDP traffic from approved clients as well as the Database Engine’s TCP port, then retry the named-instance connection and run a query.
Browser discovery does not replace the Database Engine firewall rule. It tells the client where to connect; it does not carry the database connection itself.
Check Azure SQL Database Network Access
Azure SQL Database uses logical-server networking controls rather than the Windows Configuration Manager procedure.
In the Azure portal, open the SQL logical server’s Networking settings and inspect public network access, firewall rules, and private endpoint configuration. You can also inspect the public-access setting with Azure CLI, replacing the example resource names:
az sql server show -n sql-server-name -g sql-server-group --query "publicNetworkAccess"
When Public network access is Disabled, only private-endpoint connections are allowed. Public-endpoint attempts are denied and can return error 47073, indicating that the public network interface is not accessible.
If private access is intentional, verify that the client has a route to the private endpoint and that DNS resolves the SQL hostname appropriately. Do not enable public access simply to avoid diagnosing private networking.
If public access is permitted, verify that the logical server’s firewall rules allow the client’s actual outbound public IP address. Then connect from that client using the intended credentials and run a query. Public network access alone does not grant database access.
Confirm and Keep Remote Access Working
Before calling the check complete, verify these conditions:
- The test ran from the computer or application environment that needs access.
- The query reached the intended SQL Server instance over TCP.
- The account can open the application’s target database.
- The application’s actual connection settings work, including authentication and encryption.
- Firewall access is limited to the required sources and destination port.
- Any static-port or protocol change is active, not merely saved in Configuration Manager.
A successful workstation test does not prove that an application container, another subnet, or a different account can connect. Repeat the final connection check from the real application environment.
Once the remote query succeeds, record the working hostname, port, instance, and authentication method. Update the application’s connection configuration if needed, and remove temporary diagnostic firewall exceptions that are no longer required.
Frequently Asked Questions
How Can I Check the Legacy Remote Access Setting in SQL?
You can inspect the legacy setting with this read-only query:
SELECT
name,
value AS configured_value,
value_in_use AS active_value
FROM sys.configurations
WHERE name = 'remote access';
SQL Server’s default is 1 (enabled); 0 disables the legacy server-to-server stored-procedure feature, not ordinary client TCP connectivity. In SSMS, open Server Properties > Connections > Remote server connections and inspect Allow remote connections to this server. If you deliberately change this legacy option, restart SQL Server for the change to take effect.
Does a Successful Local Connection Prove Remote Connections Are Allowed?
No: a local connection can use shared memory and bypass the TCP listener and network firewall. Even a local TCP connection does not test the network path from another computer. A remote connection followed by a successful query is the meaningful check for that client.
Can I Check SQL Server Accessibility Without Administrator Rights?
Yes, you can test the TCP port from your computer and attempt a SQL connection using an existing authorized account. You do not need server administrator rights just to perform those client-side checks. Changing server protocols, restarting services, or modifying firewall rules requires the appropriate administrative permissions.
Does SQL Server Express allow remote connections?
Yes. SQL Server Express can be accessed from another computer after its network protocols, ports, and firewall access are configured. When initially installed, SQL Server Express cannot be accessed from another computer. Named instances, including SQL Server Express, listen on dynamic ports.
