WebSphere Commerce Enterprise

Deleting contract objects

To delete contract objects from the database, use the Database Cleanup utility.

Procedure

  1. From the WC_installdir/bin directory, run the following script:
    DB2
    • LinuxAIXFor IBM i OS operating system./dbclean.sh -object contract -type obsolete -instancexml WC_installdir /instances/ instance_name /xml/ instance_name .xml -db dbname -dbuser user -loglevel loglevel
    • Windowsdbclean -object contract -type obsolete -instancexml WC_installdir /instances/instance_name /xml/ instance_name .xml -db dbname -loglevel loglevel
    Oracle
    • Linux./dbclean.sh -object contract -type obsolete -instancexml WC_installdir /instances/ instance_name /xml/ instance_name .xml -db dbname -loglevel loglevel -dbtype oracle -dbuser user -dbpasswd password
    • Windowsdbclean -object contract -type obsolete -instancexml WC_installdir /instances/ instance_name /xml/ instance_name .xml -db database -loglevel loglevel -dbtype oracle -dbuser user -dbpasswd password
    Where The -db parameter is the name of the database that is running the database cleanup delete statement.
    OracleNote: Use host:port:sid for the Oracle database name. For example, myhost:1521:mydb.
    Note:
    • Run this Database Cleanup utility script against contract objects only on a production server. Do not run this script on a staging server. The SQL that this script causes to run uses order items that are not valid in a staging server. If you run this script on a staging server, the stagingprop utility can contain deletions of the order items that are from the staging environment to the production environment. Since the order items are no longer in the staging environment, when an SQL statement is run in both environments, the results can differ.
    • When this script runs, the database cleanup utility first deletes any content from the TRADING database table (sequence="1"). Then, the utility deletes any content from the PRODUCTSET (sequence="2") table, the TRADEPOSCN (sequence="3") table, the APRVSTATUS (sequence="3") table and finally the FLINSTANCE (sequence="3") table.
    • For details on the syntax and parameters for running the Database Cleanup utility script, see Database Cleanup utility script.
  2. Examine the WC_installdir/instances/ instance_name/logs/DBClean/DBClean.timestamp.log file.

Example

./dbclean.sh -object contract -type obsolete -demo.xml WebSphere/WebSphereCommerce/instances/demo/xml/demo.xml 
    db host:port:sid -commit 500 -max 8000 -check_object_only yes -dbtype oracle -dbuser johnsmith -dbpasswd mypasword