SQL Server服务默认端口是1433,AlwaysOn、Mirror等HA技术中用到5022端口,下面将图示说明开启1433和5022的步骤:
- 打开Windows Filewall with Advanced Security,点击’New Rule‘新建Inbound Rules
- 指定端口1433,5022 (TCP 1433, 4022, 135, 1434, UDP 1434.)
- 下一步
- 下一步
- 指定名称,然后点击'Finish'
To open the Windows Firewall item
1.On the Start menu, click Run, and then enter firewall.cpl.
2.Click OK
To add a program exception to the firewall using the Windows Firewall item in Control Panel.
1.On the Exceptions tab of the Windows Firewall item in Control Panel, click Add a program.
2.Browse to the location of the instance of SQL Server that you want to allow through the firewall, for example C:\Program Files\Microsoft SQL Server\MSSQL10_50.<instance_name>\MSSQL\Binn, select sqlservr.exe, and then click Open.
C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\sqlservr.exe
3.Click OK.