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.