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.
Migrates 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
Run 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
Ensure that you have eliminated all items that are flagged
by the database premigration checker.
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_installdir directory.
Open a command window and run the database tier migration
script:
Open a shell prompt window.
Switch to the WebSphere Application
Server user ID (for example, wasuser) as follows:
su - wasuser
Switch to the WebSphere Application Server user ID (for example,
wasuser): su - wasuser
Start a Qshell session.
Switch to the one of the following directories:
WC_installdir/bin
WC_installdir\bin
Run the database tier migration script:
./wcim_ant.sh -tier db -action migrate -from previous_version -instanceName instance_name
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.
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.
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
Resolve any errors that are flagged before proceeding.
If the database tier migration fails, make sure that you
have dropped the customized constraints, restore the database, and
then try the migration again.