java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establis hing socket. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source ) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSConnection.(Unknown Source) at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Sou rce) at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown S ource) at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:523) at java.sql.DriverManager.getConnection(DriverManager.java:171) at DbTest.init(DbTest.java:32) at DbTest.(DbTest.java:25) at DbTest.main(DbTest.java:46) Press any key to continue... 出现上边错误的主要原因是默认的数据库服务器端口 1433没有打开,无法直接连接,如果成功升级到sp3则这个问题可以结决。还有就是数据库一定要用Windows和数据库混合身分验证方式。
用JDBC连接SQL Server 2000常见问题分析-2:
在安装安装SQLServer2000 for SP3的驱动程序时,弹出对话框提示:"以前的某个程序安装已在安装计算机上创建挂起的文件操作"