Migrating the HCL Commerce Version 9.1 offline database
Before you can migrate your live HCL Commerce Version 9.1 database to your HCL Commerce+ environment, you must migrate an offline version of your HCL Commerce Version 9.1 database, so you can perform the necessary testing of your migrated HCL Commerce Version 9.1 assets. The offline HCL Commerce Version 9.1 database is the HCL Commerce Version 9.1 database that you restored to your HCL Commerce+ environment.
The following diagram depicts the database migration flow.

Before you begin
- Ensure that the data in your KEYS table is valid. In particular, ensure that any rows you added for custom tables have valid data.
About this task
Procedure
-
Run the premigration database check.
- Run docker ps to verify that your containers are running.
- Locate your utility container name in the NAMES column. For example, myproject_utils_1.
-
Start a bash shell by running the following command with the utility container
name.
docker exec -it <utility_container_name> bash
-
Go to the bin directory by running the following command.
cd /opt/CommerceUtilities/bin
-
Export the
ENVTYPEenvironment variable to match the environment type.- export ENVTYPE=auth for staging.
- export ENVTYPE=live for production.
-
Check the database by running the following command:
wcim_ant.sh -tier db -action check -from 91 -instanceName instance_name -isStaging false [-defaultTablespace yes | no] [-logLevel Error | Warning | Info | Verbose | Debug] [-dbSslEnable true | false]
Where:- tier
- (Optional) Specifies the tier of your 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.
- from
- Specifies the version of the Commerce+ database from which you are migrating. The only available option is 91.
- instanceName
- (Optional) Specifies the name of your HCL Commerce Version 9.1
instance.Note: The
instanceNamemust be demo. This is an Commerce+ default.The value for instanceName defaults to demo if left unspecified.
- isStaging
- Specifies whether you are checking your staging database.
- true
- You are checking a staging database.
- false
- You checking a non-staging database.
dbSslEnable
Optional: This parameter determines whether SSL is enabled for the JDBC
database connection. When set, it appends the appropriate SSL configuration to
the JDBC connection string.- true
- Set this value if the database supports SSL connection.
- false
- Set this value if the database does not supports SSL connection.
- 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 pass 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:/opt/CommerceUtilities/bin>wcim_ant.sh -tier db -action check -from 91 -instanceName demo -isStaging false -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,) YesWhen the check completes successfully, you see the following message:INFO: WCIM has completed the job(s) successfully. - If the database check fails, review the following log file: /opt/CommerceUtilities/logs/WCIM/wcim.server.yyyy.mm.dd_hh.mm.ss.log. Address the failure message, and rerun the database check.
-
Migrate the database.
- Open a new command prompt, or use the same prompt that you used to run the database check.
-
Migrate the database by running the following command from your utility
container:
wcim_ant.sh -tier db -action migrate -from 91 -instanceName instance_name -isStaging false [-defaultTablespace yes | no] [-logLevel Error | Warning | Info | Verbose | Debug]
Where:- tier
- (Optional) Specifies the tier of your 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:
- migrate
- Migrates the database to HCL Commerce+.
- from
- Specifies the version of the Commerce+ database from which you are migrating. The only available option is 91.
- instanceName
- (Optional) Specifies the name of your HCL Commerce Version 9.1
instance.Note: The
instanceNamemust be demo. This is an Commerce+ default.The value for instanceName defaults to demo if left unspecified.
- isStaging
- Specifies whether you are checking your staging database.
- true
- You are migrating a staging database.
- false
- You are migrating a non-staging database.
dbSslEnable
Optional: This parameter determines whether SSL is enabled for the JDBC
database connection. When set, it appends the appropriate SSL configuration to
the JDBC connection string.- true
- Set this value if the database supports SSL connection.
- false
- Set this value if the database does not supports SSL connection.
- 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 pass 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:/opt/CommerceUtilities/bin>wcim_ant.sh -tier db -action migrate -from 91 -instanceName demo -isStaging false -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,) YesWhen the database migration completes successfully, you see the following message:INFO: WCIM has completed the job(s) successfully. -
If the database migration fails, review and correct any errors that might be found
in the following log file:
/opt/CommerceUtilities/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 /opt/CommerceUtilities/logs/WCIM/wcim.server.yyyy.mm.dd_hh.mm.ss.log file and the /opt/CommerceUtilities/logs/content.version.update.messages_yyyy.mm.dd_hh.mm.ss.log file. Check the logs to see whether the failure occurs while it runs the
createVersiontask from the configureContentVersionComponent.xml file. - After the migration completes successfully, review any warnings in the /opt/CommerceUtilities/logs/WCIM/wcim.server.yyyy.mm.dd_hh.mm.ss.log, and then determine whether any actions are needed.