Migrate > Migrating WebSphere Commerce > Migrating the WebSphere Commerce Server using the command line



Migrate the WebSphere Commerce database using the WCIM migration script

Run the database migration can be done with a command line. Review this information prior to migrating to ensure that using the command line instead of the Migration wizard is the suitable method for the WebSphere Commerce environment.


Before you begin

  1. Prepare to migrate WebSphere Commerce

  2. Update the DB2 database configuration

  3. Run the database pre-migration checker.

The database migration script:

It is strongly recommended to use the WebSphere Commerce Migration wizard instead of the WCIM migration scripts to reduce the probability of errors. See

Notes:


Procedure

  1. Ensure that you have eliminated all items flagged by the database pre-migration checker and dropped or disabled all custom database constraints.

  2. For IBM i OS operating systemAIXLinuxSolaris Before migrating the database, ensure that the user who runs the database tier migration script has the authority to access the files in the WC_INSTALL directory.

  3. Open a command window and run the database tier migration script:
    DB2

    • AIXLinuxSolaris Open a shell prompt window.

    • AIXLinuxSolaris Switch to the WebSphere Application Server user ID (for example, wasuser)... su - wasuser


    AIXLinuxSolarisOracle

    • Switch to the WebSphere Application Server user ID (for example, wasuser): su - wasuser


    For IBM i OS operating system

    • Start a Qshell session.

  4. Switch to the one of the following directories:

  5. Run the database tier migration script: For IBM i OS operating systemAIXLinuxSolaris

    ./wcim_ant.sh -tier db -action migrate -from previous_version -instanceName instance
    

    Windows

    wcim_ant.bat -tier db -action migrate -from previous_version -instanceName instance
    

    Where:

    previous_version

    Is the version of WebSphere Commerce you are migrating from.

    The migration script will prompt you to enter the database password when you run it.

    Example of running the tier migration script:

    ./wcim_ant.sh -tier db -action migrate -from 60 -instanceName my_instance
       Database type? [ db2 ] (cloudscape,db2,os400,oracle,)
    os400
       Remote database? [ false ] (true,false,)
    false
       Database name?
    my_database_name
       Database user?
    my_instance
       Database user password?
    my_db_password
       Database server port?
    50000
       Is this a test run? [ Yes ] (Yes,No,)
    No
       Is the database backup completed? [ Yes ] (Yes,No,)
    Yes
       Is the database restore completed? [ Yes ] (Yes,No,)
    Yes 
    

  6. Check the log file for additional messages or errors, and resolve any errors that are flagged before proceeding. If you get the following message, the migration has completed successfully.

    [2009.06.03.07.05.05] INFO: [wcimEchoTask] Finishing ANT for WCIM at June 3 2009 07:05 AM.
    [2009.06.03.07.05.05] VERBOSE: BUILD SUCCESSFUL
    [2009.06.03.07.05.05] VERBOSE: Total time: 9 minutes 49 seconds
    [2009.06.03.07.05.05] INFO: [WCIMANT]
    <run> WCIM has completed the job(s) successfully. 
    

    1. Access the log file by typing the following path:

      • For IBM i OS operating systemAIXLinuxSolaris WC_INSTALL\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log

      • Windows WC_INSTALL\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log

    2. Review warnings generated by the database tier migration script and determine if any actions are needed based on those warnings. The actions can be found within the warning. The following list shows the type of warnings to review:

          [2009.09.29.04.15.19] WARNING: [wcimBootstrapDeltaTask] The bootstrap data has changed. Consider replacing data in table cmdreg with data in cmdreg_new.
      [2009.09.29.04.15.19] WARNING: [wcimBootstrapDeltaTask] The row in thecmdreg_new: storeent_id = 0, interfacename = com.ibm.commerce.usermanagement.commands.UserRegistrationAddCmd, classname = com.ibm.commerce.usermanagement.commands.UserRegistrationAddUBFCmdImpl, properties = null
      [2009.09.29.04.15.19] WARNING: [wcimBootstrapDeltaTask] The row in thecmdreg : storeent_id = 0, interfacename = com.ibm.commerce.usermanagement.commands.UserRegistrationAddCmd, classname = com.ibm.commerce.usermanagement.commands.UserRegistrationAddCmdImpl, properties = null
      [2009.09.29.04.15.19] WARNING: [wcimBootstrapDeltaTask] The row in thecmdreg_new: storeent_id = 0, interfacename = com.ibm.commerce.order.calculation.ApplyShippingCmd, classname = com.ibm.commerce.order.calculation.ApplyShippingCmdImpl, properties = null
      [2009.09.29.04.15.19] WARNING: [wcimBootstrapDeltaTask] The row in thecmdreg : storeent_id = 0, interfacename = com.ibm.commerce.order.calculation.ApplyShippingCmd, classname = com.ibm.commerce.order.calculation.PromotionEngineApplyShippingCmdImpl, properties = null
      

  7. Resolve any errors that are flagged before proceeding.

  8. If the database tier migration fails, make sure you have dropped the customized constraints, restore the database, and then try the migration again.


What to do next

Perform post database migration steps.


Previous topic:

Run the database pre-migration checker


Next topic:

Migrate the application using the WCIM migration script


+

Search Tips   |   Advanced Search