Manually upgrading the database on Db2 from 11.3 to 11.4

You can use a set of scripts to do a manual upgrade of the MDM database on DB2® from version 11.3 to version 11.4.

Before you begin

If applicable, upgrade your MDM database from version 11.0 to version 11.3 before beginning this procedure.

Procedure

  1. Run the following SQL upgrade scripts, in order.
    These scripts are located in the folder MDM_INSTALL_HOME/database/Upgrade/11.4.0/Level-I/DB2/Standard/ddl/
    1. CreateIndexes.sql
    2. CreateSequence.sql
    3. CreateTables.sql
    4. CreateTables_H.sql
    5. AlterTables.sql
    6. One of the following create triggers scripts, depending on whether your implementation uses simple or compound triggers:
      • CreateTriggers_simple.sql
      • CreateTriggers_compound.sql
    7. One of the following delete triggers scripts, depending on whether your implementation uses simple or compound triggers:
      • CreateTriggers_delete_simple.sql
      • CreateTriggers_delete_compound.sql
  2. Navigate to the MDM_INSTALL_HOME/database/Upgrade/11.4.0/Level-I/DB2/Standard/ddl directory.
  3. In the ImpReqDataCfgMgr.sql and QryUpdCfgMgrData.sql scripts, replace the <SCHEMA> placeholder with a schema name or owner with necessary privileges. This value must be in uppercase.
  4. In the QryUpdCfgMgrData.sql script, replace the following tokens with values that are appropriate to your own installation:
    • DB_OS - Enter the desired default value for /IBM/DWLCommonServices/DataBase/OS.
    • DB_TYPE - Use the value DB2.
    • DB_VERSION - Enter the desired default value for /IBM/DWLCommonServices/DataBase/version
    • DEFAULT_TIMEZONE - Enter the desired default value for /IBM/DWLCommonServices/MultiTimeZoneDeployment/defaultTimeZone
    • TIMEZONE_ENABLED - Use the value false.
    • NLS_SYS_LANG - Enter the desired default value for /IBM/DWLCommonServices/NLS/system_Default_Data_Locale
    • DSRC_CODE - Enter desired default value for /IBM/ThirdPartyAdapters/EAS/dsrcCode
    • EXCLUSIVE_CIENT_SYSTEMS - Enter desired default value for /IBM/ThirdPartyAdapters/EAS/exclusiveSourceSystem
  5. Connect to the database that you are upgrading.
  6. Replace the <SCHEMA> tag in the scripts in the following folders with a schema name or owner, in uppercase. CODE_LANG in the folder name is the language that is currently installed. If you are loading English data only, set CODE_LANG to en. Otherwise, set CODE_LANG to the language code of the language you are loading.
    Note: If any of the directories are empty, no data was generated and you do not need to run the scripts.
    • MDM_INSTALL_HOME/database/Upgrade/11.4.0/Level-I/DB2/Standard/ddl/data_req_CODE_LANG/data
    • MDM_INSTALL_HOME/database/Upgrade/11.4.0/Level-I/DB2/Standard/ddl/data_CODE_LANG/data-industry
    • MDM_INSTALL_HOME/database/Upgrade/11.4.0/Level-I/DB2/Standard/ddl/data_opt_CODE_LANG/data
  7. From the command line, to load the common data, English code table data, and configure the table in the language that you selected, run the scripts in the MDM_INSTALL_HOME/database/Upgrade/11.4.0/Level-I/DB2/Standard/ddl/data_req_CODE_LANG/data directory. Use the command: db2 -tvf script_name -l log_file_name. For script_name, use the following scripts:
    1. The insert.sql script inserts new data
    2. The update.sql script updates existing table data.
    3. The delete.sql deletes obsolete table data.
  8. From the command line, to load the English industry data, run the scripts in the MDM_INSTALL_HOME/database/Upgrade/11.4.0/Level-I/DB2/Standard/ddl/data_en/data-industry directory. Use the command: db2 -tvf script_name -l log_file_name. For script_name, use the following scripts:
    1. The insert.sql script inserts new data
    2. The update.sql script updates existing table data.
    3. The delete.sql deletes obsolete table data.
  9. If you are loading industry data for a language other than English, from the command line, run the scripts in the MDM_INSTALL_HOME/database/Upgrade/11.4.0/Level-I/DB2/Standard/ddl/data_CODE_LANG/data-industry directory. Use the command: db2 -tvf script_name -l log_file_name. For script_name, use the following scripts:
    1. The insert.sql script inserts new data
    2. The update.sql script updates existing table data.
    3. The delete.sql deletes obsolete table data.
  10. If you are loading code table data for a language other than English, from the command line, run the scripts in the MDM_INSTALL_HOME/database/Upgrade/11.4.0/Level-I/DB2/Standard/ddl/data_opt_CODE_LANG/data directory. Use the command: db2 -tvf script_name -l log_file_name. For script_name, use the following scripts:
    1. The insert.sql script inserts new data
    2. The update.sql script updates existing table data.
    3. The delete.sql deletes obsolete table data.
  11. Repeat the previous two steps for each non-English language that is installed.
    Note: If you have multiple deployments, before you run the following script, change the SQL clause DEPLOYMENT_ID <> 1000 to DEPLOYMENT_ID = DEPLOYMENT_ID where the DEPLOYMENT_ID is the ID of the instance you want to upgrade.
  12. From the command line, run the command: db2 -tvf ImpReqDataCfgMgr.sql -l log_file_name.
  13. From the command line, run the command: db2 -tvf QryUpdCfgMgrData.sql -l log_file_name.