Running the migration checker and migration utility on your IBM Websphere Commerce Version 7 Feature Pack 8 development database

By now, you configured your HCL Commerce Version 9 development environment to use your IBM Websphere Commerce Version 7 development database. Migrate this IBM Websphere Commerce Version 7 database to HCL Commerce Version 9 by running the migration check and migration utility through command line. Then, run the updatedb utility to upgrade your database to HCL Commerce Version 9.

Procedure

  1. Run the premigration database check.
    1. Open a command prompt.
    2. Go to the WCDE_installdir\bin directory.
    3. Check the database by running the following command:
      wcim_ant.bat -tier db -action check -from 70 [-defaultTablespace yes | no] [-logLevel Error | Warning | Info | Verbose | Debug]
      Where:
      tier
      (Optional) Specifies the tier of your HCL Commerce topology that you are migrating. The only available option is db.

      The value for tier defaults to db if left unspecified.

      action
      Specifies the action to perform when the command runs. The supported actions are as follows:
      check
      Runs the database premigration checker to check the status of your database before you migrate it. Run the database premigration checker before you migrate the database.
      migrate
      Migrates the database to HCL Commerce Version 9.
      from
      Specifies the version of the HCL Commerce database from which you are migrating.
      defaultTablespace
      Optional: Specifies whether to use a default table space for your database.
      yes
      Sets a default table space.
      no
      A non-default table space can be used. You are prompted to enter a table space name later in the migration.
      logLevel
      Optional: Specifies the amount of information about the database tier migration that is logged. The valid log levels are as follows:
      Error
      Only error messages are logged.
      Warning
      All warning and error messages are logged.
      Info
      All error, warning, and event messages are logged.
      Verbose
      All errors, events, and other information are logged, including all SQL statement information. It requires 1 - 2 MB of storage for most migrations. Verbose is set by default.
      Debug
      Similar to the Verbose option, but includes some additional debug information. This value is helpful if you encounter errors and need to debug them. It requires 1 - 2 MB of storage for most migrations.
      The following snippet is an example of the database check interactions:
      WCDE_installdir\bin>wcim_ant.bat -tier db -action check -from 70 -logLevel Verbose
      Database type? 
      db2
      
      Database name?
      mall
      
      Is the database backup completed? [ Yes ] (Yes,No,)
      Yes
      
      Is the database restore completed? [ Yes ] (Yes,No,)
      Yes
      When the check completes successfully, you see the following message:
      INFO:   WCIM has completed the job(s) successfully.
    4. If the database check fails, review the following log file: WCDE_installdir\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log. Address the failure message, and rerun the database check.
  2. Migrate the database.
    1. Open a new command prompt, or use the same prompt that you used to run the database check.
    2. Migrate the database by running the following command:
      wcim_ant.bat -tier db -action migrate -from 70 [-defaultTablespace yes | no] [-logLevel Error | Warning | Info | Verbose | Debug]
      Where:
      tier
      (Optional) Specifies the tier of your HCL Commerce topology that you are migrating. The only available option is db.

      The value for tier defaults to db if left unspecified.

      action
      Specifies the action to perform when the command runs. The supported actions are as follows:
      check
      Runs the database premigration checker to check the status of your database before you migrate it. Run the database premigration checker before you migrate the database.
      migrate
      Migrates the database to HCL Commerce Version 9.
      from
      Specifies the version of the HCL Commerce database from which you are migrating.
      defaultTablespace
      Optional: Specifies whether to use a default table space for your database.
      yes
      Sets a default table space.
      no
      A non-default table space can be used. You are prompted to enter a table space name later in the migration.
      logLevel
      Optional: Specifies the amount of information about the database tier migration that is logged. The valid log levels are as follows:
      Error
      Only error messages are logged.
      Warning
      All warning and error messages are logged.
      Info
      All error, warning, and event messages are logged.
      Verbose
      All errors, events, and other information are logged, including all SQL statement information. It requires 1 - 2 MB of storage for most migrations. Verbose is set by default.
      Debug
      Similar to the Verbose option, but includes some additional debug information. This value is helpful if you encounter errors and need to debug them. It requires 1 - 2 MB of storage for most migrations.
      The following snippet is an example of how to run the database migration check:
      WCDE_installdir\bin>wcim_ant.bat -tier db -action migrate -from 70 -logLevel Verbose
      Database type? 
      db2 
      
      Database name?
      mall
      
      Is the database backup completed? [ Yes ] (Yes,No,)
      Yes
      
      Is the database restore completed? [ Yes ] (Yes,No,)
      Yes
      When the database migration completes successfully, you see the following message:
      INFO:   WCIM has completed the job(s) successfully.
    3. If the database migration fails, review and correct any errors that might be found in the following log file: WCDE_installdir\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log.
      Note: If your database migration fails while it enables content versioning, you need to restore the database before you rerun the migration. To determine whether the migration failed while it enabled content versioning, review the WCDE_installdir\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log file. Check the log to see whether the failure occurs while it runs the createVersion task from the configureContentVersionComponent.xml file.
    4. After the migration completes successfully, review any warnings in the WCDE_installdir\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log, and then determine whether any actions are needed.
