Errors in connecting to ms SQL Server using spring

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.