The Database Cleanup utility refers to the CLEANCONF table
to determine which tables and which rows to delete when a particular
object and object type are specified.
To get
an accurate listing of all statements, see the cleanconf rows
in the wcs.staging.xml file:
- WC_installdir/schema/database_type/wcs.staging.xml (In server environment)
- WCDE_installdir/schema/database_type/wcs.staging.xml (In toolkit)
Cleaning up unnecessary data in a WebSphere Commerce site can improve performance, decrease the amount of storage needed to host the WebSphere Commerce site, and decrease the amount of time required to do future upgrades and migrations. A number of different tables can be cleaned up, and this cleanup can be done on an individual basis, depending on the needs of the site. If rows need to be deleted from a WebSphere Commerce database.
WCS have OOTB utility to clean data called dbclean utility script. To use this:
Run the utility as follows: WC_installdir/bin/dbclean.sh <parameters>
Parameter values
object : The name of the object to be deleted. For more information about the object names, see Database Cleanup utility objects.
type : The type of object you want to delete. For more information about the type to specify with an object, see Database Cleanup utility objects.
instancexml :The absolute path to the WebSphere Commerce configuration file.
e.g : To clean user object :
dbclean -object user -type registered -instancexml C:\WebSphere\WebSphereCommerce\instances\demo\xml\demo.xml -db CD040302 -check_object_only yes
CD040302 - DB Name
Adding a configuration to the Database Cleanup utility
We can add new objects to the database table to define which tables and rows to clean, by updating the Database Cleanup utility configuration data in the CLEANCONF table. To extend the Database Cleanup utility, specify values for the jdbcDriver and jdbcUrlPrefix parameters when running the utility.
It's nice to read article about cxml, it will definitely help me in future.
ReplyDeleteCommerce XML?