Tcp/ip port named instance

  • Hi -

    I have setup a clustered server, I used named instance for both active/passive. The tcp port is set to dynamic sdince it is a named instance, I know if you use default the port is set to 1433. What happens if you have an application using default port number 1433 hard coded? Should I change the port to a static 1433 or leave the settings as is?

    Thanks,

    Lava

  • You may want to read the information in this link http://msdn.microsoft.com/en-us/library/ms177440.aspx

  • Thank you for the link, I already know how to configure... beside in a clustered environment you do not change based on the link you sent... If you need to change, then the steps are different.

    What I tried to get at is what happens if you have an application with port number 1433 hardcoded when SQL is set for dynamic tcpip? I assume it won't work, I just wanted to get input from someone who dealt with such case.

    Lava

  • Yes. Hardcoded app with 1433 will ask sql browser to connect to this port. So if your named instance is listening on 1433, you should be able to connect.

  • I think he is saying his instance is not listening on 1433 (which is the default, instances are a non default port). If it's hard coded, it's bypassing SQL browser and trying to connect directly to that port, which is bad, cause it's not going to work.

  • foxxo (6/25/2013)


    I think he is saying his instance is not listening on 1433 (which is the default, instances are a non default port). If it's hard coded, it's bypassing SQL browser and trying to connect directly to that port, which is bad, cause it's not going to work.

    Do you mean bypassing browser to connect port will fail?

  • The best thing to do would be to set SQL Server to listen on a fixed non-default port, and then reconfigure your application to connect on that port (or reconfigure not to specify a port at all, if you run SQL Browser). If you don't have the option of making that change to the application then you'll need to fix the port number as 1433.

    John

  • John +222

    If you have fixed port(other than 1433) and be able to hard code in apps, then sql browser is not necessary for this application.

  • John -

    Thank you for your input. Both named instance ports are to dynamic, and got an application which has tcp port 1433 hadcoded to migrate. I will follow your recommendation to change the port back to default port 1433.

    BTW, any reason for having tcpip port dynamic when using named instance?

    Thanks everyone for your input.

    Lava

  • Lava

    I suppose the advantage of a dynamic port is that a different one is authomatically selected in the event that the chosen one is in use by another process. If SQL Browser is running, it will resolve the instance name to the port number and the whole thing runs transparently. I always go with fixed ports, though, since there shouldn't be anything else on a dedicated database server that eats up port numbers.

    John

  • Could any one confirm whether my below statement is correct?

    TCP Port should be dynamic in cluster environment and it should be static in stand alone.

    Thanks,
    I’m nobody but still I’m somebody to someone………….

  • Could any one confirm whether my below statement is correct?

    TCP Port should be dynamic in cluster environment and it should be static in stand alone.

    Thanks,
    I’m nobody but still I’m somebody to someone………….

  • sweetmoulali (6/26/2013)


    TCP Port should be dynamic in cluster environment

    This is not correct. In a clustered environment a static IP address is also possible and probably preferrable. Setting up the firewall is more easy when using a static ip-address.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • sweetmoulali -

    Dynamic tcp/ip port has nothing to do with clustered envirnment.. During SQL installation, dynamic tcp is set as default if you go with named instance, it is static if you specify default instance. In my case, I used named instances for both nodes (atcie/passive), I later realized that I needed to use default 1433 port number because of one of the applications. I had to change it back to static, to do so I followed both links:

    http://www.mssqltips.com/sqlservertip/2928/updating-the-tcp-port-on-a-sql-server-cluster-node/

    http://blogs.msdn.com/b/sqlserverfaq/archive/2008/06/02/how-to-change-the-dynamic-port-of-the-sql-server-named-instance-to-an-static-port-in-a-sql-server-2005-cluster.aspx

    In most cases it is recommended to use static tcpip, some recommend to use different value than the default 1433.

    Lava

Viewing 14 posts - 1 through 13 (of 13 total)

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