sqlserver 2005连接超时采用bat命令解决

本文提供了一个批处理脚本openSql.bat,用于自动开启SQL Server及其相关服务的各种常用端口,包括默认实例端口1433、专用管理员连接端口1434等,同时涵盖了分析服务端口如2383,以及HTTP、SSL等通用应用端口。
摘要由CSDN通过智能技术生成

将以下内容保存为 openSql.bat 双击运行即可

@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 

转载于:https://www.cnblogs.com/smartsmile/p/6234252.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值