Running the Migration Tool

The ENOVIA Variant Configuration Central Schema Migration Tool can be run as a separate JPO script, primarily because of performance concerns related to conversion of high volumes of data. As the volume of data can be extensive, the migration tool provides a way to break down the amount of data to be converted at one time. It is also possible to restart the migration in the event of failure.

Important: Schema migration is a post-installation process. For upgrade customers or new customers on an upgraded database, the FTR Schema Migration Tool must only be run AFTER the ENOVIA Variant Configuration Central installation is done.

This task shows you how to:

Related Topics
About the FTR Schema Migration Tool
Migrated Schema
Migration Output Files

Run the Migration Tool

Before you begin:

Before you begin:
  • If the ENOVIA Variant Configuration Central database version is earlier than V6R2012, you must first migrate the database to version V6R2012 before running the migration tool, as the tool runs only on V6R2012 databases.
  • The scripts must be run in the context of a user with system administrator privileges.
  1. Find Objects for Pre-Scan—To execute the utility that queries objects on which to perform pre-migration, run the following MQL command:

    MQL>execute program emxVariantConfigurationIntermediateObjectMigrationFindObjects -method preMigration CHUNKSIZE DIRECTORY
    Parameter Description
    CHUNKSIZE Required parameter that specifies the number of object IDs (OIDs) to write to each file
    DIRECTORY Required parameter that specifies the directory for the output files

    This program queries the objects that need to be scanned for pre-migration and writes the OIDs to files, named objectids_xx.txt, in the specified directory, where _xx is a sequential integer. These files are used in the next step.

  2. Perform Pre-Scan—To execute the pre-migration, run the following MQL command:

    MQL>execute program emxVariantConfigurationIntermediateObjectMigration -method preMigration DIRECTORY MINRANGE MAXRANGE <debug>
    Parameter Description
    DIRECTORY Required parameter that specifies the directory for the output files. This directory must be the same as that specified in the previous step.
    MINRANGE Required parameter that specifies the starting point range (starting file number, xx from the previous step) for conversion. Can be any valid integer.
    MAXRANGE Required parameter that specifies the ending point range (ending file number, xx from the previous step) for conversion. Can be any valid integer, including 'n', which means to process all files starting from MINRANGE. MAXRANGE must be larger than MINRANGE.
    debug Optional parameter that when set to 'debug' puts additional prints in the output logs.

    The program scans the current data to find any occurrences of conflicting usages and heterogeneous structures. Any occurrence of a mixed-mode usage or context is marked as a conflict, and the corresponding structures are not migrated. See "xxx" for a description of conflict scenarios and details on the operations in this step.

  3. Find Objects to Migrate—To execute the utility to query objects to be migrated, run the following MQL command:

    MQL>execute program emxVariantConfigurationIntermediateObjectMigrationFindObjects CHUNKSIZE DIRECTORY
    
    Parameter Description
    CHUNKSIZE Required parameter that specifies the number of OIDs to write to each file
    DIRECTORY Required parameter that specifies the directory for the output files.
    Important: This directory must be different than the one specified in the first step.

    This program queries the objects that need to be migrated, and writes the OIDs to files, named objectids_xx.txt, in the specified directory, where _xx is a sequential integer.

  4. Scan Data to be Migrated—It is recommended to run a scan of the data to be migrated. This step runs through all the logic of the Migration step (next step), but does not commit the changes. This provides information about any potential issues that may be encountered during the migration step. In this way, you can address these issues before running the migration. To perform the migration scan, run the following MQL command:

    MQL>execute program emxVariantConfigurationIntermediateObjectMigration DIRECTORY MINRANGE MAXRANGE false scan
    

    where:

    Parameter Description
    DIRECTORY Is a required parameter that specifies the directory where the input files are located. This directory must be the same directory as specified in the previous step for Migration Find Objects. This is also the directory where the output files migration.log, filesStatus.csv, convertedids.txt, and unConvertedObjectIds.csv, are located.
    MINRANGE Is a required parameter that specifies the starting point range (starting file number, xx from step 1) for conversion. The value can be any valid integer.
    MAXRANGE Is a required parameter that specifies the ending point range (ending file, xx from step 1) for conversion. The value can be any valid integer including n, which means to process all files starting from MINRANGE. MAXRANGE must be larger than MINRANGE.
    false The value for the debug parameter.
    scan Specifies that this is just a scan of the migration data and that no data will be migrated.

  5. Perform Migration—To execute the migration, run the following MQL command:

    MQL>execute program emxVariantConfigurationIntermediateObjectMigration DIRECTORY MINRANGE MAXRANGE <debug>
    
    Parameter Description
    DIRECTORY Required parameter that specifies the directory where the input files are located. This directory must be the same as that specified in the previous step. This is also the directory where the output files, migration.log, filesStatus.csv, convertedids.txt, and unConvertedObjectIds.csv, are located.
    MINRANGE Required parameter that specifies the starting point range (starting file number, xx from the first step) for conversion. Can be any valid integer.
    MAXRANGE Required parameter that specifies the ending point range (ending file number, xx from the first step) for conversion. Can be any valid integer, including 'n', which means to process all files starting from MINRANGE. MAXRANGE must be larger than MINRANGE.
    debug Optional parameter that when set to 'debug' puts additional prints in the output logs.

    This program performs the actual migration of ENOVIA Variant Configuration Central objects and relationships according to the details in the following sections.

  6. Optional: Clean Up Schema References—To execute the migration cleanup, run the following MQL command:

    MQL>execute program emxVariantConfigurationR212CleanSchema.tcl
    

    This step cleans up the data model to remove references to old schema that should no longer be used. To convert relational data, it is necessary to reference the old schema types in the new schema during conversion. After all of the data has been converted, the new schema no longer needs to reference old schema, which should therefore be removed. This is not a mandatory step, however, and can be done at the customer's discretion.

The database is migrated and a set of log files are written to the directory specified on the command line when running the script.

Configure the Migration Tool

In some cases, the ENOVIA Variant Configuration Central Migration Tool needs to make decisions about how to migrate the data. These decisions are captured in a set of property file settings that you can modify if your use cases differ from the out-of-the-box assumptions. Custom migration settings are configured in the emxConfigurationMigration.properties file.

You can also configure the migration tool to handle any custom schema or integration application schema. The Matrix Command object called FTRInterOpIntermediateObjectMigration is installed with ENOVIA Variant Configuration Central V6R2012x. Out-of-the-box, this command does not contain any settings. To run a custom migration on the data, the integration application (or customer application) should add a setting to this command with a unique name specifying the application name (or customer name) with a value corresponding to the program:method to call during migration. Each setting added to this command is called for each object migrated.

  1. Locate the emxConfigurationMigration.properties file.

  2. Configure any custom migration properties in this file as needed for your schema. See Migration Property File Settings for details.