HCL Commerce Version

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: HCL Commerce Version is aware of an issue with an XML file in the HCL Commerce version update package that causes the updatedb utility to fail. The fix will be resolved in the next update. Complete the following steps to immediately fix the issue before you run the updatedb utility.
  1. Open the wcs. file for editing.
    • HCL Commerce DeveloperWCDE_installdir/schema/data/xml/9.0.0/wcs.
    • HCL Commerce runtime environmentEnter the Utility server Docker container and open the /opt/WebSphere/CommerceServer90/schema/data/xml/9.0.0/wcs. 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.
  • 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. Update the /opt/WebSphere/CommerceServer90/instances/demo/xml/demo.xml file to explicitly tell the utility whether the target is the staging database or the production database.
    If the target is the staging database, set:
    • StagingEnable to true;
    • and EnvironmentEnable to false.
    Otherwise, if the target is not the staging database, set:
    • StagingEnable to false;
    • and EnvironmentEnable to true.
  3. Run the command:
    ./updatedb.sh -instanceName demo -currentPropFile currentPropFile -DdbUserPassword dbUserPassword -DdbaPassword dbaPassword
The full path and name of the database properties file. The currentPropFile is used when a database, other than the one specified in the instance.xml file, is to be updated. For example, two databases might be configured; one for operational purposes and the other for content purposes. The currentPropFile takes the same format as the createInstance.properties file that is found in the /opt/WebSphere/CommerceServer90/instances/demo/properties directory of the Utility server Docker container.

The database section in the currentPropFile is used to acquire the parameters that are required for the updatedb command.

The HCL Commerce database application user password.
Optional: The HCL Commerce database administrator user password.
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
The type of database that you are using, for example, db2, or oracle.
The name of your HCL Commerce Developer database, for example, mall.
The name of your HCL Commerce Developer database user.
The HCL Commerce Developer database user password.
The database server host name.
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