我正在从Azure数据科学虚拟机上托管的SSMS连接到我的Azure sql数据库。我经常连接到Azure SQL数据库。
当连接断开时,我观察到以下模式:
DSVM已加入我们客户的域,我们通过Citrix连接到它。请提供任何解决间歇性连接问题的建议。
下面是我完成的一些疑难解答的详细信息。
答案 0 :(得分:0)
这似乎是DNS解析问题,您可以在与我们共享的第一个屏幕上阅读。看来您有间歇性的DNS名称解析。
打开命令提示符窗口,然后使用PING命令确认名称解析成功将您的逻辑服务器名称转换为IP地址。由于SQL数据库将永远不会响应ping请求,因此出现了如下所示的“请求超时”消息。
C:\>ping <myserver>.database.windows.net
Pinging data.sn1-1.database.windows.net [65.55.74.144] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 65.55.74.144:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)
如果此步骤间歇性失败,请与网络管理员,Citrix管理员或Internet服务提供商联系,以寻求解决名称解析问题的帮助。
接下来,在命令提示符窗口中,尝试使用上一步中返回的IP地址远程登录到端口1433。这将测试是否有防火墙/路由器阻止对端口1433的访问。
C:\>telnet 65.55.74.144 1433
Connecting To 65.55.74.144...
a。如果Telnet成功,则窗口将变为完全空白的屏幕。退出并继续下一步。 b。如果操作不成功,请捕获输出,并将其与tracert输出一起提供给您的网络管理员或Citrix管理员。
接下来,在命令提示符窗口中,尝试通过telnet到DNS名称而不是IP地址来重复测试。
C:\>telnet <myserver>.database.windows.net 1433
注意:如果Telnet不属于默认Windows安装的一部分,则可以从“添加/删除Windows组件”中启用它。
最后,要隔离网络问题,请使用this之类的Microsoft网络监视器工具生成网络跟踪。
通过添加过滤器TCP.port == 1433来查看跟踪,该过滤器将显示TCP端口1433上的对话。如果看不到服务器返回的ACK,则很可能是网络或网络上的连接被阻止了通过互联网。
连接失败的网络摘要:
11:12:27.007 25 {TCP:7, IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net TCP TCP:Flags=......S., SrcPort=49411, DstPort=1433, PayloadLen=0, Seq=2375502765, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192
11:12:30.007 26 {TCP:7, IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net TCP TCP:[SynReTransmit #25]Flags=......S., SrcPort=49411, DstPort=1433, PayloadLen=0, Seq=2375502765, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192 11:12:36.007 29 {TCP:7, IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net TCP TCP:[SynReTransmit #25]Flags=......S., SrcPort=49411, DstPort=1433, PayloadLen=0, Seq=2375502765, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 819211:12:48.014 40 {TCP:12, IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net TCP TCP:Flags=......S., SrcPort=49412, DstPort=Microsoft-DS(445), PayloadLen=0, Seq=3206081271, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192
11:12:49.015 41 {TCP:13, IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net TCP TCP:Flags=......S., SrcPort=49413, DstPort=Microsoft-DS(445), PayloadLen=0, Seq=1361088072, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192
11:12:49.019 42 {IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net ICMP ICMP:Echo Request Message, From 111.11.11.111 To 65.55.74.144
11:12:50.769 45 {IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net ICMP ICMP:Echo Request Message, From 111.11.11.111 To 65.55.74.144
11:12:51.014 46 {TCP:12, IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net TCP TCP:[SynReTransmit #40]Flags=......S., SrcPort=49412, DstPort=Microsoft-DS(445), PayloadLen=0, Seq=3206081271, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192 11:12:52.015 47 {TCP:13, IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net TCP TCP:[SynReTransmit #41]Flags=......S., SrcPort=49413, DstPort=Microsoft-DS(445), PayloadLen=0, Seq=1361088072, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 819211:12:52.771 48 {TCP:14, IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net TCP TCP:Flags=......S., SrcPort=49414, DstPort=NETBIOS Session Service(139), PayloadLen=0, Seq=265110652, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192
11:12:55.771 49 {TCP:14, IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net TCP TCP:[SynReTransmit #48]Flags=......S., SrcPort=49414, DstPort=NETBIOS Session Service(139), PayloadLen=0, Seq=265110652, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192 11:12:57.021 52 {TCP:12, IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net TCP TCP:[SynReTransmit #40]Flags=......S., SrcPort=49412, DstPort=Microsoft-DS(445), PayloadLen=0, Seq=3206081271, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192 11:12:58.016 53 {TCP:13, IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net TCP TCP:[SynReTransmit #41]Flags=......S., SrcPort=49413, DstPort=Microsoft-DS(445), PayloadLen=0, Seq=1361088072, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192 11:13:01.771 56 {TCP:14, IPv4:6} 111.11.11.111 data.sn1-1.database.windows.net TCP TCP:[SynReTransmit #48]Flags=......S., SrcPort=49414, DstPort=NETBIOS Session Service(139), PayloadLen=0, Seq=265110652, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192
在这里我们可以看到客户端正在尝试建立与SQL数据库的连接,并不断重传3次而失败
成功连接的跟踪摘要:
14:50:01.512 847 SQLCMD.EXE {TCP:428, IPv4:427} 99.99.999.99 157.54.118.18 TCP TCP:Flags=......S., SrcPort=13415, DstPort=1433, PayloadLen=0, Seq=4009972475, Ack=0, Win=8192 ( Negotiating scale factor 0x2 ) = 8192
14:50:01.515 848 SQLCMD.EXE {TCP:428, IPv4:427} 157.54.118.18 99.99.999.99 TCP TCP:Flags=...A..S., SrcPort=1433, DstPort=13415, PayloadLen=0, Seq=2117383693, Ack=4009972476, Win=8192 ( Scale factor not supported ) = 8192
14:50:01.516 849 SQLCMD.EXE {TCP:428, IPv4:427} 99.99.999.99 157.54.118.18 TCP TCP:Flags=...A...., SrcPort=13415, DstPort=1433, PayloadLen=0, Seq=4009972476, Ack=2117383694, Win=17040 (scale factor 0x0) = 17040
上面的代码段表示成功的三向握手。