Thursday, December 16, 2010

BPEL 10g purge Script

Bpel 10g purge script has been documented very well in the Oracle white paper

and this is the main concept in bpel 10g purge script

The purge only remove the rows from the extents and but does not coalesce the space.
To shrink the space:
1. Enable row movement for the table.
SQL> ALTER TABLE xml_document ENABLE ROW MOVEMENT;
Options:
2.1 Shrink table but don't want to shrink HWM (High Water Mark).
SQL> ALTER TABLE xml_document SHRINK SPACE COMPACT;
2.2 Shrink table and HWM too.
SQL> ALTER TABLE xml_document SHRINK SPACE;
2.3. Shrink table and all dependent index too.
SQL> ALTER TABLE xml_document SHRINK SPACE CASCADE;
3. Disable row movement for the table.
ALTER TABLE xml_document DISABLE ROW MOVEMENT;


Upgrade to the latest version to get the new purge script


If you will have a look in the purge script of ESB you will find that there are no script to delete the data from ESB_MONITOR topic and other topics this is because there are internal triggers implemented in code level which deletes the data from these tables also.

No comments: