Port selection SQL Server 2000 / 2005

  • Hi,

    We have SQL sunning in a shared environment, specifically multiple instances of SQL, dbs and apps on a virtual server. If this server is rebooted, Our SQL comes back up running on a different port which affects one of our apps. This is a problem since our firewall guys will only open a specific port at a time.

    Can someone explain to me where the port selection is made? I mean is it as simple as the OS (Windows Server 2000/2003) or is it SQL server?

    What role does the operating system and SQL Server play in determining port selections? Also, can this setting be limited to one or two ports and should it?

    Thanks I know this is quite a bit of info.

    ~Scott

  • Scott

    I don't know how the port selection is made, but I do know that you can fix the port if you go into SQL Server Configuration Manager.

    John

  • default port uses 1433, named instances pick a port. They tend to try for the same port, but there's some algorithm that picks a port out of a range.

    Use the configuration manager if you need this to be the same port every time.

  • To piggy back on what has already been said, named instances will try to use the same port, but if it's in use, they will try the next available port IF the instance is set to use dynamic ports. This is the default setting. With SQL Server 2000, the server network utility makes it really easy to specify the port. In SQL Server 2005, you have to be a bit more careful:

    Setting Static Ports when dealing with Named Instances and Kerberos

    Having static ports is crucial for Kerberos authentication, so it's the same sort of issue you're dealing with on the firewall config.

    K. Brian Kelley
    @kbriankelley

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply