darkoshi: (Default)
It took me hours today to realize/figure out the following about why my JDBC connection to SQL Server wasn't working:

If you are trying to configure SQL Server 2008 R2 Express edition to use a specific port, don't make the mistake of thinking that the "Listen All" option in the SQL Server Configuration Manager means to "listen on all ports". It actually means to listen on all of the computer's TCP/IP addresses. If you set it to "No", then you have to specifically enable listening to one or more TCP/IP numbers on the "IP Addresses" tab, and use one of those IP numbers in your JDBC connection string.

When "Listen All" is set to "Yes", then you can specify a port number in the "IPALL" section. Your JDBC connection can contain your computer name instead of the IP number.

If "Listen All" is set to "No" and specific TCP/IP numbers are not enabled, you'll get a "Connection refused" error.

If the JDBC connection is only used between different applications on your computer (not to another computer), then you don't need to configure any Firewall rules for the SQL Server port number, even though the "Connection refused" message implies that you do.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

May 2025

S M T W T F S
    123
45678910
11121314151617
1819 202122 2324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Saturday, May 24th, 2025 07:51 am
Powered by Dreamwidth Studios