Some ideas about configuring connection pooling for sqlserve2000 and sqlserver2005 later versions

Source: Internet
Author: User
Tags auth connection pooling

In fact, there are many things on the internet about this content, the method is very many, I also dare not swim.

Just write about yourself in the course of the online data configuration process of some ideas.

One: Modify the Server.xml file

Tomcat-6.0\conf folder The following code is added to the last in the server.xml file below:
<context path= "/" docbase= "" debug= "5" reloadable= "true" corsscontext= "true" >

<resource name= "Jdbc/connectionpool"
Auth= "Container"
Type= "Javax.sql.DataSource"
Maxactive= "20"
Maxidle= "5"
Maxwait= "10000"
Username= ""
Password= ""
Driverclassname= "Com.microsoft.sqlserver.jdbc.SQLServerdriver"
Url= "Jdbc:sqlserver://localhost:1433;databasedame="/>

The statements that load the driver and URL paths in SQL Server 2000 are

  string drivername = "Com.microsoft.jdbc.sqlserver.SQLServerDriver";  
string dburl = "jdbc:microsoft:sqlserver://localhost:1433; Databasename=sample ";



Span style= "font-size:16px" >string drivername = "Com.microsoft.sqlserver.jdbc.SQLServerDriver";
string dburl = "jdbc:sqlserver://localhost:1433; Databasename=sample ";
Note 2000 Different from 20,052: one is the sqlserver.jdbc order, the other is less Microsoft's missing < Span style= "font-size:16px" >

Two. Open the Web. xml file under Project file Web-inf (note the file for the project, not the Tomcat file )

Add the following code:
<resource-ref>
<description>Sqlserver2005</description>
<res-ref-name>jdbc/sqlserver2005</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

Three. Sqljdbc4.jar the SQL Server2008jdbc drive copy to the Lib in the project file Web-inf

If the version is 2000, three jar packages are imported: Msbase,mssqlserver,msutil.
If the version is 2005, that's Sqljdbc the package.

Some ideas about configuring connection pooling for sqlserve2000 and sqlserver2005 versions

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.