| Author |
trying to connect sql server 2000 - not connected
|
Anand Sivathanu
Ranch Hand
Joined: Jun 25, 2010
Posts: 76
|
|
hi,
I am trying to connect sql server.
i have installed the driver(jtds)
but unable to connect
unable to connection2
java.sql.SQLException: Network error IOException: Connection refused: connect
please help.
|
 |
Steve Fahlbusch
Ranch Hand
Joined: Sep 18, 2000
Posts: 492
|
|
As a start i would suggest.
Post your code (use code tags)
Post the exact and total error message
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
The machine is refusing the connection. Make sure that you are connecting to the right machine, it has the SQL Server running, no firewall is blocking access and SQL Server allows remote connections.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Anand Sivathanu
Ranch Hand
Joined: Jun 25, 2010
Posts: 76
|
|
I have ms sql server 2000 running in my machine port -1433(default)
username=sa
password=admin
this is the error(compile time)
java.sql.SQLException: Network error IOException: Connection refused: connect
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32712
|
|
|
This thread would sit better on our databases forum. Moving.
|
 |
Rahul Nair
Ranch Hand
Joined: Dec 01, 2007
Posts: 136
|
|
Do you have any Anti-virus software installed on you machine with firewall enabled ?, Because it may be block the request.
If you have, then disable its all operation and then check it...
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
Compile time? Do you mean runtime?
I'm a little surprised you are getting as far as this SQLException, you are using jTDS but your JDBC URL is for Microsoft's own driver. Which are you using?
Connections are refused by SQL Server 2000 for the following reasons:
Using the wrong usernane or passwordThe server instance is not configured to accept TCP/IP connections (in SQL Server 2000 it is by default I think, later versions this is not true)The server instance is configured to only use Windows Integrated authentication (which is t he default for SQL server)The server OS doesn't have any service packs applied (out the box with no SPs SQL Server 2000 just doesn't seem to work).
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
 |
|
|
subject: trying to connect sql server 2000 - not connected
|
|
|