[This topic is migrated from our old forums. The original author name has been removed]
I am trying to connect to the Adventure Works d/b but keep getting a 'connection refused' message. These are the settings I have established
a. enabled TCP/IP
b. opened port 1433 in Windows Firewall as database port
c. driver jTDS
d. URL/Name: jdbc:jtds://localhost:1433;DatabaseName=AdventureWorks2008R2
e: userid: same as used for SQL Management Studio login
f: added 'workgroup' as domain
g: authentication method: Windows
From reading the FAQs and posts here I thought I'd got everything in place. So am I missing something?
TIA
[This reply is migrated from our old forums. The original author name has been removed] [Attachment has been removed.]
Re: Connection refused
Hans: screen shot of SQL Services node attached. The SQL Server Network Configuration (32 bit) when expanded says 'There are no items to show in this view'.
My PC is running Windows 7 64-bit.
The SQLEXPRESS node has an IP address the same (192.168.56.1) but no port is enabled.
Hans Bergsten
said
about 11 years ago
[This reply is migrated from our old forums.]
Re: Connection refused
Hi Paul,
And you have restarted the SQL Server service after you made the TCP/IP configuration changes? The changes do not take effect until you do.
If it still doesn't work, please post then debug output from an attempt to connect with all the connection settings I suggested earlier today.
Best Regards,
Hans
a
anonymous
said
about 11 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Connection refused
Hans: yes, I restarted the SQL Server service after making TCP/IP changes.
Do you want debug output just for the 'Server Info' settings or for the 'Database URL' settings as well?
a
anonymous
said
about 11 years ago
[This reply is migrated from our old forums. The original author name has been removed] [Attachment has been removed.]
Re: Connection refused
Hans: attached are screen shots and debug output for 3 different 'Server Info' settings.
Hans Bergsten
said
about 11 years ago
[This reply is migrated from our old forums.]
Re: Connection refused
Hi Paul,
Thanks. Only the first attempt has valid values. SQLSERVER2012 is the name of a SQL Server database instance, not a server DNS name, so it cannot be used the way you use it.
Either way, even with the correct settings it fails at the network level. The screenshots you have sent me so far indicates that the SQL Server is configured correctly, and you say you have restarted the server after the TCP/IP reconfiguration.
That leaves me with only one more suggestion. You said that your PC is 64-bit. If the Java version you are running is 32-bit and/or the DbVisualizer installer you used is 32-bit, this can cause some very odd problem. I therefore suggest that you:
1) Unistall the DbVisualizer you have installed now,
2) Download and install the "Windows x64 (setup installer) With Java VM",
3) Try again with the settings from the first attempt in the document you posted.
Best Regards,
Hans
a
anonymous
said
about 11 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Connection refused
Hans: I followed your suggested steps (installed DbVIS 64-bit with JVM), added the settings you suggested (Server: 192.168.56.1, Port 1433, Authentication: SQL Server) - result: connection refused.
I guess we've reached the end of the road :-(
Hans Bergsten
said
about 11 years ago
[This reply is migrated from our old forums.]
Re: Connection refused
Hi Paul,
Yes, I'm out of ideas. But I can tell you that the problem is with the network configuration somewhere. The fact that you get "connection refused" and that Ping Server gives you an error means that it is simply not possible to set up a TCP/IP connection to port 1433 on 192.168.56.1. You will have then same problem with any client that uses TCP/IP to communicate with the database.
I have asked about all configuration items I can think of that could explain this, and your answers indicate that those areas are set up correctly. You may want to continue looking for a solution by Googling on selected terms like "SQL Server JDBC TCP/IP connection refused".
Sorry I couldn't help you.
Best Regards,
Hans
a
anonymous
said
about 11 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Connection refused
Hans: thanks anyway.
> You may want to continue looking for a solution by Googling on selected terms like "SQL Server JDBC TCP/IP connection refused".
I have been doing this and everything I found I have implemented - and it was the same advice as you have given. So something not right on this laptop.
Thanks again.
anonymous