EvtID:10060:Cannot 连接到....建立与 SQL 服务器的连接时发生了与网络相关或特定于实例的错误

EvtID:10060:Cannot connect to....A network-related or instance-specific error occurred while establishing a connection to SQL Server

我正在尝试通过 SQL Server Management Studio (SSMS) 2017/18 从我的本地计算机连接 Azure Cloud Sql Database。在服务器防火墙规则中添加了客户端 IP,但未连接并引发如下错误。

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

Cannot connect to integtenantelasticsql.database.windows.net.

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

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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (.Net SqlClient Data Provider)

------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=10060&LinkId=20476

------------------------------ Error Number: 10060 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()

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

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

还执行了以下操作:

-网络重置

-IPV4和IPV6 DNS服务器地址更新。

-SQL 服务器配置管理器 IPV4 TCP 启用禁用

-SQL 服务器服务停止,启动。

-系统 windows 10 64 位最新。

-网络驱动卸载安装

-Telnet

Telnet cmd: telnet integtenantelasticsql.database.windows.net. 443 working.

-C# sql 客户:

我尝试过使用 c# Sql 客户端的示例控制台应用程序,但遇到了同样的问题。

不明白是什么问题?非常感谢帮助。

你能给我建议解决方案吗?

提前致谢。

我的系统防火墙入站设置中没有 TCP 端口 1433 有问题。

所以做了以下步骤

- 为端口 1433 启用协议

-创建防火墙例外

-并申请到数据库引擎实例服务

有关更多详细信息,请参考 link here

按照相同的参考 link 问题解决了。