Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2008
    Posts
    21

    Unanswered: SQL Server 2005 how to check port

    How does one check which port SQL Server is listening to? How does one know if it is 1433 or 1434?

  2. #2
    Join Date
    Aug 2006
    Location
    San Francisco, CA
    Posts
    136
    In Management Studio (after connecting to the server) open "Management" and then open "SQL Server Logs". Open the "Current" log and scroll to the bottom of the log. Look for the text "Server is listening on .....####'

  3. #3
    Join Date
    Feb 2008
    Posts
    21
    Thank you!! I checked the log and noticed that it had two entries with two different ports, why would that be?

  4. #4
    Join Date
    Aug 2006
    Location
    San Francisco, CA
    Posts
    136
    Because one of the ports, usually the lower number (ie. 1433), is for outside connections coming in, while the other port is for dedicated admin connection support, usually the next port number (ie. 1434).

    So to answer your next question you haven't asked yet; you want to give your clients the "lower number" port 1433.

  5. #5
    Join Date
    Feb 2008
    Posts
    21
    Yes, thank you, that was my next question... ;-)

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'd suggest reading KB#287932 then re-evaluating this discussion.

    -PatP

  7. #7
    Join Date
    Feb 2008
    Posts
    21
    Thanks, I knew that 1433 was the default, however looking in the error log, it didn't show that as being the port. I'm still confused then as to which one I should be advertising so to speak.

  8. #8
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    For an unnamed instance, you can use TCP port 1433 for any default installation.

    Keep in mind that I think that this is a bad idea from the git-go! You can force SQL Server to use a specific port by following the instructions at How to: Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager).

    -PatP

  9. #9
    Join Date
    Feb 2008
    Posts
    21
    Yes, I agree, that is a bad idea. I do have named instances and therefore my port is not 1433...a good thing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •