8.2.2 Scenario Migration Best Practices

Migrating scenarios from one environment to another requires a unified process in order to prevent conflicts and errors. This section describes the recommended best practices for scenario migration for any existing OFSBD system.

Note:

Not following the recommended best practices while loading scenarios to the targeted system may cause one or more sequence ID conflicts to occur, and your scenario will not be loaded. Once a conflict occurs, the metadata in the target environment must be corrected before the scenario can be successfully loaded.

To execute the recommended best practices, you should have an intermediate level knowledge of the scenario metadata, and be familiar with scenario patterns, thresholds, threshold sets, and so on. Basic SQL are required, as well as access privileges to the ATOMIC schema. You must also be able to update records through SQLPLUS or a similar DB utility.

Process Overview

Scenario metadata is stored in many tables, with each table using a unique sequence ID for each of its records. If scenarios, thresholds, and scoring rules are modified in multiple environments using the same sequence ID range, then conflicts may occur when you migrate scenarios to these environments. To prevent conflict, you must set different sequence ID ranges in each of the environments.

The recommended best practices contain two basic points:
  • Make changes in only one environment
  • Separate the sequence ID ranges

Best Practices

Prepare to implement the recommended best practices before installing OFSBD. Once the application is installed you should execute these steps to avoid scenario migration problems.

Making Changes in Only One Environment
  1. Only make changes to scenarios, thresholds, threshold sets, and scoring rules in the source environment.
  2. Test and confirm your changes in the source environment.
  3. Extract scenarios from the source environment and migrate them to all of your target environments.

Separating Sequence ID Ranges

Conflicting sequence IDs are often the cause errors when you migrate a scenario, so it is important to separate the sequence ID range.
  1. Review the ATOMIC.KDD_COUNTER table, which contains all sequence ID ranges and current values.
  2. Start your sequence ID ranger at 10,000,000 and separate each environment by 10,000,000. The OFSBD product sequence ID range is >100,000,000.

Sequences to Modify

You should set these sequences before doing any work on scenarios, thresholds, or scoring rules.

Table 8-4 Environment 1 (Development)

TABLE_NM SEQUENCE_NAME CURRENT_VALU E MIN_VALUE MAX_VALUE
KDD_ATTR ATTR_ID_SEQUENCE 10000000 10000000 19999999
KDD_AUGMENTATION AGMNT_INSTN_ID_SEQ 10000000 10000000 19999999
KDD_DATASET DATASET_ID_SEQUENCE 10000000 10000000 19999999
KDD_JOB JOB_ID_SEQ 200000000 10000000 19999999
KDD_LINK_ANLYS_NTWRK_D EFN NTWRK_DEFN_ID_SEQ 10000000 10000000 19999999
KDD_LINK_ANLYS_TYPE_CD TYPE_ID_SEQ 10000000 10000000 19999999
KDD_NTWRK NTWRK_ID_SEQ 10000000 10000000 19999999
KDD_PARAM_SET PARAM_SET_ID_SEQ 200000000 10000000 19999999
KDD_PTTRN PTTRN_ID_SEQ 10000000 10000000 19999999
KDD_RULE RULE_ID_SEQ 10000000 10000000 19999999
KDD_SCNRO SCNRO_ID_SEQ 10000000 10000000 19999999
KDD_SCORE SCORE_ID_SEQ 10000000 10000000 19999999
KDD_SCORE_HIST SCORE_HIST_SEQ_ID_SE Q 10000000 10000000 19999999
KDD_TSHLD TSHLD_ID_SEQ 10000000 10000000 19999999
KDD_TSHLD_HIST HIST_SEQ_ID_SEQ 10000000 10000000 19999999
KDD_TSHLD_SET TSHLD_SET_ID_SEQ 10000000 10000000 19999999

Table 8-5 Environment 2 (Test/UAT)

