我没有收到来自远程SQL Server的响应

[Server1] = MX Linux-最终将成为使用PHP连接到SQL Server的LAMP堆栈(当我弄清楚如何连接时)。
[Server2] = Windows 2012 Server-microsoft SQL Server 2008 R2 Standard

我正在尝试通过sqlcmd将[Server1]连接到[Server2]的SQL数据库。我正在努力寻找此问题的根本原因。到目前为止,我已经检查了以下内容:

  1. IP:port组合正确-TCP端口不是默认端口。
  2. 服务器正在接收初始请求(故意的错误通过会在远程SQL日志文件中创建日志)。
  3. 远程查询超时为5分钟。
  4. 用于超时的SQL Server配置设置都是无限制(-1)。

[Server1]是同一网络上的新LAMP堆栈。
[Server2]是已链接到其他应用程序的正在运行的生产服务器。


sqlcmd -U {USER} -S {IP},63272 -d {DBName} 
Password: 
Sqlcmd: Error: microsoft ODBC Driver 17 for SQL Server : SSL Provider: [error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol].
Sqlcmd: Error: microsoft ODBC Driver 17 for SQL Server : Client unable to establish connection.
sqlcmd -U {USER} -S {IP}:63272 -d {DBName} 
Password: 
Sqlcmd: Error: microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
Sqlcmd: Error: microsoft ODBC Driver 17 for SQL Server : MAX_PROVS: Connection string is not valid [87]. .
Sqlcmd: Error: microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..

mssql-cli

mssql-cli -U {USER} -P {PW} -d {DBname} -S "tcp:{IP},63272"
Error message: Connection Timeout Expired.  The timeout period elapsed during the post-login phase.  The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections.  The duration spent while attempting to connect to this server was - [Pre-Login] initialization=53; handshake=231; [Login] initialization=6; authentication=10; [Post-Login] complete=14043;

仍然没有运气


编辑2:我也忘记提及[Server2]是VM

nc -zv {IP} 63272
{IP}: inverse host lookup failed: Unknown host
(UNKNOWN) [{IP}] 63272 (?) open
jackVSjacky 回答:我没有收到来自远程SQL Server的响应

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3121390.html

大家都在问