The Database Cleanup utility removes objects from your database.
Notes:
You must include the optional parameters, logon user ID, and password even if you are currently running this utility with the same user ID.
If you are using DB2, to run the Database Cleanup utility, run the script from a DB2 command line. If you are using Oracle, run the script from a Windows command prompt.
Before running the Database Cleanup utility, log onto your system as a non root user for WebSphere Commerce. From a command line, run the Database Cleanup utility script.
Use dbclean.sh. To run shell scripts:
- Log on with a user profile that has a CCSID other than 65535.
- Open a QSHELL command window by typing the following command on an OS/400 command line: STRQSH.
- Run the utility as follows: /QIBM/ProdData/CommerceServer56/bin/dbclean.sh parameters
Parameter values
- object
- The name of the object to be deleted. Type one of the following object names:
- account
- Deletes account objects.
- address
- Deletes address objects.
- atp_inventory
- Deletes receipt information objects.
- attachment
- Deletes attachment objects.
- auction
- Deletes auction objects.
- auctionlog
- Deletes auction log objects.
- autobidlog
- Deletes autobids objects for auctions.
- baseitem
- Deletes product information objects.
- bidlog
- Deletes bid log objects.
- cacheivl
- Deletes cacheivl objects.
- calculation_code
- Deletes calculation code objects.
- catentry
- Deletes catalog entry objects.
- catalog_group
- Deletes catalog group objects.
- contract
- Deletes contract objects.
- coupon_promotion
- Deletes coupon objects.
- cpgnlog
- Deletes campaign objects.
- cpgnstats
- Deletes campaign statistic objects.
- expected_inventory_records
- Deletes inventory objects.
- expected_inventory_records_details
- Deletes inventory detail objects.
- fileupload
- Deletes file upload objects.
- forummsg
- Deletes message objects between a Site Administrator and customers.
- fulfillment_center
- Deletes fulfillment center objects.
- inventory_adjustments
- Deletes inventory objects.
- inventory_adjustment_codes
- Deletes inventory code objects.
- itemspecification
- Deletes specified item objects.
- message
- Deletes auction-related message objects.
- msgmemrel
- Deletes message member relationship objects.
- orders
- Deletes order objects.
- organization
- Deletes organization objects.
- pastats
- Deletes Product Advisor statistic objects.
- pcstats
- Deletes Product Comparison statistic objects.
- pestats
- Deletes Product Explorer statistic objects.
- policy
- Deletes policy objects.
- product_sets
- Deletes product set objects.
- rfq
- Deletes Request For Quote objects.
- rma
- Deletes returned item objects.
- rtnreasons
- Deletes return reason objects.
- sastats
- Delete Sales Assistant statistic objects.
- staglog
- Deletes staged objects.
- store
- Deletes store objects.
- user
- Deletes user objects.
- usrtraffic
- Deletes user traffic log objects. vendor to delete vendor objects.
- vendor
- Deletes vendor objects.
- type
- The type of object you want to delete.
- instancexml
- The absolute path to the instance_name.xml file. The Database Cleanup utility takes the value of the absolute file name in the form of WC_installdir/instances/instance_name/xml/instance_name.xml, for example, C:\WebSphere\WebSphereCommerce\instances\demo\xml\demo.xml.
- db
- (Optional) The name of the database.
The name of the database as found in the relational database directory.
Note: If you have configured the jdbcCustomizer parameter to use the toolboxJDBC driver, you must specify the host name of the machine where the database resides instead of the database name, for example, -db hostname.ibm.com.
Use host:port:sid. For example, myhost:1521:mydb.
- dbuser
- (Optional) The logon ID of the administrator who has created the schema or Site Administrator of the database. If this parameter is not specified, the ID of the user invoking the utility is used.
(Required) The user profile associated with the WebSphere Commerce instance. This is also the schema name.
- dbschema
- (Optional) The database schema name. This parameter allows a user to run the Database Cleanup utility with a user ID other than that specified for the dbuser parameter.
The DB2 schema name for a DB2 for z/OS (DB2/390) database.
- dbpasswd
- (Optional) The password of the logon ID that is specified by the dbuser or dbschema parameter. If not specified, the system prompts you to enter the password.
- dbtype
- (Optional) The database type.
This can be be either DB2 or Oracle. The default is DB2.
The default is DB2/iSeries.
The default is DB2.
The default is DB2/390.
- check_object_only
- (Optional) The Database Cleanup utility lists all child tables, which might be impacted by the database cleanup, and delete restricts if you specify yes. The utility does not perform a check if you leave the parameter to no (the default).
- commit
- (Optional) The number of rows to be deleted for each commit. The default is 1000.
- max
- (Optional) The maximum number of rows to be deleted for the entire run. The default is 100000.
- force
- (Optional) The force option can be set to yes or no. If the force value is yes, the loglevel value is DEBUG, and the check_object_only value is no, the utility deletes the child tables, followed by the parent table.
- log
- (Optional) The path and name of the log file in which the utility records its activities. The issuer of this utility must have write authority to the specified path and the path must already exist. If this parameter is not specified, a log file called DBClean.timestamp.log is created in the following directory:
WC_installdir/instances/instance_name/logs/DBClean
WC_userdir/instancess
- loglevel
- (Optional) The level of logging to be performed during the database cleanup. Available log level are NONE, ERROR, WARNING, NORMAL, INFO/VERBOSE, or DEBUG. The default is DEBUG.
- script
- (Optional) Specifies the path and name of the output script to be saved. By default, it is saved as:
WC_installdir/logs/assetclean_userName_timestamp_.sh
WC_userdir/instances/assetclean_userName_timestamp_.sh
WC_installdir\logs\assetclean_userName_timestamp_.cmd
- days
- (Optional) The minimum days in existence for a record to be deleted.
- name
- (Optional) The ID of the object to be deleted. This parameter is required if member was indicated as the value for the organization parameter and organization was indicated as the type value.
- jdbcDriver
- (Optional) The JDBC driver to be used. The default value depends on the database type. For example, if you are using DB2, the JDBC driver may be COM.ibm.db2.jdbc.app.DB2Driver.
- jdbcUrlPrefix
- (Optional) The URL prefix for the JDBC driver specified. The default value depends on the database type. For example, if you are using DB2, the JDBC URL prefix may be jdbc:db2:.
- jdbcCustomizer
- Specifies the location of the customizer parameter for use with the Database Cleanup utility.
The default values are:
jdbcDriver=com.ibm.db2.jdbc.app.DB2Driver jdbcUrlPrefix=jdbc:db2://
jdbcDriver=COM.ibm.db2.jdbc.app.DB2Driver jdbcUrlPrefix=jdbc:db2
To configure the Database Cleanup utility to use the toolbox JDBC driver specify DB2/iSeries as the dbtype, and ensure that the customizer file contains the following line:
jdbcDriver=com.ibm.as400.access.AS400JDBCDriver jdbcUrlPrefix=jdbc:as400://.
Note that other combinations may work but have not been tested.