Keyword: errors in spring connection to ms SQL Server
Org. springframework. JDBC. cannotgetjdbcconnectionexception: cocould not get JDBC connection; Nested exception is Java. SQL. sqlexception: [Microsoft] [sqlserver 2000 driver for JDBC] Error establishing socket. caused by: Java. SQL. sqlexception: [Microsoft] [sqlserver 2000 driver for JDBC] Error establishing socket. at COM. microsoft. JDBC. base. baseexceptions. createexception (unknown source) at com. microsoft. JDBC. base. baseexceptions. getexception (unknown source)
Solution:
First, check whether port 1433 of the database server is enabled.
enter the command: netstat-an in the command prompt. If no TCP: 0.0.0.0: 1433 is enabled, port 1433 is disabled. You need to download the SP3 or SP4 patch of SQL Server.
I tried several patches and finally succeeded in SQL2000-KB884525-SP4-x86-CHS.EXE
: http://www.microsoft.com/downloads/details.aspx? Familyid = 8e2dfc8d-c20e-4446-99a9-b7f0109f8bc5 & displaylang = ZH-CN
run the EXE file after downloading, the installation package sql2ksp4 is displayed. run Setup. install the Program in bat.
if a computer is suspended and needs to be restarted, enter Regedit in the running state to open the Registry Editor and find the pendingfilerenameoperations project in HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/Session Manager, and delete it, so that you can clear the temporary installation project.
after the installation is successful, run netstat-An with TCP: 0.0.0.0: 1433. port 1433 is enabled.
msbase is required. jar, MSSQLServer. jar, msutil. jar these three jar packages
: http://www.microsoft.com/downloads/details.aspx? Familyid = 9f1874b6-f8e1-4bd6-947c-0fc5bf05bf71 & displaylang = EN
setup.exe file.
after downloading the EXE file, the Three jar packages will be installed in the C:/program files/Microsoft SQL Server 2000 driver for JDBC/lib folder by default, here, only these three jar packages are useful. You can place them in other locations as long as you know the path.