TABLE_NM SEQUENCE_NAME CURRENT_VALU E MIN_VALUE MAX_VALUE
KDD_ATTR ATTR_ID_SEQUENCE 20000000 20000000 29999999
KDD_AUGMENTATION AGMNT_INSTN_ID_SEQ 20000000 20000000 29999999
KDD_DATASET DATASET_ID_SEQUENCE 20000000 20000000 29999999
KDD_JOB JOB_ID_SEQ 20000000 20000000 29999999
KDD_LINK_ANLYS_NTWRK_D EFN NTWRK_DEFN_ID_SEQ 20000000 20000000 29999999
KDD_LINK_ANLYS_TYPE_CD TYPE_ID_SEQ 20000000 20000000 29999999
KDD_NTWRK NTWRK_ID_SEQ 20000000 20000000 29999999
KDD_PARAM_SET PARAM_SET_ID_SEQ 20000000 20000000 29999999
KDD_PTTRN PTTRN_ID_SEQ 20000000 20000000 29999999
KDD_RULE RULE_ID_SEQ 20000000 20000000 29999999
KDD_SCNRO SCNRO_ID_SEQ 20000000 20000000 29999999
KDD_SCORE SCORE_ID_SEQ 20000000 20000000 29999999
KDD_SCORE_HIST SCORE_HIST_SEQ_ID_SE Q 20000000 20000000 29999999
KDD_TSHLD TSHLD_ID_SEQ 20000000 20000000 29999999
KDD_TSHLD_HIST HIST_SEQ_ID_SEQ 20000000 20000000 29999999
KDD_TSHLD_SET TSHLD_SET_ID_SEQ 20000000 20000000 29999999

Table 8-6 Environment 3 (PROD)

TABLE_NM SEQUENCE_NAME CURRENT_VALUE MIN_VALUE MAX_VALUE
KDD_ATTR ATTR_ID_SEQUENCE 30000000 30000000 39999999
KDD_AUGMENTATION AGMNT_INSTN_ID_SEQ 30000000 30000000 39999999
KDD_DATASET DATASET_ID_SEQUENCE 30000000 30000000 39999999
KDD_JOB JOB_ID_SEQ 30000000 30000000 39999999
KDD_LINK_ANLYS_NTWRK_ DEFN NTWRK_DEFN_ID_SEQ 30000000 30000000 39999999
KDD_LINK_ANLYS_TYPE_C D TYPE_ID_SEQ 30000000 30000000 39999999
KDD_NTWRK NTWRK_ID_SEQ 20000000 20000000 29999999
KDD_PARAM_SET PARAM_SET_ID_SEQ 30000000 30000000 39999999
KDD_PTTRN PTTRN_ID_SEQ 30000000 30000000 39999999
KDD_RULE RULE_ID_SEQ 30000000 30000000 39999999
KDD_SCNRO SCNRO_ID_SEQ 30000000 30000000 39999999
KDD_SCORE SCORE_ID_SEQ 30000000 30000000 39999999
KDD_SCORE_HIST SCORE_HIST_SEQ_ID_SEQ 30000000 30000000 39999999
KDD_TSHLD TSHLD_ID_SEQ 30000000 30000000 39999999
KDD_TSHLD_HIST HIST_SEQ_ID_SEQ 30000000 30000000 39999999
KDD_TSHLD_SET TSHLD_SET_ID_SEQ 30000000 30000000 39999999

In order to update your database tables with recommended values, use SQLPLUS or a similar tool.

A sample SQL statement to update a set of sequence is:
UPDATE KDD_COUNTER
set min_value = 10000000,
max_value = 19999999,
current_value = 10000000
where sequence_name in
('DATASET_ID_SEQUENCE',
'ATTR_ID_SEQUENCE',
'PARAM_SET_ID_SEQ',
'PTTRN_ID_SEQ',
'RULE_ID_SEQ',
'SCNRO_ID_SEQ',
'JOB_ID_SEQ',
'TSHLD_ID_SEQ',
'NTWRK_DEFN_ID_SEQ',
'TYPE_ID_SEQ',
'TAB_ID_SEQ',
'TSHLD_SET_ID_SEQ',
'HIST_SEQ_ID_SEQ',
'AGMNT_INSTN_ID_SEQ',
'SCORE_ID_SEQ',
'SCORE_HIST_SEQ_ID_SEQ');
Commit;

Repeat for each environment, remembering to change the values for min, max, and current.