JDBC link SQL Server database problems and solutions

xiaoxiao2021-03-06  51

The two days have all been consumed here. In fact, this is not a very complicated thing but I still have a long time.

The first is to download the JDBC SQL Server driver. Then there is a problem with MSSQLServer.jar, Msbase.jar, Msutil.jar to Tomcat / Common / LIB. Because using jcreater. No three files set to JCReater calls. The class library is there, there is no prompt. The main reason for this time spent is not taken into account the problem. My SQL Server is a version of the old morning. So there is a problem after installation. I finally put it. Sp3 of Pudding. It is always done. This also draws some conclusions, plus some of the information collected here: 1 When "Error Establishing Socket" first wants to confirm whether SQL Server has SP3 Pudding 2 Check if SQL Server allows remote access. Specific steps: 1) Open Enterprise Manager, Open Connection Bengen Directory> SQL Server Group> Database 2) Click Right Key on the Corresponding "Database", select "3) Select "Connection" tab, check if the RPC service is selected. 3 Use the Telnet IP address 1433, whether the system prompts to connect an error, such as the system prompt error Check if the firewall blocks the network access port of SQL Server or Java IDE If so, turn off the firewall, restart SQL Server and Java IDE, test, if the system still prompts the above error, try the following step 4 to check the SQL Server port number and whether the TCP / IP protocol is enabled, the specific steps: 1) Open "Enterprise Manager ", open the control station root directory> SQL Server group> Database 2) On the corresponding" Database ", right-click, select" Properties "3) Select the General tab, click on" Network Configuration ", such as the protocol enabled No "TCP / IP Protocol" Added 4) Select "TCP / IP Protocol", click "Properties", check if its port number is 14335), such as the port number is 1433 to modify it to other port numbers, modify the JDBC connection The statement is also changed to a newly enabled port number, such as JDBC: Microsoft: SQLServer: // Server_name: 1400 (assuming new port number 1400)

转载请注明原文地址:https://www.9cbs.com/read-117584.html

New Post(0)