sqlserver 2005连接超时采用bat命令解决
程序员文章站
2022-06-04 23:19:31
将以下内容保存为 opensql.bat 双击运行即可 复制代码 代码如下: @echo ========= sql server ports ==============...
将以下内容保存为 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
复制代码 代码如下:
@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