Skip navigation.

WebLogic jDriver for Oracle (Deprecated)

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

Configuring WebLogic jDriver for Oracle

Note: The WebLogic jDriver for Oracle is deprecated and will be removed in a future release. BEA recommends that you use the BEA WebLogic Type 4 JDBC Oracle driver. For more information, see BEA WebLogic Type 4 JDBC Drivers.

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

For details about the platforms, operating systems, JVMs, DBMS versions, and client libraries supported by the WebLogic jDrivers, see WebLogic Server Supported Configurations.

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.

Windows

Add the pathnames for the WebLogic shared library (.dll) directory and the directory where you installed the Oracle client to the PATH as follows:

Syntax

Use the following syntax:

Example

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.

Table 2-1 Oracle on Windows NT

Oracle Client Version

OCI API Version

Shared Library (.dll) Directory

Notes

8.1.7

8

oci817_8

Allows access to Oracle 8 and JDBC 2.0 Core API and Optional Package API (includes distributed transactions).

9.0.1

8

oci901_8

Allows access to Oracle 9.0 and JDBC 2.0 Core API and Optional Package API (includes distributed transactions).

9.2.0

8

oci920_8

Allows access to Oracle 9.2 and JDBC 2.0 Core API and Optional Package API (includes distributed transactions).

Windows 64-Bit

Add the pathnames for the WebLogic shared library (.dll) directory and the directory where you installed the Oracle client to the PATH as follows:

Syntax

Use the following syntax:

Example

Using the above syntax to create an actual example for Oracle 9.2.0, your path may look like:

set PATH=%WL_HOME%\server\bin\win64\oci920_8;%ORACLE_HOME%\bin;%PATH%

Solaris

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.

Syntax

Use the following syntax:

Example

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.

Table 2-2 Oracle on Solaris

Oracle Client Version

OCI API Version

Shared Library (.so) Directory

Notes

8.1.7

8

oci817_8

Allows access to Oracle 8 and JDBC 2.0 Core API and Optional Package API (includes distributed transactions).

9.0.1

8

oci901_8

Allows access to Oracle 9 and JDBC 2.0 Core API and Optional Package API (includes distributed transactions).

9.2.0

8

oci920_8

Allows access to Oracle 9.2 and JDBC 2.0 Core API and Optional Package API (includes distributed transactions).

The following table lists the directory in which vendor-supplied libraries from Oracle reside for 32-bit and 64-bit installations on Solaris.

Table 2-3 Path to Oracle Libraries Installed on Solaris

Oracle Client Version

Architecture

Path to Oracle Libraries

8.1.7

32-bit

ORACLE_HOME/lib

8.1.7

64-bit

ORACLE_HOME/lib64

9.0.1

32-bit

ORACLE_HOME/lib32

9.0.1

64-bit

ORACLE_HOME/lib

9.2.0

32-bit

ORACLE_HOME/lib32

9.2.0

64-bit

ORACLE_HOME/lib


 

IBM AIX

Note: To make sure your platform is supported on the WebLogic Server release you are running, see BEA WebLogic Server Certifications.

To set up your AIX environment to support the use of WebLogic jDriver for Oracle, you must set your environment variable LIBPATH to include the directory that contains the native interface file (the driver file) and the directory in which you installed the Oracle client.

Syntax

Use the following syntax:

Example

Using the above syntax to create an actual path for Oracle 9.2.0, your path may look like:

export LIBPATH=$WL_HOME/server/lib/aix/oci920_8:$ORACLE_HOME/lib:$LIBPATH

The following table provides the directory and Oracle client versions for AIX.

Table 2-4 Oracle on AIX

Oracle Client Version

OCI API Version

Shared Library (.so) Directory

Notes

8.1.7

8

oci817_8

Allows access to Oracle 8 and JDBC 2.0 Core API and Optional Package API (includes distributed transactions).

9.2.0

8

oci920_8

Allows access to Oracle 9.2 and JDBC 2.0 Core API and Optional Package API (includes distributed transactions).

