windows 2008达到启用防火墙后sqlserver 2005经常出现连接超时的解决办法

昨将sqlserver2005从windows2003搬迁至windows2008系统上后,发现时不时打开网页时提醒sql
server连接超时,但是有时又是正常的,一开始一直以为是网络连接不好,后来察觉过期时,远程连接了健康,所以排除了及时无异元素,查看防火墙,发现1433端口tcp,udp也是许通过的,无奈只得百度,发现于windows2008达标除1433,还发另外端口需要打开,这里拿网上的资料整理了一个批判处理文件,大家将下面的情节保留成openSql.bat,以管理人身份登录windows2008继双击运行即可

@echo =========  SQL Server Ports  ===================
@echo Enabling SQLServer default instance port 1433
netsh firewall set portopening TCP 1433 “SQLServer”
@echo Enabling Dedicated Admin Connection port 1434
netsh firewall set portopening TCP 1434 “SQL Admin Connection”
@echo Enabling conventional SQL Server Service Broker port 4022 
netsh firewall set portopening TCP 4022 “SQL Service Broker”
@echo Enabling Transact-SQL Debugger/RPC port 135
netsh firewall set portopening TCP 135 “SQL Debugger/RPC”
@echo =========  Analysis Services Ports  ==============
@echo Enabling SSAS Default Instance port 2383
netsh firewall set portopening TCP 2383 “Analysis Services”
@echo Enabling SQL Server Browser Service port 2382
netsh firewall set portopening TCP 2382 “SQL Browser”
@echo =========  Misc Applications  ==============
@echo Enabling HTTP port 80
netsh firewall set portopening TCP 80 “HTTP”
@echo Enabling SSL port 443
netsh firewall set portopening TCP 443 “SSL”
@echo Enabling port for SQL Server Browser Service’s ‘Browse’ Button
netsh firewall set portopening UDP 1434 “SQL Browser”
@echo Allowing multicast broadcast response on UDP (Browser Service
Enumerations OK)
netsh firewall set multicastbroadcastresponse ENABLE

相关文章