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
- 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. - Enter the Oracle database container by running the following command:
docker exec -it om-oraserver bash
- Start the SQL Plus batch query tool.
source /home/oracle/.bashrc; sqlplus sys/Oradoc_db1@ORCLCDB as sysdba
- 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.
- Edit the
compose/docker/omruntime/safestart.properties.defaults
properties to replacedb2Pool
value withoraclePool
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
- Run the following command from the compose
folder.
om-compose.sh setup-upg
- Edit the
- Enter the
om-runtime
container by running the following command:docker exec -it om-runtime /bin/bash
- Copy the
ojdbc8.jar
file to yourom-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. - 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: UpdateAGENTDynamicclasspath.cfg.in
andAPPDynamicclasspath.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
-
- Edit sandbox.cfg.
- 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
- 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
- Disable the following DB2 specific properties from
sandbox.cfg:
DB2 DB2_USER DB2_PASS DB2_DATA
- Add the following Oracle connection properties:
- Edit
system_overrides.properties
with the following information:jdbcService.oraclePool.dbvendor=oracle jdbcService.oraclePool.systemPool=true
- Run setup files from <INSTALL_DIR>/bin by running the following
command:
./setupfiles.sh
- Create database entities and run
db verify
from <INSTALL_DIR>/bin:./dbverify.sh
- Run the entity deployer to activate the changes from
<INSTALL_DIR>/bin:
./deployer.sh -t entitydeployer
Known issue: The SQL generation attempts to addYFS_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. - Add the factory setup data to the newly created tables by running the following command
from <INSTALL_DIR>/bin:
./loadFactoryDefaults.sh
- 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
- Run the following command to reset the password of admin user as password:
om-compose.sh resetpsw
- Restart the application server by running the following command:
docker exec -it om-appserver bash cd /opt/ibm/wlp/bin ./server stop ./server start