Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Oct 1 '12 at 13:31

This question came from our site for professional and enthusiast programmers.

add comment

4 Answers 4

up vote 5 down vote accepted

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.

share|improve this answer
add comment

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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