Configure SQL Server2005 Express with JDBC Connection

Source: Internet
Author: User
Tags microsoft sql server microsoft sql server 2005 sql tomcat sql server express firewall
Express|server|sql

This paper mainly introduces the whole process of configuring SQL Server2005 Express and JDBC connection.

Can the Java application under SQL Server2000 be run on SQL Server Express, and tested and configured to summarize the following experiences:

1: First confirm that the SQL Server2005 Express has been installed.

2: Enable the TCP/IP protocol.

Open the TCP/IP protocol in the program->microsoft SQL Server 2005-> Configuration Tool->sql server perimeter configuration. As follows:

Figure 1-1 SQL Server Perimeter Application Configurator window

Select the perimeter application configurator for services and connections, as follows:

In remote connection, select Use both TCP/IP and Named pipes (B), and then click Apply.

3: Configure the TCP/IP protocol in SQL Server 2005

Under Program->microsoft SQL Server 2005-> Configuration tool, run SQL Server Configuration Manager, as follows:

Default TCP/IP properties, all listening for the value "Yes", as follows:

Modify TCP/IP properties to change all listening to "no"

Change the TCP dynamic port to Null (let the server choose its own port), and the TCP port to 1433

Recommendation: Then reboot the machine and allow the restart of the machine to start SQL Server Express. You can also restart the SQL Server2005 Express service.

4: The SQL Server database was configured successfully in Tomcat.

 
  
   
  The URLs and driverclassname in SQL Server Express are different from SQL Server 2000: url= jdbc:sqlserver://127.0.0.1:1433;databasename= Sqlserver2005_test (database name);d Riverclassname=com.microsoft.sqlserver.jdbc.sqlserverdriver      Factory    Org.apache.catalina.users.MemoryUserDatabaseFactory    pathname    conf/tomcat-users.xml      maxwait    5000    maxactive    password    test    urljdbc:sqlserver://127.0.0.1:1433;databasename= Sqlserver2005_test;    Driverclassname    com.microsoft.sqlserver.jdbc.SQLServerDriver      maxidle    username    SA
 
  

5: For users using Skynet firewall

When the Java application is started, the following errors are returned when the Java database connection is established (part of the interception), as follows:

 
  
   
  Cannot create poolableconnectionfactory (an I/O error occurred while receiving the TDS pre-logon response.) 2007-03-05 14:56:35 ERROR [SYSTEM] Can not create a database connection!
 
  

In fact, this error does not matter, as long as the firewall is closed.



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.