4

We have an SQL Server 2008 R2 with a database instance running on port 1433. 1433 is open for TCP and 1434 is open for UDP.

When connecting through Microsoft SQL Management Studio, our firewall detects TCP traffic at port 50235. Why? The SQL Server does not mention this port as far as I can tell.

4 Answers 4

5

Are you connecting to a named instance? In which case, the initial connection is to the SQL Server Browser service (UDP 1434) and then that dynamically allocates a port for named instances. This port is allocated on instance startup.

See this TechNet Resource on how the SQL Server Browser Service allocates a port for named instances.

There is a way to explicitly define a static port that a named instance will be listening on, but it appears that you are seeing a dynamically allocated port.

1

SQL Server will operate on dynamic ports by default. Check the SQL Server network utility if you want to disable this.

http://www.sqlservergeeks.com/blogs/sarab/sql-server-bi/105/how-to-find-the-dynamic-port-reserved-by-sql-server

1

Let me guess, your firewall detects the traffic coming back from server:1433 to client:50235? This is absolutely normal behaviour for just about every network client application ever.

Read up on ephemeral ports.

0

You sound like you may already know this but you can try doing a telnet to the sql server machine on port 1433:

telnet <hostname> 1433

If you get a blank screen (open connection) then your service is running on that port and there's no firewall in the way. If that's not working try:

telnet <hostname> 50235

If that works, then as the previous answer suggests you're configured for dynamic ports instead of 1433 (dynamic is the default for Express edition). You can change that in:

SQL Server Configuration Manager > SQL Server Network Configuration > TCP/IP (Right Click > Properties > IP Addresses.

In the IPAll section set TCP Dynamic Ports to blank (not 0) and enter 1433 for the TCP port)

Hope that helps.

Not the answer you're looking for? Browse other questions tagged or ask your own question.