Proposed SQL Server Ports

  • Thursday, January 19, 2012 4:25 PM
     
     

    Hi

    recently, I installed SQL Server in my server, for best practices I used a different port instead of Default port (1433), for example I defined the port 12345 but now, Windows Firewall does not allow me to connect from a desktop, I added both 12345 and 1434 ports to firewall, but it does not works

    someone knows what happening is?


    Jesus Angel
    • Edited by Jesus Angel Thursday, January 19, 2012 5:01 PM
    •  

All Replies

  • Thursday, January 19, 2012 5:00 PM
     
     

    Jesus, Please check SQL Server browse service is running

     


    If the answer was helpful, please mark it as useful. Si la respuesta le ayudó, por favor márquela como útil.
  • Thursday, January 19, 2012 5:19 PM
     
     

    Hi Carlos

    yes, it is running. I tried to use the default port againg and it works, the problem comes when I change the port number.

     


    Jesus Angel
  • Friday, January 20, 2012 2:56 AM
     
     

    Hi,

    Can you telnet from your source to the destination on the port you are using to confirm that the firewall is open and the target is listening on that port?

    Can you see the SQL server listening on that port if you do a netstat -anb and the command line on the server?

    When you are trying to connect to a SQL instance using SSMS that is not on the default port you need to specify the port number in the SSMS Server name box such as this where the port in use is 1234

    SQLSERNAME\INSTANCENAME,1234

    Click here to see an image of what I mean.


    Sean Massey | Consultant, iUNITE

    Feel free to contact me through My Blog or Twitter.
    Please click the Mark as Answer button if a post solves your problem!


    • Edited by Sean Massey Friday, January 20, 2012 3:01 AM
    •  
  • Friday, January 20, 2012 9:05 PM
     
     

     

    hi Sean,

    if I use this specification to connect to server:

    tcp:ServerName,Port

    and it works, Is there some option or method to do it using the SQL Server Browser? I would like to use the server name only. if so, is it the best way to authenticate?

    I want to implement best practices in my server

     

    I added the ports 12345(TCP) and 1434(UDP) to windows firewall, but I cannot connect to server.

    Thanks in advance!


    Jesus Angel
  • Tuesday, January 24, 2012 2:40 PM
     
     

    Jesus:

    Try this:

     

     

     

     


    If the answer was helpful, please mark it as useful. Si la respuesta le ayudó, por favor márquela como útil.
  • Tuesday, January 24, 2012 2:41 PM
     
     

    And This:


    If the answer was helpful, please mark it as useful. Si la respuesta le ayudó, por favor márquela como útil.
  • Tuesday, January 24, 2012 2:53 PM
     
     Proposed

    Hi,

    have you restared the SQL Server service after you changed the port?

    J.


    There are 10 type of people. Those who understand binary and those who do not.
    My Blog
  • Thursday, February 02, 2012 6:04 PM
     
     

    Weird, third time I've come across this issue in 2 weeks and nothing in the past 2 years before that. Anyway, I chatted with the dev about this and figured out the gap.

    This has to do with how the tool/app uses the SQL Client. When connecting to a default instance in a "simple" connection, sql client assumes the default port unless told otherwise. It will only query SQL Browser automatically when connecting to a named instance. There are methods in SQL Client that allows the calling app to go ahead and communicate with SQL Browser but the calling app has to explicitly call those methods.

    In this case, I'm guessing you're using SSMS and when connecting to a default instance, SSMS does not do anything extra with SQL Client; just issues a connection request. That is handled as a simple connection request to a default instance which goes to the default port.

    One workaround is to create an alias with the custom port number.

     


    No great genius has ever existed without some touch of madness. - Aristotle