netstat -an 看看连接的端口是否有问题?

解决方案 »

  1.   

    1. The server name or IP address is incorrect. 
    2. The server name is correct, but the server is not running.
    3. The server name is correct and it is running, but the server does not have TCP/IP enabled. 
    4. The server name is correct, the server is running and TCP/IP is enabled, but you have specified the incorrect port number in your JDBC connection URL.
    5. If the problem is intermittent, it might be due to network problems or due to server problems (for example, the server is occasionally too busy to accept a connection). When the problem occurs, check to see if you can connect to the same server instance from another client, such as SQL Query Analyzer. It may also be useful to use a Network Sniffer such as Network Monitor (NetMon) to monitor traffic between the client and the server to determine if there is a network problem.
    6. If the problem is not intermittent, it might still be a network configuration problem. For example, you may be behind a firewall that blocks certain ports.
      

  2.   

    1、下载Microsoft SQL Server 2000 Service Pack 3a并安装,SQL请选用混和安装模式!!!
    http://www.microsoft.com/downloads/details.aspx?FamilyId=90DCD52C-0488-4E46-AFBF-ACACE5369FA3&displaylang=zh-cn
    2、下载SQL Server 2000 Driver for JDBC Service Pack 3
    http://www.microsoft.com/downloads/details.aspx?FamilyId=07287B11-0502-461A-B138-2AA54BFDC03A&displaylang=en
    3、运行时关闭防火墙
    4.下载jdbc for sql2000
      安装后,找到msbase.jar, mssqlserver.jar,msutil.jar 三个文件
      拷贝到tomcat\common\lib 下面
    5 同时在classpath中也加入%CATALINA%\common\lib\msbase.jar;%CATALINA%\common\lib\msutil.jar;%CATALINA%\common\lib\msslqserver.jar;
      

  3.   

    出现上面的错误,是因为你没有连接到SQLSERVER,可能是要连接的SQLSERVER没有启动,或者是SQLSERVER地址(包括端口)错误!就是这方面的原因,再找找!