After your database is migrated successfully, complete the following post-database migration tasks.
  1. Update the SITE table to contain the required base values.
    1. Connect to your database server.
    2. Run the following SQLs:
      • delete from site where COMPNAME not IN ('BASE');
      • update SITE set VERSION = 9, MOD=0, FIXPACK=0 where COMPNAME IN ('BASE');
    3. After the SQL completes, you can run the following SQL to ensure that the SITE table was updated.
      select * from SITE;
  2. Update the SRCHCONF database table with the search preprocessing directory.
    1. Connect to your database server.
    2. Run the following SQL statement:
      update SRCHCONF set CONFIG = replace(CONFIG, 'old_PreProcessdir', 'new_PreProcessdir') where indextype='CatalogEntry';
      update SRCHCONF set CONFIG = replace(CONFIG, 'old_PreProcessdir', 'new_PreProcessdir') where indextype='CatalogGroup';
      Where:
      old_PreProcessdir
      The preprocess directory of the IBM Websphere Commerce Version 7 Search server.
      new_PreProcessdir
      The preprocess directory of the HCL Commerce Version 9 Search server.
      For example,
      update SRCHCONF set CONFIG = replace(CONFIG, 'C:\IBM\WCDE_E~1\search\pre-processConfig\MC_10051\DB2', 'C:\IBM\WCDE_V9\workspace\WC\xml\search\dataImport\v3\db2\CatalogEntry') where indextype='CatalogEntry';
      update SRCHCONF set CONFIG = replace(CONFIG, 'C:\IBM\WCDE_E~1\search\pre-processConfig\MC_10051\DB2\CatalogGroup', 'C:\IBM\WCDE_V9\workspace\WC\xml\search\dataImport\v3\db2\CatalogGroup') where indextype='CatalogGroup';
  3. Update to NIST SP 800-131A security standards.
    1. If you used the Key Locator Framework (KLF) in IBM Websphere Commerce Version 7, migrate your key provider customizations. For more information about the KLF, see Key Locator Framework (KLF).
    2. Copy all custom keys files from your IBM Websphere Commerce Version 7 environment to your HCL Commerce Version 9 environment.
      1. Open your IBM Websphere Commerce Version 7 workspace_dir/WC/xml/config/wc-server.xml file, and look for the KeysConfigFile parameter. The KeysConfigFile parameter points to a separate custom key configuration XML.
      2. Open the custom key XML file defined in workspace_dir/xml/config/wc-server.xml.
      3. The custom files that are referenced in this custom keys XML file must be copied to the same directories on your HCL Commerce Version 9 environment.
        In general these custom files are:
        • CustomKeys.xml
        • merchantKey.xml
        • KeyEncryptionKey.xml
    3. Validate that the migrated user can log in to your HCL Commerce Version 9.0.0.3+ tools.
  4. When you set up your HCL Commerce Version 9 environment, you specified an spiuser user password. Now that your database is migrated from a previous version, your spiuser user password might be inconsistent.
    1. Set the spiuser password in your Docker images.
    2. Update the account policy for the spiuser user.
      Run the following SQL.
      UPDATE USERREG SET PLCYACCT_ID = NULL WHERE logonid = 'spiuser';
  5. Run the updatedb utility.
  6. If you are migrating from IBM Websphere Commerce Version 7, and you have configured workspaces, and have already run the update workspaces schema script after migrating, run the following SQL statement in each workspace write schema:
    • DB2
      ALTER TABLE PAGELAYOUT ALTER COLUMN PAGELAYOUTTYPE_ID DROP NOT NULL;
      
      CALL SYSPROC.ADMIN_CMD ('REORG TABLE PAGELAYOUT');
    • Oracle
      ALTER TABLE PAGELAYOUT MODIFY PAGELAYOUTTYPE_ID NULL;