【发布时间】:2020-10-23 16:04:52
【问题描述】:
我们无法从客户端计算机(客户端)访问网络 A 上的 SQL Server 计算机(服务器),但在另一台 B 上成功。服务器计算机安装了 SQL Server 2019,客户端计算机安装了 SQL Native Client 11.0。我们可以使用 sqlcmd、udl 接口或 Telnet 从该客户端连接到网络 A 上的服务器。但是在不同的网络 B 上,我们无法从同一个 Client 连接到同一个 Server!什么网络配置可以避免 SQL Server 连接?
服务器参数:
1. We defined firewall rules to allow inbound connection on ports 1433 for TCP and 1434 for UDP. We verified that that is the case on the Server by using "netstat -aon". We disabled the Norton Smart Firewall.
2. We have set this rule to apply to all profiles: Domain, Public, Private.
3. We ensured that all protocols for SQLEXPRESS are allowed and enabld in the SQL Server Configuration Manager, specifically TCP/IP.
4. We have enabled SQL Server Browser.
5. We have restarted all services multiple times after our configuration changes. We have even restarted the machine.
6. We made sure that the Server is accessible remotely and using SQL Server Authentication.
7. We reset both the modem and the router for both Networks before testing.
8. We confirmed both the Computer and the SQL Instance names in the SMSS logins and logs.
Tests we did on Network A:
1. We can ping the Client from the Server, the Server from the Client both with IP addresses and computer names (On Server: "ping -a ClientIP/ComputerName", On Client: "ping -a ServerIP/ComputerName". Both results with "Reply...").
2. We can access the database in the Server using SSMS both with Windows Authentication and SQL Server Authentication.
3. We cannot access to Server from the Client by Windows Authentication either by using "sqlcmd -S Server\sqlexpress -E".
4. We cannot access to Server from the Client by SQL Server Authentication by using "sqlcmd -U User -P Password -S Server\SQLExpress".
On the other hand, when these computers are in Network B, without changing anything we can connect to Server from the Client.
以下是我们收到的错误消息:
sqlcmd -U 用户 -P 密码 -S 服务器\SQLExpress
【问题讨论】:
标签: sql-server networking