1 to www.microsoft.com download "Microsoft SQL Server Driver for JDBC" and install
2 after installation, there are three jar packages in the installed directory
Msbase.jar
Msutil.jar
Mssqlserver.jar
It is recommended that the copy be placed in the%wl_home%\server\lib directory (in fact, optional, but attached to the classpath to indicate)
3 Add 3 jar packs to CLASSPATH, Startwls.cmd, "set classpath=" and insert%wl_home%\server\lib\msbase.jar;%wl_home%\server\lib\ Msutil.jar;%wl_home%\server\lib\mssqlserver.jar;
**
Note: It is best to use Weblogic7 to change the above settings before creating domain. Otherwise, unpredictable problems may occur.
4 Confirm MSSQLServer Port number (this is more important)
And to find the port number where your instance is running, run the
Server Network Utility and select the server instance and select the
Tcp / ip. When you click the Properties button, it'll show the port.
5 Start WebLogic
6 open IE, enter in the Address bar: Http://localhost:7001/console
7 Enter user name and password
8 in the Left directory tree, select Services->jdbc->connection Pools, click Configure a new JDBC Connection Pool on the right., enter the following information:
Configuration->general page:
Name = Mssqlserverconnectionpool
URL = jdbc:microsoft:sqlserver://newsserv:1433;databasename=wjw_test (note port number in the 5th step to see the port)
Driver ClassName =com.microsoft.jdbc.sqlserver.sqlserverdriver
Properties:user=sa
Password = password for SA
Click Create to establish a connection pool.
9 Connection Property settings
Configuration->connections page:
Initial capacity from 1 to 1 (depending on demand)
Maximum capacity from 1 to 10 (depending on demand)
Targets->server page:
Move the MyServer (server name) to the list on the right, but click Apply
11 Configuration Data Source
. In the Left directory tree, select Services->jdbc->data Sources (or TxData Sources) and click Configure a new JDBC Connection Pool on the right., enter the following information:
Configuration->general page:
Name = SQL Server Tx Data Source
JNDI Name = SQL Server
Pool Name = Mssqlserverconnectionpool
Select Row Prefetch Enabled
Click Create to establish a data source.
Targets->server page:
Move the MyServer (server name) to the list on the right, but click Apply to complete the configuration.
Reboot server
ii. jdbc Driver for SQL Server with WebLogic
1 Confirm MSSQLServer Port number (this is more important)
And to find the port number where your instance is running, run the
Server Network Utility and select the server instance and select the
Tcp / ip. When you click the Properties button, it'll show the port.
2 Start WebLogic
3 Open IE, enter in the Address bar: Http://localhost:7001/console
4 Enter user name and password
5 in the Left directory tree, select Services->jdbc->connection Pools, click Configure a new JDBC Connection Pool on the right., enter the following information:
Configuration->general page:
Name = Wlsqlserverconnectionpool
URL = jdbc:weblogic:mssqlserver4:northwind@localhost:2040
Driver classname = Weblogic.jdbc.mssqlserver4.Driver
Properties:user=sa
Password = password for SA
Click Create to establish a connection pool.
6 Connection Property settings
Configuration->connections page:
Initial capacity from 1 to 10 (depending on demand)
Maximum capacity from 1 to 10 (depending on demand)
7 Targets->server page:
Move the MyServer (server name) to the list on the right, but click Apply
8 Configuration Data Source
. In the Left directory tree, select Services->jdbc->data Sources (or TxData Sources) and click Configure a new JDBC Connection Pool on the right., enter the following information:
Configuration->general page:
Name = SQL Server Tx Data Source
JNDI Name = SQL Server
Pool Name = Wlsqlserverconnectionpool
Select emulate two-phase Commit for Non-xa driver and row Prefetch Enabled
Click Create to establish a data source.
9 Targets->server page:
Move the MyServer (server name) to the list on the right, but click Apply to complete the configuration.
Ten reboot Server
JDBC pool configuration for SQL Server2000 in Re:weblogic
The configuration document above is good, but it is recommended that you do not use the WebLogic Jdriver or Ms MSSQL driver in a system that uses the MS SQL Server database. The reasons are as follows:
(1) In future releases, WebLogic will no longer support jdriver of MSSQL server
(1) Ms MSSQL driver has poor support for data queries for image and text types (that is, blobs and CLOB types).
So, try to adopt the third party's MS SQL Server driver. Only third party driver have more use time limit.
Oracle JDBC Driver configuration in WebLogic
To setup a Connection Pool
0. To update, Oracle Thin Driver bundled with WebLogic Server
Set classpath=%oracle_home%\jdbc\lib\classes12.zip;%wl_home%\lib\weblogic.jar;%classpath% (Windows)
1. Go to services/jdbc/connection Pools page of the WebLogic console.
2. Click Configure A new JDBC Connection Pool
3. Fill in the information as following (suppose you are using the Oracle JDBC Thin driver)
Instantiate the driver:
Driver = (driver) class.forname ("Oracle.jdbc.driver.OracleDriver"). newinstance ();
Make the connection:
con = driver.connect ("Jdbcracle:thin:@150.0.5.130:1521:oracle", User1, Pass1);
Calling data using JSP code The following is the contents of the test JDBC jsp1.jsp file:
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.