HCL Commerce Version 9.0.0.1

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 9.0.0.2HCL is aware of an issue with an XML file in the HCL Commerce version 9.0.0.2 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.9.0.0.2.bootstrap.xml file for editing.
    • HCL Commerce DeveloperWCDE_installdir/schema/data/xml/9.0.0/wcs.9.0.0.2.bootstrap.xml
    • HCL Commerce runtime environmentEnter the Utility server Docker container and open the /opt/WebSphere/CommerceServer90/schema/data/xml/9.0.0/wcs.9.0.0.2.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. 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 -dbUserPassword dbUserPassword -dbaPassword dbaPassword
Where:
currentPropFile
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.

dbUserPassword
The HCL Commerce database application user password.
dbaPassword
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
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.
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