Click here to Skip to main content
15,076,130 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using Microsoft SQL Server 2019 (OS: Windows Server 2019). It is running fine till yesterday. But suddenly I am not able to connect the database. I did not change anything, but still I check service status, ping that ip, port number, firewall, as well as firewall of local computer. Everything is ok, but unable to connect database (but also connect to server using remote desktop, no firewall issue). Interestingly some other computer can connect database normally (using SQL Server Management Studio 2018).

From yesterday, I try to find out the issue, but not getting any hints. If there is problem on server then no one will connect. If firewall block me (from both side), then I can not connect server.

Can any one please give some idea? Please...

Note: I try to check port using: Test-NetConnection xxx.xxx.xxx.xxx -Port 1433 (using PowerShell). But result is fail (But it successfully connect IP).

Below is the Error: (SQL Server Management Studio 2018)
Quote:

Cannot connect to xxx.xxx.xxx.xxx.

===================================

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)

For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-53-database-engine-error

Error Number: 53 Severity: 20 State: 0

Program Location:

at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server) at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

===================================

The network path was not found


What I have tried:

On Server:
i) SQL Server Running Properly ii) Port Number is Correct iii) Listening Correct Port iv) TCP/IP enabled v) Port is open on firewall

On Local:
i) Added server IP on allow rule on firewall ii) Ping that server Properly iii) Try to connect using IP and port number using SQL Server Management Studio (2018) iv) Successfully connecting server (using RDP). v) Only problem is: Result showing fail when I try to check port using: Test-NetConnection xxx.xxx.xxx.xxx -Port 1433 (using PowerShell). But it successfully connect IP.

This computer working fine two days before. And also some other computer connect databasse normally, which belong seperate subnet.

So what will be the cause some computer can connect database but some are not.

Thanks in advance.
Posted
Updated 3-Aug-21 5:38am

1 solution

If other computers can connect, then SQL is configured to accept remote connections.

So that leaves the firewall, and the protocol you're using.

The error message mentions named pipes, which I don't think will work across firewalls. Make sure you're using TCP/IP to connect, and then check the rules on every firewall between the failing computer and the SQL server.
   
Comments
Subrata.In 3-Aug-21 12:14pm
   
Thanks for your reply. I try to connect using IP address (and also added port number). Also checked firewall. I added allow rules, where I specify server IP.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900