If you are upgrading from an installation prior version
10.0, you might have Event Manager data stored in tables that are
separate from the master data tables. Before upgrading, merge the
tables into the primary database.
Before you begin
The following are the names of the Event Manager tables:
- ADAPTERDEF
- CDEVENTCAT
- PRODENTITY
- ENTITYEVENTCAT
- EVENT
- CDEVENTDEFTP
- EVENTDEFEXTRULE
- PROCESSACTION
- PROCESSCONTROL
- CACHINGSERVICE
- ENTITYEVENTCATOPT
Determine whether those tables are stored in a separate database.
About this task
To merge the Event Manager tables run the scripts contained
in the
EM_Merge folder, located in the
/database/Upgrade directory.
Procedure
- Navigate to the EM_Merge directory: MDM_INSTALL_HOME/database/Upgrade/EM_Merge
Note: The EM_Merge directory also appears
in certain subdirectories within the Upgrade directory.
Regardless of where it appears in the hierarchy, the contents of the
directory are always the same.
- For the scripts in EM_Merge/DB2/Standard/ddl folder,
change the placeholder tags in all of the scripts as follows:
- Replace <SCHEMA> with the 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.
- Replace <PATH> with the location
where the data files will be stored.
- Connect to your current Event Manager database.
- Export the current Event Manager data, first defining the <PATH> inside
the script, then from the command line run the following script:
db2 -tvf ExportEMData.sql -l <log_file_name>
- Connect to your current MDM database,
and set the DMD Schema Name in following scripts by running the command db2
-tvf <script_name> -l <log_file_name> for each of the
following:
- CreateEM_Tables.sql to create EM tables
- CreateEM_Hist_Tables.sql to create
EM history tables
- CreateEM_Ix.sql to create EM Indexes
- CreateEM_Fk.sql to create EM foreign
Keys
- Import the Event Manager data you got it from step 3, using
the same <PATH>, then from the command line
run the scripts, using the command:
db2 -tvf ImportEMData.sql -l <log_file_name>
- Run the following commands to create
Event Manager triggers, and make sure that you choose the same type
of trigger with your MDM database:
- Create simple triggers by running:
db2 -v -td@ -f CreateEM_Triggers_simple.sql -l <log_file_name>
- Create compound triggers by running:
db2 -v -td@ -f CreateEM_Triggers_compound.sql -l <log_file_name>
- Optional: Create simple delete triggers by running:
db2 -v -td@ -f CreateEM_Triggers_delete_simple.sql -l <log_file_name>
- Optional: Create compound delete triggers by
running:
db2 -v -td@ -f CreateEM_Triggers_delete_compound.sql -l <log_file_name>
- Optional: After you have verified that you have
successfully merged the Event Manager database into the database,
you can drop the old Event Manager database and schema.