Having searched the internet a few times on the best way to open up SQL Server connectivity through windows firewall i've yet to find a best way of doing it. Does anyone have a guaranteed way of finding which ports SQL is running on so you can open them in windows firewall?

link|improve this question
feedback

3 Answers

up vote 6 down vote accepted

If you only have one instances of SQL Server running, and it ha TCP/IP transport enabled for non-local connections, then chances are it will be listening in the default TCP port: 1433.

If you have multiple instances, or any other complications above "a single, default, instance", then things may be more complicated. You will need to set the ports for each instance (by default they are semi-random which is not generally helpful for firewall configuration) and will need to open the SQL Browser Service too (which usually listens on TCP port 1434, though this too can be reconfigured).

There is a fairly detailed set of notes on SQL Server and firewalls at http://msdn.microsoft.com/en-us/library/cc646023.aspx

link|improve this answer
feedback

netstat -a -b -p TCP

Look at the ones where State is LISTENING.

link|improve this answer
feedback

The Default port for SQL Server is 1433

link|improve this answer
If you're on a named instance, this is not always the case though – Mark Henderson Aug 29 '09 at 23:08
For a named instance the port number is dynamic by default. – mrdenny Aug 30 '09 at 2:00
feedback

Your Answer

 
or
required, but never shown

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