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
- 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/
CreateIndexes.sql
CreateSequence.sql
CreateTables.sql
CreateTables_H.sql
AlterTables.sql
- One of the following create triggers scripts, depending
on whether your implementation uses simple or compound triggers:
CreateTriggers_simple.sql
CreateTriggers_compound.sql
- 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
- Navigate to the MDM_INSTALL_HOME/database/Upgrade/11.4.0/Level-I/DB2/Standard/ddl directory.
- 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. - 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
- Connect to the database that you are upgrading.
- 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, setCODE_LANG
to en. Otherwise, setCODE_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
- 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
. Forscript_name
, use the following scripts:- The insert.sql script inserts new data
- The update.sql script updates existing table data.
- The delete.sql deletes obsolete table data.
- 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
. Forscript_name
, use the following scripts:- The insert.sql script inserts new data
- The update.sql script updates existing table data.
- The delete.sql deletes obsolete table data.
- 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
. Forscript_name
, use the following scripts:- The insert.sql script inserts new data
- The update.sql script updates existing table data.
- The delete.sql deletes obsolete table data.
- 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
. Forscript_name
, use the following scripts:- The insert.sql script inserts new data
- The update.sql script updates existing table data.
- The delete.sql deletes obsolete table data.
- 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
toDEPLOYMENT_ID = DEPLOYMENT_ID
where theDEPLOYMENT_ID
is the ID of the instance you want to upgrade. - From the command line, run the command:
db2 -tvf ImpReqDataCfgMgr.sql -l log_file_name
. - From the command line, run the command:
db2 -tvf QryUpdCfgMgrData.sql -l log_file_name
.