The following table lists the directory in which vendor-supplied libraries from Oracle reside for 32-bit installations on AIX.

Table 2-5 Path to Oracle Libraries Installed on AIX

Oracle Client Version

Architecture

Path to Oracle Libraries

8.1.7

32-bit

ORACLE_HOME/lib

9.2.0

32-bit

ORACLE_HOME/lib32

HP-UX 11

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, and can only be installed on 64-bit machines. 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. The Oracle 9 installation contains both 32-bit and 64-bit libraries. The WebLogic jDriver uses the 32-bit libraries so you must set SHLIB_PATH as described below.

Syntax

For Oracle 8, use the following syntax:

For Oracle 9i, use the following syntax:

Example

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.

Table 2-6 Oracle on HP

Oracle Client Version

OCI API Version

Shared Library

(.sl) Directory

Notes

8.1.7

8

oci817_8

Allows access to Oracle 8 and JDBC 2.0 Core API and Optional Package API (includes distributed transactions).

9.0.1

8

oci901_8

Allows access to Oracle 9 and JDBC 2.0 Core API and Optional Package API (includes distributed transactions).

9.2.0

8

oci920_8

Allows access to Oracle 9.2 and JDBC 2.0 Core API and Optional Package API (includes distributed transactions).

The following table lists the directory in which vendor-supplied libraries from Oracle reside for 32-bit and 64-bit installations on HP.

Table 2-7 Path to Oracle Libraries Installed on HP

Oracle Client Version

Architecture

Path to Oracle Libraries

8.1.7

32-bit

ORACLE_HOME/lib

8.1.7

64-bit

ORACLE_HOME/lib64

9.0.1

32-bit

ORACLE_HOME/lib32

9.0.1

64-bit

ORACLE_HOME/lib

9.2.0

32-bit

ORACLE_HOME/lib32

9.2.0

64-bit

ORACLE_HOME/lib


 

SGI IRIX

To find out if your platform is supported, see BEA WebLogic Server Certifications.

Siemens MIPS

To find out if your platform is supported, see BEA WebLogic Server Certifications.

Compaq Tru64 UNIX

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\weblogicXX.

For detailed instructions for using the dbping utility, see Using the WebLogic Java Utilities in the Command Reference Guide.

If you have problems, check Testing JDBC Connections and Troubleshooting in Programming WebLogic JDBC.

 


Setting Up a Connection Pool

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

  1. Include the vendor-supplied native libraries and the WebLogic native libraries for WebLogic Server in the PATH (Windows) or load library path (UNIX) of the shell where you will start WebLogic Server. For more information, see Starting and Stopping Servers in the Administration Console Online Help.
  2. Use the Administration Console to set up connection pools. To read about connection pools, see JDBC Components—Connection Pools, Data Sources, and MultiPools in the Administration Console Online Help and Configuring JDBC Connection Pools in the Administration Console Online Help.

Using the Connection Pool in an Application

Table 2-8

To use a connection pool in this type of application . . .

Establish a database connection using . . .

For details, see . . .

Server-side (such as a servlet)

DataSource on the JNDI tree or the WebLogic RMI, Pool, and JTS drivers

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:

  1. Enable JDBC logging. In the Administration Console, follow these steps:
    1. Click the Server node in the left pane.
    2. Select a specific server in the left pane.
    3. Select the Logging tab.
    4. Select the JDBC tab.
    5. Select Enable JDBC Logging.
    6. Optionally, change the JDBC log file path and name.
  2. Add JDBCDebug=true to the Properties for the connection pool. In the Administration Console, follow these steps:
    1. In the left pane, click to expand the JDBC and Connection Pool nodes and select the connection pool for which you want to log client JDBC activity.
    2. In the right pane, select the Configuration—>General tab.
    3. In the Properties box, add the following text on a new line:
    4. JDBCDebug=true

      Then click Apply.

 


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:

Table 2-9

For information about . . .

See the section called . . .

Using the driver

Using WebLogic jDriver for Oracle in Configuring and Using WebLogic jDriver for Oracle (this guide).

 

Skip navigation bar  Back to Top Previous Next