updatedb utility
The updatedb utility updates the HCL Commerce database to
the latest release level that is installed on your system.
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 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.
- Open the wcs.9.0.0.2.bootstrap.xml file for editing.
- WCDE_installdir/schema/data/xml/9.0.0/wcs.9.0.0.2.bootstrap.xml
- Enter 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.
- Wrap the contents of the file with
<import> </import>
. - 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 theLANGUAGE_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
- Open the Utility server Docker container.
- 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.
StagingEnable
to false;- and
EnvironmentEnable
to true.
- Run the command:
./updatedb.sh -instanceName demo -currentPropFile currentPropFile -dbUserPassword dbUserPassword -dbaPassword dbaPassword
- 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.
Development environment
- Open a command-line utility in WCDE_installdir/bin/ directory.
- Run the
command:
WCDE_installdir/bin/updatedb.bat dbType dbName dbUserName dbUserPassword dbHost dbPort
- 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:- /opt/WebSphere/CommerceServer90/logs/updatedb/updatedb-demo.log
- WCDE_installdir\logs\updatedb\updatedb.log