8.2.1 Using the Scenario Migration Utility

This section covers the following topics, which describe configuring and executing the Scenario Migration Utility, including extracting and loading metadata:

Configuring the Scenario Migration Utility

To configure the Scenario Migration Utility, follow these steps:

Navigate to OFSAAI Installed Directory>/database/db_tools/mantas_cfg/install.cfg. Theinstall.cfg file contains common configuration information that Scenario Migration and other utilities require for processing. The following sample install.cfg file provides sample information from the install.cfg file that is specific to this utility.
################ SCENARIO MIGRATION CONFIGURATION
#######################
#### GENERAL SCENARIO MIGRATION SETTINGS
#Specify the flags for whether scoring rules and wrapper datasets must
be extracted or loaded
score.include=N
wrapper.include=N
#Specify the Use Code for the scenario. Possible values are 'BRK' or
'EXP'
load.scnro.use=BRK
#If custom patterns exist for a product scenario, set to 'Y' when
loading a scenario hotfix.
#This should normally be set to 'N'.
load.ignore.custom.patterns=N
#Specify the full path of depfile and name of fixfile used for
extraction and loading
#Note : fixfile need not be specified in case of loading
sm.depfile=/scratch/ofsaaapp/OFSBD 8.0.2/OFSBD 8.0.2_B06/BDP62_B06/
database/db_tools/mantas_cfg/dep.cfg
sm.release=5.7.1
#### EXTRACT
# Specify the database details for extraction
extract.database.username=${utils.database.username}
extract.database.password=${utils.database.password}
# Specify the case schema name for both extraction and load .
caseschema.schema.owner=ATOMIC
# Specify the jdbc driver details for connecting to the source database
extract.conn.driver=${database.driverName}
extract.conn.url=jdbc:oracle:thin:@ofss220074.in.oracle.com:1521:Ti1O11
L56
#Source System Id
extract.system.id=
# Specify the schema names for Extract
extract.schema.mantas=${schema.mantas.owner}
extract.schema.case=ATOMIC
extract.schema.business=${schema.business.owner}
extract.schema.market=${schema.market.owner}
extract.user.miner=${load.user.miner}
extract.miner.password=${utils.miner.password}
# File Paths for Extract
#Specify the full path in which to place extracted scenarios
extract.dirname=/scratch/ofsaaapp/OFSBD 8.0.2/OFSBD 8.0.2_B06/
BDP62_B06/database/db_tools/data
#Specify the full path of the directory where the backups for the
extracted scripts would be maintained
extract.backup.dir=/scratch/ofsaaapp/OFSBD 8.0.2/OFSBD 8.0.2_B06/
BDP62_B06/database/db_tools/data/temp
#Controls whether jobs and thresholds are constrained to IDs in the
product range (product.id.range.min)
# through product.id.range.max). Values are Y and N. If the range is not
restricted, you can use range.check
# to fail the extract if there are values outside the product range.
extract.product.range.only=N
extract.product.range.check=N
#### LOAD
# Specify the jdbc driver details for connecting to the target database
load.conn.driver=${database.driverName}
load.conn.url=${utils.database.urlName}
#Target System ID
load.system.id=Ti1O11L56
# Specify the schema names for Load
load.schema.mantas=${schema.mantas.owner}
load.schema.case=ATOMIC
load.schema.business=${schema.business.owner}
load.schema.market=${schema.market.owner}
load.user.miner=${utils.miner.user}
load.miner.password=${utils.miner.password}
#Directory where scenario migration files reside for loading
load.dirname=/scratch/ofsaaapp/OFSBD 8.0.2/OFSBD 8.0.2_B06/BDP62_B06/
database/db_tools/data
# Specify whether threshold can be updated
load.threshold.update=Y
# Specify whether or not to verify the target environment on load
verify.target.system=N

Configuring the Environment

To configure the environment for scenario migration, modify the parameters that the sample <OFSAAI Installed Directory>/database/db_tools/mantas_cfg/install.cfg shows. The tables in the following sections describe the parameters specific to the Scenario Migration Utility.

Configuring General Scenario Migration

Table 8-1 General Scenario Migration Parameters

Parameter Description
score.include Flag that indicates whether scenario migration includes scenario scoring metadata; value is “Y” or “N” (the default).
wrapper.include Flag that indicates whether scenario migration includes wrapper metadata; value is “ Y” or “N” (the default).
sm.depfile Location of the scenario migration dependencies file, <OFSAAI Installed Directory>/database/db_tools/mantas_cfg/dep.cfg.
sm.release Version of the Scenario Migration Utility.

Note:

Oracle strongly recommends that you maintain scores and threshold values in a single environment. Maintaining these attributes in multiple environments and migrating the scenarios between the environments can cause the loss of threshold setspecific scoring rules.
Configuring Scenario Extraction

Table 8-2 Scenario Extraction Parameters

Parameter Description
extract.database.username User used to connect to the database when extracting scenarios (ATOMIC).
extract.database.password Password for the above user.
extract.conn.driver Database connection driver that the utility is to use (oracle.jdbc.driver.OracleDriver).
extract.conn.url Database connection string that the Scenario Migration Utility is to use.
extract.system.id System from which the scenario was extracted.
extract.schema.mantas ATOMIC schema owner in the database into which extraction of the scenarios occurs (ATOMIC).
extract.schema.business ATOMIC schema owner in the database into which extraction of the scenarios occurs (ATOMIC).
extract.schema.market ATOMIC schema owner in the database into which extraction of the scenarios occurs (ATOMIC).
extract.user.miner ATOMIC schema owner in the database into which extraction of the scenarios occurs (ATOMIC).
extract.miner.password Password for the above user.
extract.dirname Full path to the target directory where the utility writes extracted metadata <OFSAAIInstalled Directory>/database/ db_tools/ data).
extract.backup.dir Full path to the target directory where the utility writes backups of the extracted metadata (<OFSAAI Installed Directory>/ database/ db_tools/data/temp).
extract.product.range.only Indicator (Y or N) of whether to extract custom patterns, jobs, thresholds,threshold sets, and scoring rules when extracting a scenario. Set to Y to prevent extraction of these entities.
extract.product.range.check

(For internal use only.)

Indicator(Y or N) of whether to fail the extraction of a scenario if any metadata has sequence IDs outside the product range. Set to Y to fail the extraction.

Configuring Scenario Load

Table 8-3 Scenario Load Parameters

Parameter Description
load.conn.driver Database connection driver that the utility is to use (oracle.jdbc.driver.OracleDriver).
load.conn.url Database connection string that the Scenario Migration Utility is to use.
load.ignore.custom.patterns=N

When set to N, custom patterns will not be ignored. This mode should be used when migrating scenarios between environments within the client's environment. If a custom pattern is not in the loaded XML file, then it will be deactivated.

When set to Y, any custom patterns will be ignored by the load process, and should continue to operate.

load.schema.mantas ATOMIC schema owner in the database in which loading of the scenario occurs (ATOMIC).
load.schema.business ATOMIC schema owner in the database in which loading of the scenario occurs (ATOMIC).
load.schema.market ATOMIC schema owner in the database in which loading of the scenario occurs (ATOMIC).
load.user.miner ATOMIC schema owner in the database in which loading of the scenario occurs (ATOMIC).
load.miner.password Password for the above user.
load.threshold.update

Threshold values from the incoming scenario.

  • Selecting N retains the threshold values from the target environment.
  • Selecting Y updates thresholds in the target environment to values from the incoming file.
load.system.id Name that is assigned to the system into which this instance of Scenario Migration loads metadata. The system compares the value for this setting to the target system in the metadata file.
load.dirname Directory from which the system loads scenario, network, and dataset XML files.
verify.target.system

Check target name upon loading metadata files.

  • Setting to N prevents Scenario Migration from checking the load.system.id against the target system specified when the scenario, network or dataset was extracted.
  • Setting to Y enables this check. If the target in the XML file does not match the setting for load.system.id or the target is present in XML file but the load.system.id is blank then the system prompts you for an appropriate action. You can then continue with load or abandon the load, and you can apply the same answer to all other files in the session of Scenario Migration or allow the utility to continue prompting on each XML file that has a mismatch.

Extracting Scenario Metadata

Scenario metadata includes XML files that contain the table data for scenario, dataset, and network logic. The sm_extract.sh script invokes a Java tool, which creates these files. You start this script as follows:sm_extract.sh <mode> -notarget | -target <name>

where:
  • mode (mandatory) is the scenario, network, or dataset.
  • -notarget, if included, implies that the system does not save the target environment to the generated XML files.
  • -target <name> identifies the same target (in <name>) for all extracted XML files.

If you do not specify -notarget or -target <name> on the command line, the system prompts you to supply a target environment on each extracted file.

To extract scenario, dataset, and network metadata, follow these steps:
  1. Navigate to the cd <OFSAAI Installed Directory>/db_tools directory.
  2. Edit the metadata configuration files with identifying information for the scenarios, datasets, or networks for extraction:
    • <scnro_ctlg_id> in the scnros.cfg file

      and/or

    • <scnro_ctlg_id>.<scnro_id> in the scnros.cfg file

      Note:

      Providing both <scnro_ctlg_id> and <scnro_id> in the scnros.cfg file allows finer granularity when extracting scenarios. If you provide both a scenario catalog ID and a scenario ID on a line, you must separate them with a period.
    • <data_set_id> in the dataset.cfg file
    • <network_id> in the network.cfg file
  3. Execute the sm_extract.sh script in this order:
    1. Enter sm_extract.sh dataset to extract dataset metadata.
    2. Enter sm_extract.sh scenario to extract scenario metadata.
    3. Enter sm_extract.sh network to extract network metadata.

Loading Scenario Metadata

The sm_load.sh script loads translated XML table data files into the target database.

To avoid corrupting the Behavior Detection process, never load scenarios while the process is running.

To load scenario, dataset, and network metadata, follow these steps:
  1. Navigate to the following directory: cd <OFSAAI Installed Directory>/db_tools

    Optional: Edit the metadata configuration files (that is, scnros.cfg, dataset.cfg, and network.cfg) with identifying information for the scenarios, datasets, or networks that you want to load:

    • <scnro_ctlg_id> in the scnros.cfg file

      and/or

    • <scnro_id> in the scnros.cfg file

      Note:

      Providing both <scnro_ctlg_id> and <scnro_id> in the scnros.cfg file allows finer granularity when loading scenarios. You must separate values with a period per line.
    • <data_set_id> in the dataset.cfg file
    • <network_id> in the network.cfg file
  2. Copy the XML files you plan to load into the directory that the load.dirname specifies in the install.cfg file.
  3. Execute the sm_load.sh script:
    1. Enter sm_load.sh dataset to load dataset metadata.
    2. Enter sm_load.sh scenario to load scenario metadata
    3. Enter sm_load.sh network to load network metadata