updatedb utility

The updatedb utility updates the HCL Commerce database to the latest release level that is installed on your system.
Ensure that you have backed up your HCL Commerce database before running the updatedb utility.

Running the utility can affect database performance. Before running the updatedb utility, ensure that the database is tuned. If the database is not tuned, the utility can take longer to complete.

Important: Additional steps are required to enable the use of the Assets tool in Management Center for HCL Commerce when upgrading to HCL Commerce 9.1.8.0, or HCL Commerce 9.1.9.0.
This step is not required:
  • For fresh installs of HCL Commerce 9.1.8.0, or HCL Commerce 9.1.9.0.
  • For upgrades to HCL Commerce 9.1.10.0 or greater.
To enable the Assets tool, update your environment before you run the updatedb utility.
  1. Open the wcs.9.1.8.0.bootstrap.xml file for editing.
    • HCL Commerce DeveloperWCDE_installdir\schema\data\xml\9.1.8\wcs.9.1.8.0.bootstrap.xml
    • HCL Commerce runtime environmentEnter the Utility server Docker container and open the /dist/schema/data/xml/9.1.8/wcs.9.1.8.0.bootstrap.xml file for editing.
  2. Wrap the contents of the file with <import> </import>.
  3. Save the file.

Before you begin

Before you use the updatedb utility:
  • Ensure that all default constraints and indexes are present within the database.
  • Ensure that your wc-dataload-env.xml dataload configuration file contains the following line.
    IdResolveKeyPropertyFile="${IdResolveKeyPropertyFile,}"
  • Ensure that LANGUAGE_ID in the MBRGRPDESC table has a foreign key associated with the LANGUAGE_ID in the LANGUAGE table. If this is not the case, you can encounter a Cannot resolve symbol: @en_US or related error.

Production environment

  1. Open the Utility server Docker container.
  2. Run the command:
    ./updatedb.sh -dbType dbType -dbName dbName -dbUserName dbUserName -dbUserPassword dbUserPassword -dbHostname dbHostname -dbServerPort dbServerPort -dbaName dbaName -dbaPassword dbaPassword -jdbcURL jdbcURL -isStaging isStaging
    HCL Commerce Version 9.1.7.0 or later
    ./updatedb.sh -dbType dbType -dbName dbName -dbUserName dbUserName -dbUserPassword dbUserPassword -dbHostname dbHostname -dbServerPort dbServerPort -dbaName dbaName -dbaPassword dbaPassword -schemaName schemaName -jdbcURL jdbcURL -isStaging isStaging
Where:
dbType
The HCL Commerce database type. Accepted values are db2, or oracle.
dbName
The HCL Commerce database name. For example, mall.
dbUserName
The HCL Commerce database application user name.
dbUserPassword
The HCL Commerce database application user password.
dbHostname
The HCL Commerce database hostname or IP address.
dbServerPort
The HCL Commerce database port number.
dbaName
The HCL Commerce database administrator user name.
dbaPassword
Optional: The HCL Commerce database administrator user password.
HCL Commerce Version 9.1.7.0 or laterschemaName
HCL Commerce Version 9.1.7.0 or laterOptional: The HCL Commerce database application schema name.
DB2jdbcURL
The HCL Commerce database JDBC URL. For example, jdbc:db2://10.0.0.1:50000/mall.
isStaging
Specifies if the HCL Commerce database being updated is a staging database. Set this value to true for a staging database, or false for a production database.
HCL Commerce Developer

Development environment

  1. Open a command-line utility in WCDE_installdir/bin/ directory.
  2. Run the command:
    WCDE_installdir/bin/updatedb.bat dbType dbName dbUserName dbUserPassword dbHost dbPort
    HCL Commerce Version 9.1.7.0 or later
    WCDE_installdir/bin/updatedb.bat dbType dbName dbUserName dbUserPassword dbSchemaName dbHost dbPort
Where:
dbType
The type of database that you are using, for example, db2, or oracle.
dbName
The name of your HCL Commerce Developer database, for example, mall.
dbUserName
The name of your HCL Commerce Developer database user.
dbUserPassword
The HCL Commerce Developer database user password.
HCL Commerce Version 9.1.7.0 or laterdbSchemaName
HCL Commerce Version 9.1.7.0 or laterThe name of your HCL Commerce Developer database schema.
dbHost
The database server host name.
dbPort
The database server host port number.

The updatedb utility log file

After you run the updatedb utility, you can view the utility log file for information about the update process. The log level is set to info. The log file generates in the following directories:
  • Linux/opt/WebSphere/CommerceServer90/logs/updatedb/updatedb-demo.log
  • HCL Commerce DeveloperWCDE_installdir\logs\updatedb\updatedb.log