Create Data Source

This topic helps to create data source.

The method for creating data sources is explained under the following headings.

Prerequisites

To create the data source, the OCI needs to be enabled. For this, download Oracle Instant Client and install it. The details are given below:

Table 8-1 Oracle Instant Client

Package Download Location Remarks
Oracle Instant Client Package https://www.oracle.com/database/technologies/instant-client/downloads.html Install Oracle Instant Client in a local directory. While configuring Weblogic for Windows or Unix/Linux box, the user needs to provide the directory path where Instant Client is installed.

The user needs to do the data source configuration with the OCI driver enabled. The configurations are given below.

  • Oracle Weblogic on Windows Box:
    • Set {ORACLE_HOME} in the environment variable.
    • Update the Environment Variable Path as {ORACLE_HOME}/Instance Client. This is required to load all the .dll files.
    • Ensure that the ojdbc*.jar file in {WL_HOME}/server/lib/ojdbc*.jar is the same as the file {ORACLE_HOME}/jdbc/lib/ojdbc*.jar. This is required for ensuring compatibility.
    • Update PATH in StartWebLogic.bat or setDomainEnv.bat. This must be the directory path where Oracle Instant Client is installed.
  • Oracle Weblogic on Unix/Linux Box:
    • Set {ORACLE_HOME} in the environment variable.
    • Update the environment variable LD_LIBRARY_PATH as {ORACLE_HOME}/lib. This is to load all the .so files.
    • Ensure that the ojdbc*.jar file in {WL_HOME}/server/lib/ojdbc*.jar is the same as the file {ORACLE_HOME}/jdbc/lib/ojdbc*.jar. This is to ensure compatibility.
    • Update LD_LIBRARY_PATH in StartWeblogic.sh or setDomainEnv.sh. This must be the directory path where Oracle Instant Client is installed.
    • If you are still not able to load the .so files, then you need to update the EXTRA_JAVA_PROPERTIES by setting Djava.library.path as {ORACLE_HOME}/lib in StartWebLogic.sh or setDomainEnv.sh.