java8964
发贴: 49
积分: 24
|
于 2006-04-12 01:22
He is using pure JDBC driver, not the ODBC, so the above help is not very useful.
This error means that the MS SQL server JDBC driver can't make the connection to the DB server. Please check your system as follows:
1) Is the sql server running? Can you login into your sql server using MS tools (Like Query Analyzer)? 2) Are the java code running remote to the sql server host? Means if the java code running in the same machine as your MS sql server? 3) If java code and sql server running on differnect machines, any firewall on DB server stop the connection? 4) Is your MS SQL server supporting TCP/IP connection enabled?
Most case, you made mistake in Step 3 or 4. How can you check? Do this test in DOS command promopt:
C:\> telnet db_server_host 1433
What's the response? If you get response like 'Connection failed', then of course the JDBC can't connect either. If you find out some problems, analyze the problem step by step. 'Divide-and-Conquer", is the solultion for all problems.
BTW, NEVER post your sa password on the web.
|