SQL Server 2005 Jdbc connection|MSSQL 2005 -JDBC Connection

Connecting to a version of MS SQL post 2000 requires a few extra pieces of knowledge these days.
  • By default MS SQL does not listen on anyTCP/IP socket. You have to go to MS SQL configuration manager console and enable tcp/ip for the instance under Network Configuration. You need to restart SQL for this to take effect. It also appears that enabling TCP/IP does not enable it on a specific ip address. I had to set the specific ip address under "SQL Server 2005 Network Configuration"=>TCP/IP Protocol=>(right click) Properties=>IP Addresses to enabled = yes.
  • Instances do not run on port 1433 anymore. They use dynamic ports. If you right click on the tcp/ip protocol for your instance under "SQL Server 2005 Network Configuration" you should be able to force this to change by changing the setting on the "IP Addresses "tab but this didn't work for me.You can pick up the dynamic port it is using with netstat or from the "IP Addesses" tab. Since it is a dev environment I didn't care much as long as I could connect.
  • Don't foget to allow the windows firewall to let external request to the port through.

No comments:

Post a Comment

Please Provide your feedback here