Enabling Oracle database for Developer Toolkit

Configure the Developer Toolkit to use a compatible Oracle database version.

Before you begin

  • Ensure that you configure the Developer Toolkit environment and the docker_default network is created.
  • Download the appropriate Oracle Database JDBC driver (ojdbc8.jar) from Oracle Database JDBC driver and Companion Jars Downloads. The driver is required to connect to your database.

Procedure

  1. Create an Oracle DB container where your existing Developer Toolkit is configured. Set the container network to docker_default to connect other containers with the Oracle container.
    docker run -d -it --name om-oraserver -h om-oraserver --net=docker_default -p 1521:1521 <oracle image_repo:tag name>
    Note: Oracle database images are separately licensed products from the Developer Toolkit. Users are responsible for obtaining the required Oracle images.
  2. Enter the Oracle database container by running the following command:
    docker exec -it om-oraserver bash
  3. Start the SQL Plus batch query tool.
    source /home/oracle/.bashrc; sqlplus sys/Oradoc_db1@ORCLCDB as sysdba
  4. Run the following SQL query to create and configure Oracle schema(s):
    alter user sys identified by password;
    alter session set "_ORACLE_SCRIPT"=true;​
    create user omdb identified by omdb;
    grant dba to omdb;
    Note: If you want to use multischema mode, create additional database schemas.

    1. Edit the compose/docker/omruntime/safestart.properties.defaults properties to replace db2Pool value with oraclePool as following.
      jdbcService.oraclePool.url=jdbc:oracle:thin:@om-oraserver:1521:ORCLCDB
      #jdbcService.oraclePool.url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=<db_host>)(Port=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SID=ORCLCDB)))
      jdbcService.oraclePool.catalog=omdb
      jdbcService.oraclePool.dbname=omdb
      jdbcService.oraclePool.user=omdb
      jdbcService.oraclePool.password=omdb
      jdbcService.oraclePool.schema=omdb
      yfs.yfs.install.localecode=REPLACE_LOCALE_CODE
    2. Run the following command from the compose folder.
      om-compose.sh setup-upg
  5. Enter the om-runtime container by running the following command:
    docker exec -it om-runtime /bin/bash
  6. Copy the ojdbc8.jar file to your om-runtime container by running the following command:
    docker cp ojdbc8.jar om-runtime:<INSTALL_DIR>/dbjar/jdbc/ORACLE
    Note: By default, the Oracle directory is not created. To maintain a proper directory structure, it is recommended that you create the directory and copy the ojdbc8.jar file to that directory.
  7. Install ojdbc8.jar from <INSTALL_DIR>/bin by running the following commands:
    • ./install3rdParty.sh ORACLE <oracle version> -d <INSTALL_DIR>/dbjar/jdbc/ORACLE/ojdbc8.jar -targetJVM EVERY
    • ./install3rdParty.sh ORACLE <oracle version> -j <INSTALL_DIR>/dbjar/jdbc/ORACLE/ojdbc8.jar -targetJVM EVERY
    Note: Update AGENTDynamicclasspath.cfg.in and APPDynamicclasspath.cfg.in properties to include the following Oracle variables:
    • VENDOR_JAR=&INSTALL_DIR;/dbjar/jdbc/ORACLE/ojdbc8.jar
    • DB_JAR=&INSTALL_DIR;/dbjar/jdbc/ORACLE/ojdbc8.jar
  8. Edit sandbox.cfg.
    1. Add the following Oracle connection properties:
      ORA_HOST=om-oraserver
      ORACLE=true 
      ORA_DATA=ORCLCDB 
      ORA_USER=omdb 
      ORA_PASS=omdb 
      ORA_PORT=1521 
      ORACLE_NLS_LENGTH_SEMANTICS=BYTE 
      ORA_TS=CTXCAT
    2. Update the following common database properties:
      DB_USER
      UI_DB_POOL
      DB_HOST
      DB_SCHEMA_OWNER
      DB_DATASOURCE
      DB_POOL
      DB_VENDOR
      DB_DATA
      JDBC_VENDOR
      YANTRA_DB_PORT
      YANTRA_DB_PORT
      YANTRA_DB_PASS
      DBINIT_DIR
      DB_DRIVERS
      YANTRA_DB_HOST
      YANTRA_DB_DATA
      DB_PORT
      DB_PASS
    3. Disable the following DB2 specific properties from sandbox.cfg:
      DB2
      DB2_USER
      DB2_PASS
      DB2_DATA
  9. Edit system_overrides.properties with the following information:
    jdbcService.oraclePool.dbvendor=oracle
    jdbcService.oraclePool.systemPool=true
    
  10. Run setup files from <INSTALL_DIR>/bin by running the following command:
    ./setupfiles.sh
  11. Create database entities and run db verify from <INSTALL_DIR>/bin:
    ./dbverify.sh
  12. Run the entity deployer to activate the changes from <INSTALL_DIR>/bin:
    ./deployer.sh -t entitydeployer
    Known issue: The SQL generation attempts to add YFS_SBA_SHIPMENT_UPD_I1 multiple times. Remove the <INSTALL_DIR>/bin repository/scripts directory, and rerun the entity deployer to generate a new set of scripts without duplicates.
  13. Add the factory setup data to the newly created tables by running the following command from <INSTALL_DIR>/bin:
    ./loadFactoryDefaults.sh
  14. Build the EAR file by running the following command from <INSTALL_DIR>/bin:
    ./buildear.sh -Dwarfiles=smcfs,sbc,sma -Dearfile=smcfs.ear -Dnowebservice=true -Dappserver=websphere -Ddevmode=true -Dvendor=shell create-ear
  15. Run the following command to reset the password of admin user as password:
    om-compose.sh resetpsw
  16. Restart the application server by running the following command:
    docker exec -it om-appserver bash cd /opt/ibm/wlp/bin ./server stop ./server start