How do I open the firewall port for SQL Server

(Last Updated On: 2017/11/04)

Windows Firewall on Windows Server 2008 helps prevent unauthorized access to computer resources. However, if the firewall is configured incorrectly, attempts to connect to an instance of SQL Server may be blocked. To access an instance of SQL Server that is behind the firewall, you must configure the firewall on the computer that is running SQL Server.

This article helps you open the firewall ports for SQL Server on Windows Server 2008.  To have us fix this problem for you, go to the “Fix it for me” section. If you prefer to fix this problem yourself, go to the “Let me fix it myself” section.


  • [Nem található a letöltés]

Let me fix it myself

The script that is discussed in this section opens the firewall ports for SQL Server.

To create the script, follow these steps:

  1. Start Notepad.
  2. 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
  1. Save the file as a .txt file by using the following name: OpenSqlServerPort.txt
  2. 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:

  1. Click Start, click Run, type cmd, and then click OK.
  2. At the command prompt, use the cd command to navigate to the folder in which you saved the OpenSqlServerPort.bat file.
  3. To run the OpenSqlServerPort.bat script, type OpenSqlServerPort.bat at the command prompt, and then press ENTER.

Végzettségem informatikus, Rendszerinformatikus. 2010 óta készítem valko.hu, media-valko.hu, valko-ksk.tk és 2016. évtől az iskola.valko.hu oldalait. Jelenleg a valkói Községi Könyvtárában dolgozom.

További tetteim: torokbutor.hupc-valko.humalota.huirodakoltoztetes.hubudapest-költöztetés.huexpress-teher.hupancelszekrenyszallitas.huzongoraszallitas.hu

Tags:  

Leave a reply

©2016 idStudio & SMThemes.com