我MSSQL
在Windows 10计算机(称为)上有一个MS SQL Server 2014实例(称为WINTEN
)。
在上运行SSMS WINTEN
,我既可以连接到本地SQL Server,也可以连接到专用网络上其他计算机上的SQL Server实例。
但是,WINTEN\MSSQL
除非完全关闭Windows Defender防火墙,否则无法建立从任何其他计算机上的SSMS到SQL Server实例的连接。
按照所有说明,我发现我向Windows防火墙添加了两个入站规则,WINTEN
如下所示:
但是,即使有这些规则,只要我启用Windows Defender防火墙,所有SSMS连接就会WINTEN\MSSQL
失败,并显示以下消息:
配置Windows Defender防火墙以允许其他专用网络计算机连接到MS SQL Server的正确方法是什么?
根据第一条建议进行更新:我已经为SQL Server启用了TCP端口1433,如下所示:
打开服务并找到以下条目:
SQL Server浏览器
SQL Server(WINTEN)
进入它们的属性并记下可执行文件的路径。
在具有高级安全性的Windows防火墙中,创建4个新的入站规则,这些规则允许同时为TCP和UDP连接这两个程序。
I normally do this via the standard Windows Firewall (firewall.cpl) which will create these rules for you with less work. Open firewall.cpl, then choose "Allow an app or feature through Windows Firewall". Choose Allow another app and add the two executable paths found previously.
The reason you need to allow the program rather than a port through the firewall is that although the SQL Browser is always on port 1433, your SQL Instance will be on a random/dynamic port which the SQL Browser will direct the connection to. If you wish to allow ports rather than programs then you would need to change the SQL Instance to a default instance and force it to use a fixed port with the SQL browser disabled.
还请检查您的SQL Browser服务是否配置为在启动时自动启动,以及在SQL Configuration Manager中是否为您的SQL实例启用了TCP / IP。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句