Results 1 to 6 of 6
  1. #1
    Join Date
    May 2009
    Posts
    20

    Unanswered: How do I change MS SQL Server listening port

    I've installed a trial version of MS SQL Server 2008 on my Vista laptop. I've written a small Java application that, through JDBC, connnects to the database and retrieves some data. The port used in the connection string in the Java application is 1434 because that is the port I see that the SQL Server is listening on (via the loopback IP address 127.0.0.1) when I issue the "netstat -a" command. I need to change the 1434 into a something else for some testing that I'm doing. How can I do this? I've followed Microsoft's instruction in "SQL Server 2008 Books Online: How to: Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)" and changed the IP address of the 127.0.0.1 as well as "IP all" section of the server instance to 1435 (a non-used port that I chose) as per the instructions and some online comments I saw. But, per "netstat -a" 127.0.0.1 is still listening on 1434 and although I've changed the connection string in my Java app to reference 1435, it's not connecting. How do I change the listening port?

    Thank you,
    David

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    1434 is the default port for the SQL browser, and can not be changed. This should not be confused with the port that SQL server uses for connections.

  3. #3
    Join Date
    May 2009
    Posts
    20

    How do I change MS SQL listening port

    Ok, but my Java application uses 1434. Is that incorrect? I've tried connecting via 1433 and it would not connect.

  4. #4
    Join Date
    May 2009
    Posts
    20

    How do I change MS SQL Server listening port

    OK, I've actually confirmed: the SQL Server is using port 1434. The SQL Server Browser is not on, and when I do turn it on (e.g. in the Services menu) it also comes up with port 1434. I see all this via TCPViews, the free utility from Microsoft Sysinternals, in addition to "netstat". Normally the SQL Server Browser is turned off. All my applications and queries are working, so unless I'm doing something wrong, I think things are ok. Everything is on my one laptop Vista machine.
    So I go back to the original question: how can I change my SQL Server to use something other than port 1434?

    Thank you

  5. #5
    Join Date
    Nov 2003
    Location
    denver
    Posts
    11

    Change Port Number

    To change the Port Number, do the following steps.

    1) Form start click on Microsoft SQl Server 2008\ Configuration Tools\ SQL Server Configuration Manager.

    2) Expand SQl Server network Cofiguration\ Protocols for SQL2008

    3) On your right hand Pane find "TCP/IP". you need to enable this protocol for using port number.

    4) Double click the "TCP\IP" and go to tab "IP Address".
    find "TCP PORT", which can be configured by the administrator.

    Note: Changes can be in effect only after a restart of teh SQL Server Service.
    How to ensure that SQL Server is using the set port number?
    You can find this information from the sql Server Log. it should say SQL Server listing on a particular port number.

    Cheers
    Shailesh patangay

  6. #6
    Join Date
    May 2009
    Posts
    20
    That wroked to some degree. Let me try this out.

    Thank you very much!

    Dave

Posting Permissions

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