updatedb utility
The updatedb utility updates the WebSphere Commerce database to the latest release level that is installed on your system. Ensure that you have backed up the WebSphere 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: IBM is aware of an issue with an XML file in the 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.
(Developer) 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/WebSphereCommerceServer90/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.
Runtime 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 the StagingEnable attribute to true and the EnvironmentEnable parameter to false. Otherwise, set the StagingEnable attribute to false and the EnvironmentEnable attribute to true.
- Run the command:
./updatedb.sh -instanceName demo [currentPropFile -DdbUserPassword dbUserPassword -DdbaPassword dbaPassword]
where:
- (DB2) 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 required for the updatedb command.
- dbUserPassword
- The WebSphere Commerce database user password.
- DdbaPassword
- The WebSphere Commerce database administrator user password.
(Developer)
Development environment
- Open a command-line utility in WCDE_installdir/bin/ directory.
- Run the command:
WCDE_installdir/bin/updatedb.bat dbtype db_name db_user_name dbUserPassword db_host server_port
Where
- dbtype
- The type of database that we are using, for example, db2 or oracle.
- db_name
- The name of the WebSphere Commerce Developer database, for example, mall.
- db_user_name
- The name of the WebSphere Commerce Developer database user.
- dbUserPassword
- The WebSphere Commerce Developer database user password.
- db_host
- The database server host name.
- server_port
- The database server host port number.
updatedb utility log file
After running the updatedb utility, we can view the updatedb.log log file for information about the update process. The log level is set to info. The log file generates in the following directory:
- (Linux) /opt/WebSphere/CommerceServer90/logs/update/updatedb.log
(Developer) WCDE_installdir\logs\update\updatedb.log
Related tasks
Running utilities from the Utility server Docker container
Collecting MustGather data for runtime update issues