DBClean Utility for WC Toolkit

This post is brought to you by Robert Brown, Senior WebSphere Commerce Consultant, www.redbaritone.com

Installations of WebSphere Commerce Toolkit Developer environments do not provide a dbclean utility.  This utility is only available after completing a full WebSphere Commerce installation.  At times, it is necessary to insert rows into your developer’s CLEANCONF table and test database clean SQL statements for a production server prior to deployment.

Follow the steps below to enable the dbclean utility for v5.6 or v6.0 Toolkit installations.  You will need access to a Windows server installation for files referenced in {WCS_Home}.

Steps to enable dbclean on a v5.6 Toolkit environment:

  •  Copy setenv.bat as setenv_DBClean.bat in {Toolkit_Home}\bin
  • Edit setenv_DBClean.bat and add the following line at the top of the file (without the ‘—>’ of course)
         —>   SET DB2_DRIVER={DB2_HOME}\java\db2java.zip
  • Copy dbclean.bat from {WC_HOME}\bin to {Toolkit_Home}\bin
  • Edit {Toolkit_Home}\bin\dbclean.bat and change setenv.bat to setenv_DBClean.bat
  • Copy Utilities.jar and jtopen.jar from {WCS_Home}\lib to {Toolkit_Home}\lib
  • Create directory {Toolkit_Home}\wc.ear
  • Copy Enablement_BaseComponents.jar from {WC_Home}\wc.ear\to {Toolkit_Home}\wc.ear
  • Import cleanconf rows for your toolkit’s CLEANCONF table or insert new rows as needed.

Steps to enable dbclean on a v6.0 Toolkit environment:

  • Copy setenv.bat as setenv_DBClean.bat in {Toolkit_Home}\bin
  • Edit setenv_DBClean.bat and add the following line at the top of the file (without the ‘—>’ of course)
         —>   SET DB2_DRIVER={DB2_HOME}\java\db2java.zip
       where {DB2_HOME} is the value of your DB2 install root.
       Also change the .. to {WC6Toolkit_Home} so it looks like
         —>   call setshortname WCS_HOME {Toolkit_Home}
         —>   call setshortname WCLOGDIR {Toolkit_Home}\logs
         —>   call setshortname WCTEMPDIR {Toolkit_Home}\temp
  • Copy dbclean.bat from {WC_HOME}\bin to {Toolkit_Home}\bin
  • Edit {Toolkit_Home}\bin\dbclean.bat
         - change setenv.bat to setenv_DBClean.bat
         - change the path for Enablement-BaseComponentsLogic.jar from \wc.ear to \workspace\WC
         - change the path for jtopen.jar from \lib to \workspace\WC\lib
  • Import cleanconf rows for your toolkit’s CLEANCONF table or insert new rows as needed.

For more information on the WebSphere Commerce database cleanup utility (DBClean), refer to the appropriate version of the WebSphere Commerce InfoCenter.  v5.6, v6.0

 

2 Comments »

  1. Steve Brammer said,

    September 26, 2007 at 10:52 am

    Great article! I can’t wait to be able to clean up my dev environment! However, when executing on the command line, what path should be used for the -instancexml parm with the dev environment? Thanks!

  2. Robert Brown said,

    September 27, 2007 at 11:37 am

    The answer depends on your Toolkit version.

    For v5.6, your toolkit’s instance XML file is {Toolkit_Home}\conf\xml\config.xml. Note that the -instancexml parameter was added with the introduction of the v5.6.0.4 fixpack. If you are on a release prior to that version, the command line option is not needed.

    For v6.0, your toolkit’s instance XML file is {Toolkit_Home}\xml\config\wc-server.xml.

    Thanks for your comment and question!

Leave a Comment