![]() |
![]() |
e-docs > WebLogic Server > Configuring and Using WebLogic jDriver for Oracle > Configuring WebLogic jDriver for Oracle |
Configuring and Using WebLogic jDriver for Oracle
|
Configuring WebLogic jDriver for Oracle
This section discusses the following topics:
Preparing to Use WebLogic jDriver for Oracle
Before you can use the WebLogic jDriver for Oracle, you must complete the tasks described in this section:
Checking Software Requirements for WebLogic jDriver for Oracle
This section lists the software requirements in the following areas:
For details about the platforms, operating systems, JVMs, DBMS versions, and client libraries supported by the WebLogic jDrivers, see WebLogic Server Certifications.
Requirements for Running JDBC 2.0
WebLogic Server 7.0 runs under the JDK 1.3.1 platform, supporting the JDBC 2.0 API— The JDBC 2.0 Core API and the JDBC Optional Package API that includes distributed transactions. In addition, you must use a driver that uses the Oracle Call Interface version 8 API.
Checking Licensing Functionality
To use WebLogic jDriver for Oracle, you must have the proper license. WebLogic jDriver for Oracle licensing functionality is included in the license file located in the BEA home directory where you installed this WebLogic Server. For example:
c:\bea\license.bea
If your license included WebLogic jDriver for Oracle when you installed or last updated your WebLogic Server license, no further action is required. If you are adding this functionality, you must get an updated license from your BEA sales representative. For instructions to update your license file, see Updating Your license.bea File in Installing BEA WebLogic Server.
Note: If you use WebLogic jDriver for Oracle when WebLogic Server is not running, you must include the path to the folder where license.bea resides in your CLASSPATH.
Setting Up the Environment for Using WebLogic jDriver for Oracle
To set up your environment to support the use of WebLogic jDrivers, you must set your path variable to include pathnames for the following:
WebLogic Server uses the dll, so, or sl files built with the Oracle Call Interface (OCI) version 8 API as the native interface for accessing an Oracle DBMS.
The tables in the following platform-specific sections list the directories—based on the Oracle client version—that you must specify in your system PATH to access the desired version of the driver.
Add the pathnames for the WebLogic shared library (.dll) directory and the directory where you installed the Oracle client to the PATH as follows:
%WL_HOME%\server\bin\ocixxxx
%ORACLE_HOME%\bin;%PATH%
Using the above syntax to create an actual example for Oracle 8.1.7, your path may look like:
$set PATH=%WL_HOME%\server\bin\oci817_8;%ORACLE_HOME%\bin;%PATH%
The following table provides the directory and Oracle client versions for Windows.
To set up your Solaris environment to support the use of WebLogic jDrivers, you must set your environment variable LD_LIBRARY_PATH to include the directory that contains the native interface file (the driver file) and the directory in which you installed the Oracle client.
$WL_HOME/server/lib/solaris/ocixxxx
$ORACLE_HOME/lib
Using the above syntax to create an actual path for Oracle 8.1.7, your path may look like:
export LD_LIBRARY_PATH=$WL_HOME/server/lib/solaris/oci817_8:$ORACLE_HOME/lib:$LD_LIBRARY_PATH
The following table provides the directory and Oracle client versions for Solaris.
The following table lists the directory in which vendor-supplied libraries from Oracle reside for 32-bit and 64-bit installations on Solaris.
To find out if your platform is supported, see BEA WebLogic Server Certifications.
To set up your HP environment to support the use of WebLogic jDrivers, you must set your environment variable SHLIB_PATH to include the directory that contains the native interface file (driver file) and the directory in which you installed your Oracle client.
Note: Oracle 9 for HP-UX is available in a 64-bit version only, including the Oracle client. Because the WebLogic jDriver for Oracle is a type-2 JDBC driver, it requires the Oracle client for database access. Therefore, to use the WebLogic jDriver for Oracle with Oracle 9, you must run WebLogic Server on a 64-bit machine.
For Oracle 8, use the following syntax:
$WL_HOME/server/lib/hpux11/oci817_8
$ORACLE_HOME/lib
For Oracle 9i, use the following syntax:
$WL_HOME/server/lib/hpux11/oci901_8
$ORACLE_HOME/lib32
Using the above syntax to create an actual path for Oracle 8.1.7, your path may look like:
export SHLIB_PATH=
$WL_HOME/server/lib/hpux11/oci817_8:$ORACLE_HOME/lib:$SHLIB_PATH
For Oracle 9.0.1, your path may look like:
export SHLIB_PATH=
$WL_HOME/server/lib/hpux11/oci901_8:$ORACLE_HOME/lib32:$SHLIB_PATH
The following table provides the directory and Oracle client versions for HP-UX.
The following table lists the directory in which vendor-supplied libraries from Oracle reside for 32-bit and 64-bit installations on HP.
To find out if your platform is supported, see BEA WebLogic Server Certifications.
To find out if your platform is supported, see BEA WebLogic Server Certifications.
To find out if your platform is supported, see BEA WebLogic Server Certifications.
Checking Connections to the Oracle Database
Once you have installed WebLogic jDriver for Oracle, verify that you can use it to connect to your database. To test your connection, use a utility called dbping that is provided with the WebLogic Server software.
To set your environment and to use dbping, type the following commands on the command line:
WL_HOME\server\bin\setWLSEnv.cmd
set path=WL_HOME\server\bin\oci817_8;%PATH%
java utils.dbping ORACLE user password server
Where WL_HOME is the directory where WebLogic Platform is installed, typically c:\bea\weblogic700.
For detailed instructions for using the dbping utility, see Using the WebLogic Java Utilities in the Administration Guide.
If you have problems, check Testing JDBC Connections and Troubleshooting in Programming WebLogic JDBC.
If you are using WebLogic jDriver for Oracle with either BEA WebLogic Server or BEA WebLogic Express, you can set up a pool of connections to your Oracle DBMS to be established when WebLogic Server starts. Because the connections are shared among users, these connection pools eliminate the overhead of opening a new database connection for each user.
Your application then looks up a DataSource on the JNDI tree and requests a connection from the connection pool. When finished with the database connection, your application returns it to the connection pool.
Configuring a Connection Pool with WebLogic Server Software
Using the Connection Pool in an Application
WebLogic RMI, Pool, and JTS drivers, or a DataSource on the JNDI tree |
Connecting To a Database Using a JDBC Connection Pool in Programming WebLogic HTTP Servlets. |
Logging JDBC Activity on a Client Application
If you are using a connection from a connection pool (that uses the WebLogic jDriver for Oracle to create database connections) in a client application , JDBC activity on the client is not automatically included in the JDBC log on the server. To enable JDBC logging and to include JDBC activity on the client in the JDBC log on the server, follow these steps:
JDBCDebug=true
Using IDEs or Debuggers with WebLogic jDrivers
If you are using an integrated development environment (IDE) or a debugger, copy the WebLogic-supplied native library (driver file) to a new file with a name that ends in _g before the file extension. For example,
Preparing to Set Up a Development Environment and Use the WebLogic jDriver for Oracle
For more information, read the following:
Using WebLogic jDriver for Oracle in Configuring and Using WebLogic jDriver for Oracle (this guide). |
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |