Node:Oracle, Next:, Previous:Instance, Up:Top



Setting up Oracle Data Sources

(Just like all other operations in the Admin Console, after you make a set of changes, make sure you commit the changes by clicking a "Save" link, then the "Save" button.)

The instructions in the WebSphere docs for setting up shared libraries for DB drivers are wrong. They work for the first-level shared libocijdkb9.so, but not for the others. So, forget setting $LIBPATH or any other variables. Don't even waste your time setting the Native Library Path for the Provider. Just export LD_LIBRARY_PATH=$ORACLE_HOME/lib before starting WAS. (Alternatively, you could copy the 3 needed .so's to a system lib location or add $ORACLE_HOME/lib as a system lib location). Use Admin Console to perform the following actions. Environment/WebSphere-Variables. Set

         ORACLE_JDBC_DRIVER_PATH to the value of $ORACLE_HOME/jdbc/lib.
     
Resources/JDBC Providers
  1. Add the Oracle JDBC oci8 Driver. (Use whichever scope you prefer, but be aware that this determines the scope of all DataSources you create using this Provider).
  2. Make sure that Classpath is set to ${ORACLE_JDBC_DRIVER_PATH}/classes12.zip.
  3. Make sure that Implementation Classname is set to oracle.jdbc.pool.OracleConnectionPoolDataSource.
Restart WAS.
         $WAS_HOME/bin/stopServer.sh server1; $WAS_HOME/bin/startServer.sh server1
     
Admin Console again.
         Resources/JDBC Providers/Oracle JDBC oci8 Driver/DataSources
     
  1. New. Set any name. JNDI name should begin with "jdbc/". If "Statement Cache Size" is empty, set it to "10". Leave everything else at default settings and hit "Apply".
  2. Then hit "J2C Authentication Data Entries" (at bottom of the data source edit page) and create an alias for a name/password pair.
  3. Edit the DataSource to add this alias for Component-managed or Container-managed Authentication Alias. (If you use the former, then your apps have to set "Res. Auth." to "Application"; if you use the latter, then your apps have to set "Res. Auth." to "Container-managed".
  4. Hit "Custom Properties" (at bottom of the data source edit page). Click on the link "URL". Enter an Oracle oci8 URL like jdbc:oracle:oci8:@keeper.