You can perform the database migration to the new version by running the WBI Monitor Migration Tool. This tool starts by running a batch file named migration.bat on Windows platform (or migration.sh on AIX and Solaris platforms) that exists in the migration directory in the folder where you have extracted the contents of the zip (or tar) file you have downloaded from the Internet.
This batch (or shell) file needs the path and name of the database JDBC Driver file and the path of the name of the migration properties file to be passed as parameters when you run it.
Before you run the Migration Tool, you need to edit the migration properties file named migration.properties that is located in migration directory in order to adjust it default properties values to the suitable values that match your deployment environment.
To modify the migration properties file:
Open the file named migration.properties with any text editor you have.
Select the proper JDBC driver you are using (either the DB2 driver or Oracle driver) by removing the comment mark (#) before the line that contains this driver and put another comment mark before the line that contain the unused driver.
Example:
If you are using IBM DB2 then the file should contain these lines:
# DB2 Driver
monitor.db.driver=COM.ibm.db2.jdbc.app.DB2Driver
# Oracle Driver
#monitor.db.driver=oracle.jdbc.driver.OracleDriver
If you are using Oracle then the file should contain these lines:
# DB2 Driver
#monitor.db.driver=COM.ibm.db2.jdbc.app.DB2Driver
# Oracle Driver
monitor.db.driver=oracle.jdbc.driver.OracleDriver
Select and adjust the proper Monitor database URL by removing the comment mark (#) before the line that contains proper database URL and put another comment mark before the line that contain the other URL. If the database URL needs to be modified with a different database name then you should modify it too (the default name is WFMDB).
Example:
If you are using IBM DB2 then the file should contain these lines:
# Step: Get Monitor Database
#monitor.db.url=jdbc:oracle:thin:@oracle:1521:WFMDB
monitor.db.url=jdbc:db2:WFMDB
If you are using Oracle then the file should contain these lines:
# Step: Get Monitor Database
monitor.db.url=jdbc:oracle:thin:@SERVER_IP:1521:WFM
#monitor.db.url=jdbc:db2:WFMDB
If the Monitor Database has been created with a different name other than the default database name (WFMDB) then you must also change the database name in the file with the actual name of the database.
Adjust the values of the Monitor database administrator's user name, password, database Schema and the database TableSpace name with the actual values you are using.
Repeat steps 3 and 4 for the MQ Workflow (Event Queue) database section to adjust the database URL, database administrator's user name, password, database Schema and the database TableSpace name with the actual values you are using.
If the Event Queue Database has been created with a different name other than the default database name (FMCDB) then you must also change the database name in the file with the actual name of the database.
If you are not using MQ Workflow as the runtime engine (that means you are using only WMQI only), then you should comment or remove all properties of the MQ Workflow database section in the properties file. to comment the properties, put the comment mark (#) at the beginning of each line in the section.
If you want to run the SQL statements that perform the database migration separately, then you must remove the comment mark (#) before the line that contains the property monitor.db.runSQL=FALSE.
This step is mandatory if you are using IBM DB2 database on OS/ 390 or z/OS platforms.
In this case you should run the appropriate .sql files that exist in the SQL folder under the migration folder. There are three folders under the SQL folder: DB2, Oracle, and DB2OS390. Each of these folders contains the sql files that should be run as in the following:
For IBM DB2 database on Windows, AIX, and Solaris platforms:
Run the files named DB2WFMDB.sql and DB2FMCDB.sql that are located under the Migration\sql\DB2 folder before running the migration.bat (or the migration.sh) file.
Run the file named DB2WFMDB-AfterJarExecution.sql that is located under the Migration\sql\DB2 folder after running the migration.bat (or the migration.sh) file.
For IBM DB2 database on OS/390 and z/OS platforms:
Run the files named DB2-OS390WFMDB.sql that is located under the Migration\sql\DB2OS390 folder before running the migration.bat (or the migration.sh) file.
Run the file named DB2-OS390WFMDB-AferJarExecution.sql that is located under the Migration\sql\DB2OS390 folder after running the migration.bat (or the migration.sh) file.
For Oracle database on Windows, AIX, and Solaris platforms:
Run the files named OracleWFMDB.sql and OracleFMCDB.sql that are located under the Migration\sql\Oracle folder before running the migration.bat (or the migration.sh) file.
Run the file named OracleWFMDB-AfterJarExecution.sql that is located under the Migration\sql\DB2 folder after running the migration.bat (or the migration.sh) file.
Before running these files, you should edit them in order to change the variables named $SCHEMA$ and $TABLESPACE$ with the actual names of the tables schema and tablespace in each occurrence in the files.
Keep the value of the property named monitor.db.version without any change.
Save and close the file.
You can save the file with a different name. In this case you should pass this new name to the migration.bat when you run it.
Important Notes:
Make sure that the Database Users specified in the migration properties file have enough privileges (create table, create trigger, drop table, drop trigger, alter table, select, insert, update).
If the database type is Oracle, make sure that the Monitor Database User specified in the migration properties file is the owner of Monitor Schema.
According to your stored data size in the Monitor database and the MQ Workflow database, you may need to do the following before running the migration:
In Oracle Database, increase the Rollback Segment value.
In DB2 Database, increase the Log File Size.
To run the Migration Tool:
From the command line, run the migration.bat (or migration.sh) with passing the database JDBC Driver file and the path and the name of the migration properties file as parameters
Example:
Type the following in the command line and press Enter
<ExtractionFolder>\migration\migration.bat <DB2>\bin\java12\db2java.zip migration.properties.
Wait until the migration is done and the confirmation message appears.
If any error occurs, then restore the databases from the backup you made before the migration, contact the WBI Monitor Support for troubleshooting, and send them the following log file: <ExtractionFolder>\migration\ migration.log.