We have been using MsSQL 2005 without problems, now because of the database we use we are required to use 2008R2 Express edition
The server is setup in mixed mode, tcp/ip and named pipes are enabled, port is set to 1433.
The “sa” user is set as the owner of our db, yet whatever we try we keep getting the message “Network error IOException: Connection refused”
We’ve tried using the JTDS driver with the following url’s : “jdbc:jtds:sqlserver://192.168.0.5/dbName”, “jdbc:jtds:sqlserver://SERVERNAME/SQLEXPRESS/dbName”
Both give the same result.
Making a new user did not help either.
There is no firewall running on this server, on the same server we have been using mssql 2005 before without problems, google hasn’t helped so far and i’m running out of ideas…
Grimbert,
Did you try this url?
jdbc:sqlserver://192.168.0.5:1433;databaseName=dbName
Also try a simple connect to port 1433 from the developer/server machine to the db machine:
telnet 192.168.0.5 1433
Rob
Default SQL Server installs with an instance name
Check if you installed with instance name.
If that is the case, reinstall SQL Server with option “Default instance”
Otherwise try to change your URL:
Grimbert:
We’ve tried using the JTDS driver with the following url’s : “jdbc:jtds:sqlserver://192.168.0.5/dbName”, “jdbc:jtds:sqlserver://SERVERNAME/SQLEXPRESS/dbName”
I think the correct syntax must be
jdbc:jtds:sqlserver://192.168.0.5/dbName;instanceName=SQLEXPRESS
Both url’s return “Connection refused”
Telnet the same… -edit- without the port telnet does connect to the server running the db.
I’m guessing the problem might be somewhere else?
Check also if the SQL user you want to use doesn’t have setting ‘Must change password’ within SQL Server
Grimbert,
If telnet can’t make a connection, you can’t fix it in the url, it is a network issue.
Either the server is not set-up correctly or a firewall is interfering.
If you manage to get a connection using telnet the jdbc connection will probably also work
Rob
rgansevles:
Grimbert,If telnet can’t make a connection, you can’t fix it in the url, it is a network issue.
Either the server is not set-up correctly or a firewall is interfering.If you manage to get a connection using telnet the jdbc connection will probably also work
Rob
I edited my previous post, it does connect without giving a port. Also RDP works on this server.
No firewall is running.
martinh:
Check also if the SQL user you want to use doesn’t have setting ‘Must change password’ within SQL Server
That setting is unchecked, I tried using the “sa” account.
I also tried making a new user but that one also fails.
Got it
Had to put the TCP port in the “IP All”
Grimbert:
I edited my previous post, it does connect without giving a port. Also RDP works on this server.
No firewall is running.
You will have to connect to the right port (1433 by default), the default telnet port and the rdp ports are other ports
Try the Portqry.exe tool, it seems designed for resolving this kind of issues.
http://support.microsoft.com/kb/310099
Rob