How to establish a connection eclipse sql server database

Creative Commons License Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )

Step 1、
Here Insert Picture Description
Step 2、
Here Insert Picture Description
Here Insert Picture Description

The following operation of the machine because it is already configured sql server2005, so will have an error message can be ignored.
3 the STEP,
Here Insert Picture Description
the Step 4, and then open the small JAR List page, select the existing sqljdbc.jar to clear all out. Then:
Here Insert Picture Description
the Step. 5, the next page to open the small Properties:
Here Insert Picture Description
Review four: A, ConnectionURL localhost into the connection address of their own database, eg10.128.41.113; Name = back into its own database name
B, DatabaseName into PRIMAS
C, Password
D, the UserID
the Step. 6, the need to import maven repository sqlserver package. Then go to the maven maven settings.xml file, locate the mirrors inside the warehouse address url that is configured with the company. After opening the search to find maven maven-sqlserver. Then find the version number. Then the corresponding increase in dependency among pom.xml file:

com.microsoft.sqlserver
MSSQL-jdbc
6.2.2.jre8

after saving refresh code.
Here Insert Picture Description
But when the test was being given a connection.
Here Insert Picture Description
Here Insert Picture Description
Specific error information is as follows:
com.microsoft.sqlserver.jdbc.SQLServerException: 10.128.41.113 is connected to a host TCP / IP connection via port 1433 fails. Error:. "Connect timed out, please verify the connection properties to ensure that instances of SQL Server running on the host, and in this port accepts TCP / IP connections, make sure the firewall is not blocking this port TCP connection.

Guess you like

Origin blog.csdn.net/u014515465/article/details/93204735