How do I open the firewall port for SQL Server on Windows Server 2008?
The script that is discussed in this section opens the firewall ports for SQL Server.
To create the script, follow these steps:
- Start Notepad.
- Copy and paste the following code into Notepad:
@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
- Save the file as a .txt file by using the following name: OpenSqlServerPort.txt
- Rename the OpenSqlServerPort.txt file to the following: OpenSqlServerPort.bat
Before you run the OpenSqlServerPort.bat script, you must copy the script to the computer which has the firewall and then run the script on that computer. To run the script, follow these steps:
- Click Start, click Run, type cmd, and then click OK.
- At the command prompt, use the cd command to navigate to the folder in which you saved the OpenSqlServerPort.bat file.
- To run the OpenSqlServerPort.bat script, type OpenSqlServerPort.bat at the command prompt, and then press ENTER.
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.


Comments
No comments yet.
Leave a comment