Migrate > Migrating WebSphere Commerce > Overview of migrating the WebSphere Commerce database using the Migration wizard > Migrating the WebSphere Commerce database using the Migration wizard



Complete the database migration

After you have successfully migrated the database using the Migration wizard, additional tasks are required to complete the database tier migration.


Procedure

  1. Restore any custom constraints that you dropped before migrating the database.

  2. If migrating from a WebSphere Commerce Version 5.6.1 environment, add the OPTCOUNTER column to your custom database tables after migrating the database. The OPTCOUNTER column enables you to set up optimistic locking on the system.

    1. Determine the custom tables to enable optimistic locking. You must create a trigger for every custom table that you want to enable optimistic locking on. This trigger increments the OPTCOUNTER value every time an update needs to be made to the table.

    2. Review the following SQL file for an example of how to define a trigger:

      where db_type is the database type (DB2, Oracle).

      This file defines the WebSphere Commerce triggers for tables that are ready for you to use as is.

    3. For each custom table, issue the following SQL command:

      DB2

      ALTER TABLE table_name ADD COLUMN optcounter SMALLINT
      

      For IBM i OS operating systemOracle

      ALTER TABLE table_name ADD optcounter SMALLINT
      

      where table_name is the name of the custom table.

  3. DB2 Run the DB2 reorg command:

    If the WebSphere Commerce node is using a remote database, catalog the remote database on the WebSphere Commerce node

    1. Windows Open a DB2 command window.

    2. AIXLinuxSolaris Log on to the system using the DB2 instance owner ID.

    3. Navigate to the WC_INSTALL\bin directory.

    4. Run the following command: Windows

      reorg.db2.bat db_name db_user db_password (db_schema_user)
      

      AIXLinuxSolaris

      ./reorg.db2.sh db_name db_user db_password (db_schema_user)
      

      The optional parameter db_schema_user is used in the previous commands if db_user is different from db_schema_user.

  4. DB2 Set integrity check for any custom new tables that reference any of the following WebSphere Commerce tables:

    • ACCOUNT

    • ATCHAST

    • ATCHTGT

    • ATCHTGTDSC

    • CATENTDESC

    • CATENTRY

    • CATGROUP

    • CATGRPDESC

    • COLLATERAL

    • CMFILE

    • DMACTIVITY

    • DMCAMPAIGN

    • EMLMSG

    • EMSPOT

    • GRADDR

    • MBRGRP

    • PX_PROMOAUTH

    • PX_PROMOCD

    • STORE

    For every custom new table that has a foreign key that references one or more tables in the preceding list, run the following SQL command:

    db2 set integrity for table_name immediate checked 
    

    where table_name is the name of the custom new table.

  5. Email transport (and all other messaging system transports) is disabled by default in WebSphere Commerce version 7. Execute the following steps to re-enable email transport after database migration:


+

Search Tips   |   Advanced Search