none
Dynamic port with fixed value RRS feed

  • Question

  • Hello,

    I noticed a lot of my SQL server instance have the same value in the TCP Dynamic port.

    I find it strange and I noticed it is possible to set a value in the dynamic port.  The SQL server then proceeds in using the port written in the TCP Dynamic port.

    This seems like a misconfiguration to me, when required to set a static port, the field "TCP Port" allows to do so... 

    Any reason to manually set a value in the dynamic port? What would the impact be?

    Wednesday, July 6, 2016 9:20 PM

Answers

  • Hello,

    The SQL Server Browser provides the Information, which SQL Server instance is listening on which IP port, so using a dynamic port works this far.

    But how to setup Firewall rules to allow Access? On server side you can bind the rule to SqlServr.exe application, but how to handle it on client side? You would have to create rules for every application connecting direcly to SQL Server and this on every client.

    And why not using a static port, I don't see any advantage (but disadvantages) using dynamic ports; even if the port only changes on SQL Server restart.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Thursday, July 7, 2016 6:51 AM
    Moderator
  • Having different instance on different machines using same port is nothing strange.

    Dynamic doesn't mean you get a different port on re-start. It will only get a new port *if something else using that port* when started. If you are using static port and the port isn't available, then SQL Server refuses to start. Which do you prefer?

    Sure, you can change the value for the dynamic port (or even delete it and set a value for static instead, if that is what you prefer), if you feel that this is of any advantage to you...


    Tibor Karaszi, SQL Server MVP (Web Blog)

    Thursday, July 7, 2016 7:03 PM
    Moderator

All replies

  • Hello,

    The SQL Server Browser provides the Information, which SQL Server instance is listening on which IP port, so using a dynamic port works this far.

    But how to setup Firewall rules to allow Access? On server side you can bind the rule to SqlServr.exe application, but how to handle it on client side? You would have to create rules for every application connecting direcly to SQL Server and this on every client.

    And why not using a static port, I don't see any advantage (but disadvantages) using dynamic ports; even if the port only changes on SQL Server restart.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Thursday, July 7, 2016 6:51 AM
    Moderator
  • Having different instance on different machines using same port is nothing strange.

    Dynamic doesn't mean you get a different port on re-start. It will only get a new port *if something else using that port* when started. If you are using static port and the port isn't available, then SQL Server refuses to start. Which do you prefer?

    Sure, you can change the value for the dynamic port (or even delete it and set a value for static instead, if that is what you prefer), if you feel that this is of any advantage to you...


    Tibor Karaszi, SQL Server MVP (Web Blog)

    Thursday, July 7, 2016 7:03 PM
    Moderator