Open a firewall port on Windows
When the Agent runs on a different computer from your database, Windows on the database server has to let it in. This page adds that one rule, click by click, for SQL Server, PostgreSQL, MySQL, MariaDB and Oracle, and shows how to test it.
당신이 최종적으로 얻게 될 것
One inbound rule in Windows Defender Firewall on the computer that holds your database, allowing the database’s port and nothing else, and a test from the Agent’s computer that answers TcpTestSucceeded : True. 그 다음에 테스트 연결 in the Portal can reach the database.
Do you need this at all? Only if the Agent and the database are on 다른 computers. If the Agent is installed on the database server itself, it connects to localhost and the firewall is not involved; skip this page. The Agent’s own connection to Query Streams is outgoing, so its computer never needs a rule either.
Which port to open
Use the port shown in the connector form’s 포트 box. If nobody changed it when the database was installed, it is the default:
| 데이터베이스 | Protocol and port | Details |
|---|---|---|
| Microsoft SQL Server (default instance) | TCP 1433 | SQL Server |
| SQL Server named instance or SQL Express (SERVER\SQLEXPRESS) | UDP 1434 plus the instance’s own TCP port | 명명된 인스턴스 |
| PostgreSQL | TCP 5432 | PostgreSQL |
| MySQL or MariaDB | TCP 3306 | MySQL and MariaDB |
| Oracle | TCP 1521 | Oracle |
Add the rule
Do this on the computer that holds the database, signed in as an administrator. The example opens TCP 1433; type your own port in step 6.
Not comfortable with this? Ask whoever looks after the server to “allow inbound TCP 1433 from the Query Streams Agent’s computer” (with your port), or reply to support and we will do it with you.
-
Open the advanced firewall window
클릭 Start, type wf.msc 그리고 누르세요 Enter. If Windows asks Do you want to allow this app to make changes to your device?클릭 예. A window titled Windows Defender Firewall with Advanced Security opens, with a list on the left, a summary in the middle and an Actions list on the right.
-
Go to Inbound Rules
In the list on the left, click Inbound Rules. The middle fills with a long list of existing rules; you do not need to touch any of them.
-
Start a new rule
그 안에서 Actions list on the right, click New Rule…그. New Inbound Rule Wizard opens on the Rule Type page, which asks What type of rule would you like to create?
-
Choose Port
클릭 포트 (“Rule that controls connections for a TCP or UDP port”), then click 다음. The wizard moves to Protocol and Ports.
-
Choose TCP
아래에 Does this rule apply to TCP or UDP?, leave TCP selected. (Choose UDP only for the SQL Server Browser rule, port 1434, in the named-instance section.)
-
Type the port
아래에 Does this rule apply to all local ports or specific local ports?, 선택하다 Specific local ports: and type the port in the box, for example 1433. Just the number, no spaces. Click 다음.
-
Allow the connection
그만큼 Action page asks What action should be taken when a connection matches the specified conditions? 떠나다 Allow the connection selected and click 다음.
-
Pick when it applies
그만큼 윤곽 page asks When does this rule apply? with three tick boxes: Domain, Private 그리고 Public. Leave all three ticked unless whoever looks after your network says otherwise; Windows decides which one is in force, and a server that lands on the wrong one would quietly block the Agent. Click 다음.
-
Name it and finish
On the 이름 page, type a name you will recognise later, for example Query Streams Agent – SQL Server 1433그리고 클릭하세요 마치다. The wizard closes and your rule appears in the Inbound Rules list with a green tick beside it. It works straight away; nothing needs restarting.
Want it tighter? The rule above lets any computer try that port. To allow only the Agent’s computer, double-click your rule, open the 범위 tab, under Remote IP address 선택하다 These IP addresses:클릭 Add…, type the Agent computer’s IP address, and click 좋아요 twice. If that computer’s address changes later, the Agent is blocked again.
If any of this does not match what you see, stop and reply to our support email with a photo of the screen. We will walk you through it.
Ports for each database
Microsoft SQL Server
A default SQL Server instance listens on TCP 1433, the port the connector form starts with. Add one rule for TCP 1433 with the steps above. If your server name in the connector has no backslash in it (just SERVER or an address), this is all you need.
If the test in the Portal says Connection failed: nothing answered on SERVER:1433. SQL Server is not listening on that port, or a firewall between the agent and the server blocks it., it is either this rule or SQL Server’s own TCP/IP setting; test the port to tell which.
SQL Server named instances and SQL Express
If the server name has a backslash, like OFFICE-SERVER\SQLEXPRESS, it is a named instance. A named instance does not use 1433: it picks its own port, and a helper called the SQL Server 브라우저 tells the Agent which one on UDP 1434. So it needs two rules: one for UDP 1434, and one for the instance’s TCP port.
Not comfortable with this? Ask whoever looks after the server for “the TCP port of the SQLEXPRESS instance, fixed, and UDP 1434 open for SQL Server Browser”, or reply to support.
-
Open SQL Server Configuration Manager
On the database server, click Start and type SQL Server Configuration Manager. If nothing appears, type the file name for your SQL Server version instead and press Enter: SQLServerManager16.msc for SQL Server 2022, SQLServerManager15.msc for 2019, SQLServerManager14.msc for 2017, SQLServerManager17.msc for 2025. Click 예 if Windows asks for permission.
-
Open TCP/IP for your instance
In the list on the left, expand SQL Server Network Configuration 클릭하고 클릭하세요 Protocols for SQLEXPRESS (your instance’s name after “for”). On the right, check TCP/IP says 활성화됨; if it says Disabled, right-click it and choose Enable first. Then double-click TCP/IP. A box titled TCP/IP Properties opens.
-
Read the port under IPAll
를 클릭합니다. IP Addresses tab and scroll to the very bottom, to the section headed IPAll. It has two boxes: TCP Dynamic Ports 그리고 TCP Port.
만약에 TCP Port has a number, that is the instance’s fixed port: use it. If TCP Port is empty and TCP Dynamic Ports shows a number such as 49172, that is the port it chose this time, and it can change after a restart. Make it fixed: delete the number in TCP Dynamic Ports so the box is empty, type a port in TCP Port (the number it already had is fine, or 1433 if nothing else on the server uses it), and click 좋아요.
-
Restart the instance
In the list on the left, click SQL Server Services. On the right, right-click SQL Server (SQLEXPRESS) 그리고 선택하세요 Restart. A progress box appears for a few seconds. The new port only takes effect after this restart. Anyone using the database is disconnected for those seconds, so pick a quiet moment.
-
Start SQL Server Browser
In the same SQL Server Services list, find SQL Server 브라우저. If its state is not Running, double-click it, open the Service tab, set Start Mode 에게 Automatic클릭 Apply, then right-click SQL Server 브라우저 그리고 선택하세요 Start.
-
Add the two firewall rules
따르다 Add the rule twice: once with TCP and the port from step 3, once with UDP 그리고 1434. Name them so you can tell them apart, for example Query Streams Agent – SQLEXPRESS 그리고 Query Streams Agent – SQL Browser.
In the connector form, keep the server as OFFICE-SERVER\SQLEXPRESS 및 포트 ~처럼 1433; the Browser finds the real port. Or type the fixed port from step 3 in 포트 instead, in which case the UDP 1434 rule and the Browser are not needed.
If the test says Connection failed: instance "SQLEXPRESS" was not found on OFFICE-SERVER, one of these six steps is still missing: TCP/IP enabled, restarted, Browser running, or one of the two rules.
Rather allow the SQL Server program than a port? Microsoft also documents a rule for the program itself, which follows the instance whatever port it picks: in the wizard choose Program instead of Port, then This program path클릭 Browse and pick sqlservr.exe, normally under C:\Program Files\Microsoft SQL Server\MSSQL16.SQLEXPRESS\MSSQL\Binn\ (the folder name carries your version and instance). A SQL Server update can move that file and break the rule, which is why a fixed port is easier to keep working.
If any of this does not match what you see, stop and reply to our support email with a photo of the screen. We will walk you through it.
PostgreSQL
One rule for TCP 5432. PostgreSQL also refuses other computers until it is told to listen for them, in its own settings files (postgresql.conf 그리고 pg_hba.conf); if the port test below succeeds and the connection still fails, that is the next place to look, and whoever installed PostgreSQL will know them.
MySQL and MariaDB
One rule for TCP 3306. If the Agent’s test says Connection to MySQL server timed out after … seconds. The server may be unreachable or the port may be blocked by a firewall., this rule is the first suspect. MySQL also has its own bind-address setting that can limit it to the server itself.
Oracle
One rule for TCP 1521, the default listener port shown in the connector form. TNS:connect timeout occurred 또는 TNS:destination host unreachable in the test usually means the rule is missing; TNS:no listener – Oracle listener may not be running means the port is reachable but the listener on the server is stopped.
Test the port from the Agent’s computer
This answers one question: can the Agent’s computer reach that port on the server? Run it on the computer where the Agent is installed, not on the server.
-
Open PowerShell
On the Agent’s computer, click Start, type PowerShell그리고 클릭하세요 Windows PowerShell. A blue or black window opens with a line ending in >. No administrator rights are needed.
-
Run the test
Type the line below, with your server’s name or address instead of OFFICE-SERVER and your port instead of 1433, then press Enter. For a named instance use just the part before the backslash, and the port from IPAll.
Type this, then press EnterTest-NetConnection -ComputerName OFFICE-SERVER -Port 1433
It takes a few seconds, up to about half a minute when the port is blocked, then prints a short list.
-
Read the last line
TcpTestSucceeded : True means the port is open and something is listening. The firewall is not the problem; go back to the Portal and click 테스트 연결. If that still fails, the message is about the login or the database, not the network.
TcpTestSucceeded : False, usually with a yellow line above it reading WARNING: TCP connect to (… : 1433) failed, means nothing answered. Either the rule is missing or wrong, or the database is not listening on that port: check that next.
Name resolution of OFFICE-SERVER failed, with no TcpTestSucceeded line at all, means this computer cannot find a server by that name. Check the spelling, or use the server’s IP address instead.
When it is not the firewall
If the test says False even with the rule in place, check that the database is actually listening on that port. On the database server, 열려 있는 Command Prompt (click Start, type cmd클릭 Command Prompt) and type, with your port:
netstat -an | findstr 1433
- A line like TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING means the database is listening for every computer. The firewall rule (or a second firewall, such as antivirus software or the network’s own) is what blocks it; check the port number in your rule.
- Only TCP 127.0.0.1:1433 … LISTENING means the database listens to the server itself only. That is a database setting, not the firewall: TCP/IP in SQL Server Configuration Manager, listen_addresses PostgreSQL의 경우, bind-address for MySQL and MariaDB.
- Nothing at all means nothing listens on that port: the database service is stopped, it uses a different port, or (SQL Server) TCP/IP is disabled. For a named instance, read the real port in IPAll.
테스트에 실패했나요?
| Message in the Portal | 원인 | 고치다 |
|---|---|---|
| Connection failed: nothing answered on …:1433. SQL Server is not listening on that port, or a firewall between the agent and the server blocks it. | Firewall rule missing, or SQL Server’s TCP/IP is off. | Add the rule, 그 다음에 test the port 그리고 check it listens. |
| Connection failed: instance "…" was not found on … | Named instance: Browser stopped, UDP 1434 or the instance port blocked, or TCP/IP off. | Named instances and SQL Express, all six steps. |
| Connection to MySQL server timed out after … seconds. The server may be unreachable or the port may be blocked by a firewall. | TCP 3306 blocked, or MySQL listens locally only. | MySQL and MariaDB, 그 다음에 check it listens. |
| TNS:connect timeout occurred 또는 TNS:destination host unreachable | TCP 1521 blocked, or the wrong server. | Oracle, 그 다음에 test the port. |
| A PostgreSQL message mentioning Failed to connect to 그리고 5432 | TCP 5432 blocked, or PostgreSQL listens locally only. | PostgreSQL, 그 다음에 check it listens. |
Messages about a login, a password or a database name mean the network part already works; this page cannot fix those. Create a read-only database user covers the login side.
관련 가이드
Setup trouble?
- Agent shows Offline, or Test connection and Browse are greyed out? Check that the Agent is online → Is the Agent online?

