Over a million developers have joined DZone.

Setup the DBClean Utility on Your WebSphere Commerce v7 Toolkit

DZone's Guide to

Setup the DBClean Utility on Your WebSphere Commerce v7 Toolkit

· Java Zone ·
Free Resource

Get the Edge with a Professional Java IDE. 30-day free trial.

For those who have worked with WebSphere Commerce v7.0, developer toolkit installations do not contain or provide a copy of the DBClean utility. If you want to leverage, test, or develop for the DBClean utility you need to enable the utility to run within your toolkit environment.

NOTE: Developer toolkit installations only contain a minimum amount of entries within the CLEANCONF table. To fully execute the necessary DBClean utility statements, an export of data from a server installation is required; otherwise, custom statements need to be developed and inserted for execution.

To enable the DBClean utility in your WebSphere Commerce v7.0 developer toolkit installation follow the steps below:

NOTE: The following variables are referenced throughout the instructions.

  • ${WC_HOME} : The toolkit installation directory (ie. C:\IBM\WCDE_ENT70)
  • ${DB2_HOME} : The IBM DB2 installation directory (ie. C:\IBM\SQLLIB)

Step 1. Copy and ${WC_HOME}\bin\setenv.bat file to ${WC_HOME}\bin\setenv_dbclean.bat.

Step 2. Modify the ${WC_HOME}\bin\setenv_dbclean.bat file to include the following line, and set the DB2_DRIVER variable, substituting the appropriate value for the ${DB2_HOME} variable.

set DB2_DRIVER=${DB2_HOME}\java\db2jcc4.jar;${DB2_HOME}\java\db2jcc_license_cu.jar

Step 3. Copy the file contents below and create a new ${WC_HOME}\bin\dbclean.bat file, or copy the dbclean.bat file from a Windows server installation to the ${WC_HOME}\bin directory in your toolkit and modify it to reference the proper ${WC_HOME}\bin\setenv_dbclean.bat file created in steps 1 and 2.

call setenv_dbclean.bat
set CP1=%WCS_HOME%\lib\Utilities.jar;%WCS_HOME%\lib\jtopen.jar;%WCS_HOME%\wc.ear\Enablement-BaseComponentsLogic.jar;%WCS_HOME%\properties;%WAS_HOME%\java\jre\lib\xml.jar;%WAS_HOME%\lib\xerces.jar;%WAS_HOME%\lib\j2ee.jar
set CP3=%CP1%;%CP2%
%JAVA_HOME%\bin\java -classpath %CP3% -Dos=windows -Dwclogdir=%WCLOGDIR% -Doracle.jdbc.J2EE13Compliant=true -DWCS_HOME=%WCS_HOME% com.ibm.commerce.clean.DBClean %*

Step 4. Insert appropriate CLEANCONF table records as needed.

For further information on executing the DBClean utility, please refer to the WebSphere Commerce Info Center topic, Database Cleanup Utility.

Get the Java IDE that understands code & makes developing enjoyable. Level up your code with IntelliJ IDEA. Download the free trial.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}