Migrating the WebSphere Commerce database with the WCIM migration script

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

Before you begin

  1. Preparing to migrate
  2. Update your DB2 database configuration
  3. Run the database premigration checker.

About this task

The database migration script:
  • Does not delete any records from your database.
  • Version 5.6Migrates the CMDREG and VIEWREG tables to the STRUTS configuration file, struts-config-migrate.xml.
    The struts-config-migrate.xml file is created in the WC_installdir/logs/WCIM folder. This file is created during the migration of the database. After the application tier is migrated using the WCIM utility, the struts-config-migrate.xml file is automatically copied into the following folders of the WC_eardir directory:
    • CommerceAccelerator.war/WEB-INF
    • OrganizationAdministration.war/WEB-INF
    • SiteAdministration.war/WEB-INF
    • Stores.war/WEB-INF
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:
  • SolarisLinuxAIXRun all scripts associated with database migration under the same user ID that you use to start the WebSphere Commerce application server. It is recommended that you use a non-root user (for example, wasuser). You can switch to the wasuser as follows:
    su - wasuser

Procedure

  1. Ensure that you have eliminated all items that are flagged by the database premigration checker.
  2. For IBM i OS operating systemSolarisLinuxAIXBefore migrating the database, ensure that the user who runs the database tier migration script has the authority to access the files in the WC_installdir directory.
  3. Open a command window and run the database tier migration script:
    DB2
    • SolarisLinuxAIXOpen a shell prompt window.
    • SolarisLinuxAIX Switch to the WebSphere Application Server user ID (for example, wasuser) as follows: su - wasuser
    SolarisLinuxAIXOracle
    • 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:
    • For IBM i OS operating systemSolarisLinuxAIXWC_installdir/bin
    • WindowsWC_installdir\bin
  5. Run the database tier migration script:
    For IBM i OS operating systemSolarisLinuxAIX
    ./wcim_ant.sh -tier db -action migrate -from previous_version -instanceName instance_name
    
    Windows
    wcim_ant.bat -tier db -action migrate -from previous_version -instanceName instance_name
    
    Where:
    previous_version
    Is the version of WebSphere Commerce you are migrating from.
    Note: The migration script prompts 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_name
       Database type? [ db2 ] (cloudscape,db2,os400,oracle,)
    os400
       Remote database? [ false ] (true,false,)
    false
       Database name?
    my_database_name
       Database user?
    my_instance_name
       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 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:
      • SolarisLinuxAIXWC_installdir\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log
      • For IBM i OS operating systemWC_userdir\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log
      • WindowsWC_installdir\logs\WCIM\wcim.server.yyyy.mm.dd_hh.mm.ss.log
    2. Review warnings that are generated by the database tier migration script and determine whether 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 that you have dropped the customized constraints, restore the database, and then try the migration again.

What to do next

Perform post database migration steps.