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?
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?
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.