This section contains procedures and descriptions of the
scripts used to upgrade the 9.0.2 database to 10.1.0 for DB2® on UNIX or Linux.
Before you start, ensure that you have read:
- For the scripts in <MDM_INSTALL_HOME>/Upgrade/MDM/Level-II/DB2/Standard/ddl,
change the placeholder tags in all of the scripts:
- Replace <SCHEMA> with a schema name or owner with necessary privileges. This must
be in uppercase.
- Replace <TABLE_SPACE> with a tablespace
name that refers to the tablespace where the data is located
- Replace <INDEX_SPACE> with a tablespace
name that refers to the tablespace where the indexes are located
- Replace <LONG_SPACE> with a valid
tablespace name for storing long type data, either CLOB or XML data
- Connect to the database that you are upgrading.
- From the command line, run the following scripts using
the command db2 -tvf <script_name> -l <log_file_name>:
Important: You must run the scripts in the same
sequence that they are listed.
- CreateTables.sql to create new tables
- CreateTables_H.sql to create history
tables
- AlterTables.sql to modify the existing
table definitions
- CreateFK.sql to create new foreign
keys
- CreateIndexes.sql to create new indexes
Important: Before running
next step, ensure that you have DBA access to run the scripts, then
check the instructions inside the script file. The UpdateIndex.sql step
changes an existing index to a unique index. If your current data
have duplicate values on indexed columns, this step will fail. An
SQL statement has been provided for you to check the duplicate data,
which you can easily fix.
- UpdateIndex.sql to
modify an existing index into a unique index.
- Create_eME.sql to
create InfoSphere MDM Probabilistic Matching
Engine objects. In this script, two extra table spaces for InfoSphere MDM Probabilistic Matching
Engine database
objects are created. The names of the two table spaces are created
based on <TABLE_SPACE> and <INDEX_SPACE>.
You can change these as necessary.
- Run the following commands to update the triggers.
- Simple triggers for updates, run:
- db2 –v –td@ -f CreateTriggers_simple.sql –l <log_file_name>
- Compound triggers for inserts and updates, run:
- db2 –v –td@ -f CreateTriggers_compound.sql –l <log_file_name>
- Optional: Simple delete triggers, run:
- db2 –v –td@ -f CreateTriggers_delete_simple.sql –l <log_file_name>
- Optional: Compound delete triggers, run:
- db2 –v –td@ -f CreateTriggers_delete_compound.sql –l <log_file_name>
- 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 you currently have installed:
Important: If any of the scripts are empty or not
included, they are not applied to the upgrade and can be ignored.
- <MDM_INSTALL_HOME>/Upgrade/MDM/Level-II/DB2/Standard/ddl/data_req_<CODE_LANG>/data
- <MDM_INSTALL_HOME>/Upgrade/MDM/Level-II/DB2/Standard/ddl/data_<CODE_LANG>/data-<industry>
- <MDM_INSTALL_HOME>/Upgrade/MDM/Level-II/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>/Upgrade/MDM/Level-II/DB2/Standard/ddl/data_req_<CODE_LANG>/data folder,
using the command db2 -tvf <script_name> -l <log_file_name>:
- insert.sql inserts new data
- update.sql updates existing table data
- delete.sql deletes obsolete table data
If you are loading English data only, the <code_lang> must
be "en". Otherwise, <code_lang> must be the language
code of the language you are loading. If you are loading English and
one or more additional languages, you might get "duplicate" error
messages when running insert.sql and “record not
found" error messages when running delete.sql for
the other languages These error messages have no impact on the correctness
or validity of the upgrade.
- From the command line, to load the English industry data,
run the scripts in the <MDM_INSTALL_HOME>/Level-II/Upgrade/MDM/DB2/Standard/ddl/data_en/data-<industry> folder,
using the command db2 -tvf <script_name> -l <log_file_name>:
- insert.sql inserts new data
- update.sql updates existing table data
- delete.sql deletes obsolete table data
If you are only loading English language data, you are done.
If you are loading data for other languages, continue through steps
8 and 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>/Upgrade/MDM/Level-II/DB2/Standard/ddl/data_<CODE_LANG>/data-<industry> folder,
using the command db2 -tvf <script_name> -l <log_file_name>:
- insert.sql inserts new data
- update.sql updates existing table data
- 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>/Upgrade/MDM/Level-II/DB2/Standard/ddl
/data_opt_<CODE_LANG>/data folder, using the command db2
-tvf <script_name> -l <log_file_name>:
- insert.sql inserts new data
- update.sql updates existing table data
- delete.sql deletes obsolete table data
Repeat steps 8 and 9 for each language that you have installed.