Quantcast
Channel: ATeam Chronicles
Viewing all articles
Browse latest Browse all 228

Purging and partitioned schemas

$
0
0

SOA Suite 11g and 12c both require regular database maintenance for optimal performance. A key task in managing your SOA Suite database is a regular purging strategy. You should be doing this, so read the Oracle SOA Suite database growth management strategy if you haven’t already: http://www.oracle.com/technetwork/middleware/bpm/learnmore/soa11gstrategy-1508335.pdf

One of the best practices for managing large SOA Suite applications is to use Oracle Database partitioning. In 11g this is usually a fairly ad-hoc setup, though the whitepaper has everything you need to know about setting it up; in 12c, the “LARGE” RCU profile is partitioned (with monthly partitions).

Purging a partitioned schema usually involves running the check and move scripts, to ensure your partitions don’t contain “LIVE” data (based on your retention policy), followed by dropping the “OLD” partitions and rebuilding the indexes.

However, there are times where you may want to run a purge to clean up data that doesn’t neatly align with the partitions, for example in a load testing environment. The purge scripts, by default, won’t touch any table that is partitioned. If your favourite table isn’t mentioned in the purge debug log output (example below), then it is probably because it is partitioned.

To force the purge scripts to consider partitioned tables, you need to enable the “purge_partitioned_component” flag to the “delete instances” purge function (see below). The purge script will then purge partitioned tables.

Obviously, this is not intended for regular production use and it should never be used there.

An example invocation with the flag set:

soa.delete_instances(max_runtime => 300, min_creation_date => to_timestamp('2000-01-01','YYYY-MM-DD'), max_creation_date => to_timestamp('2000-12-31','YYYY-MM-DD'), purge_partitioned_component=TRUE);

The example output below is from a soa.delete_instances run that has a partition on composite_instance. Note that there is no mention of composite_instance in the output.

There are several tables which can be partitioned, as well as whole units (such as BPEL). The purge script will skip any that have a partition. (If you are interested, you can search the PLSQL packages in a SOAINFRA schema for ‘is_table_partitioned’ to see which tables are checked and which columns it considers for partitioning).

01-JAN-2000 12:00:00 : procedure delete_instances
01-JAN-2000 12:00:00 : time check
01-JAN-2000 12:00:00 : sysdate = 01/JAN/2000:12/00
01-JAN-2000 12:00:00 : stoptime = 01/JAN/2000:12/00
01-JAN-2000 12:00:00 : checking for partitions
01-JAN-2000 12:00:00 : done checking for partitions
01-JAN-2000 12:00:00 : composite_dn =
01-JAN-2000 12:00:00 : loop count = 1
01-JAN-2000 12:00:00 : deleting non-orphaned instances
01-JAN-2000 12:00:00 Number of rows in table ecid_purge Inserted = 1
01-JAN-2000 12:00:00 : calling soa_orabpel.deleteComponentInstances
01-JAN-2000 12:00:00 Number of rows in table temp_cube_instance Inserted = 1
01-JAN-2000 12:00:00 Number of rows in table temp_document_ci_ref Inserted = 1
01-JAN-2000 12:00:00 Number of rows in table temp_document_dlv_msg_ref Inserted = 1
01-JAN-2000 12:00:00 Number of rows in table HEADERS_PROPERTIES purged is : 1
01-JAN-2000 12:00:00 Number of rows in table AG_INSTANCE purged is : 0
01-JAN-2000 12:00:00 Number of rows in table TEST_DETAILS purged is : 0
01-JAN-2000 12:00:00 Number of rows in table CUBE_SCOPE purged is : 1
01-JAN-2000 12:00:00 Number of rows in table AUDIT_COUNTER purged is : 1
01-JAN-2000 12:00:00 Number of rows in table AUDIT_TRAIL purged is : 1
01-JAN-2000 12:00:00 Number of rows in table AUDIT_DETAILS purged is : 1
01-JAN-2000 12:00:00 Number of rows in table CI_INDEXES purged is : 0
01-JAN-2000 12:00:00 Number of rows in table WORK_ITEM purged is : 1
01-JAN-2000 12:00:00 Number of rows in table WI_FAULT purged is : 1
01-JAN-2000 12:00:00 Number of rows in table XML_DOCUMENT purged is : 1
01-JAN-2000 12:00:00 Number of rows in table DOCUMENT_DLV_MSG_REF purged is : 1
01-JAN-2000 12:00:00 Number of rows in table DOCUMENT_CI_REF purged is : 1
01-JAN-2000 12:00:00 Number of rows in table DLV_MESSAGE purged is : 1
01-JAN-2000 12:00:00 Number of rows in table DLV_SUBSCRIPTION purged is : 1
01-JAN-2000 12:00:00 Number of rows in table DLV_AGGREGATION purged is : 0
01-JAN-2000 12:00:00 Number of rows in table CUBE_INSTANCE purged is : 1
01-JAN-2000 12:00:00 Number of rows in table BPM_AUDIT_QUERY purged is : 0
01-JAN-2000 12:00:00 Number of rows in table BPM_MEASUREMENT_ACTIONS purged is : 0
01-JAN-2000 12:00:00 Number of rows in table BPM_MEASUREMENT_ACTION_EXCEPS purged is : 0
01-JAN-2000 12:00:00 Number of rows in table BPM_CUBE_AUDITINSTANCE purged is : 0
01-JAN-2000 12:00:00 Number of rows in table BPM_CUBE_TASKPERFORMANCE purged is : 0
01-JAN-2000 12:00:00 Number of rows in table BPM_CUBE_PROCESSPERFORMANCE purged is : 0
01-JAN-2000 12:00:00 : completed soa_orabpel.deleteComponentInstances
01-JAN-2000 12:00:00 : calling workflow.deleteComponentInstances
01-JAN-2000 12:00:00 : workflow.deleteComponentInstance begins
01-JAN-2000 12:00:00 : workflow.truncate_temp_tables
01-JAN-2000 12:00:00 Number of rows in table temp_wftask_purge workflow.deleteComponentInstance Inserted = 0
01-JAN-2000 12:00:00 : workflow.delete_workflow_instances begins
01-JAN-2000 12:00:00 : Purging WFTask_TL
01-JAN-2000 12:00:00 Number of rows in table WFTask_TL Purge WFTask_TL0
01-JAN-2000 12:00:00 : Purging WFTaskHistory
01-JAN-2000 12:00:00 Number of rows in table WFTaskHistory Purge WFTaskHistory0
01-JAN-2000 12:00:00 : Purging WFTaskHistory_TL
01-JAN-2000 12:00:00 Number of rows in table WFTaskHistory_TL Purge WFTaskHistory_TL0
01-JAN-2000 12:00:00 : Purging WFComments
01-JAN-2000 12:00:00 Number of rows in table WFComments Purge WFComments0
01-JAN-2000 12:00:00 : Purging WFMessageAttribute
01-JAN-2000 12:00:00 Number of rows in table WFMessageAttribute Purge WFMessageAttribute0
01-JAN-2000 12:00:00 : Purging WFAttachment
01-JAN-2000 12:00:00 Number of rows in table WFAttachment Purge WFAttachment0
01-JAN-2000 12:00:00 : Purging WFAssignee
01-JAN-2000 12:00:00 Number of rows in table WFAssignee Purge WFAssignee0
01-JAN-2000 12:00:00 : Purging WFReviewer
01-JAN-2000 12:00:00 Number of rows in table WFReviewer Purge WFReviewer0
01-JAN-2000 12:00:00 : Purging WFCollectionTarget
01-JAN-2000 12:00:00 Number of rows in table WFCollectionTarget Purge WFCollectionTarget0
01-JAN-2000 12:00:00 : Purging WFRoutingSlip
01-JAN-2000 12:00:00 Number of rows in table WFRoutingSlip Purge WFRoutingSlip0
01-JAN-2000 12:00:00 : Purging WFNotification
01-JAN-2000 12:00:00 Number of rows in table WFNotification Purge WFNotification0
01-JAN-2000 12:00:00 : Purging WFTaskTimer
01-JAN-2000 12:00:00 Number of rows in table WFTaskTimer Purge WFTaskTimer0
01-JAN-2000 12:00:00 : Purging WFTaskError
01-JAN-2000 12:00:00 Number of rows in table WFTaskError Purge WFTaskError0
01-JAN-2000 12:00:00 : Purging WFHeaderProps
01-JAN-2000 12:00:00 Number of rows in table WFHeaderProps Purge WFHeaderProps0
01-JAN-2000 12:00:00 : Purging WFEvidence
01-JAN-2000 12:00:00 Number of rows in table WFEvidence Purge WFEvidence0
01-JAN-2000 12:00:00 : Purging WFTaskAssignmentStatistic
01-JAN-2000 12:00:00 Number of rows in table WFTaskAssignmentStatistic Purge WFTaskAssignmentStatistic0
01-JAN-2000 12:00:00 : Purging WFTaskAggregation
01-JAN-2000 12:00:00 Number of rows in table WFTaskAggregation Purge WFTaskAggregation0
01-JAN-2000 12:00:00 : Purging WFTask
01-JAN-2000 12:00:00 Number of rows in table WFTask Purge WFTask0
01-JAN-2000 12:00:00 : workflow.delete_workflow_instances ends
01-JAN-2000 12:00:00 : workflow.deleteComponentInstance ends
01-JAN-2000 12:00:00 : completed workflow.deleteComponentInstances
01-JAN-2000 12:00:00 : calling mediator.deleteComponentInstances
01-JAN-2000 12:00:00 Number of rows in table temp_mediator_instance Inserted = 0
01-JAN-2000 12:00:00 Number of rows in table mediator_payload purged is : 0
01-JAN-2000 12:00:00 Number of rows in table mediator_deferred_message purged is : 0
01-JAN-2000 12:00:00 Number of rows in table mediator_document purged is : 0
01-JAN-2000 12:00:00 Number of rows in table mediator_case_detail purged is : 0
01-JAN-2000 12:00:00 Number of rows in table mediator_case_instance purged is : 0
01-JAN-2000 12:00:00 Number of rows in table mediator_instance purged is : 0
01-JAN-2000 12:00:00 : completed mediator.deleteComponentInstances
01-JAN-2000 12:00:00 : calling decision.deleteComponentInstances
01-JAN-2000 12:00:00 Number of rows in table temp_brdecision_instance Inserted = 0
01-JAN-2000 12:00:00 Number of rows in table BRDecisionFault purged is : 0
01-JAN-2000 12:00:00 Number of rows in table BRDecisionUnitOfWork purged is : 0
01-JAN-2000 12:00:00 Number of rows in table BRDecisonInstance purged is : 0
01-JAN-2000 12:00:00 : completed decision.deleteComponentInstances
01-JAN-2000 12:00:00 : calling fabric.deleteComponentInstances
01-JAN-2000 12:00:00 Number of rows in table reference_instance_purge inserted = 1
01-JAN-2000 12:00:00 Number of rows in table xml_document purged is : 1
01-JAN-2000 12:00:00 Number of rows in table instance_payload purged is : 1
01-JAN-2000 12:00:00 Number of rows in table reference_instance purged is : 1
01-JAN-2000 12:00:00 Number of rows in table xml_document purged is : 0
01-JAN-2000 12:00:00 Number of rows in table rejected_msg_native_payload purged is : 0
01-JAN-2000 12:00:00 Number of rows in table instance_payload purged is : 0
01-JAN-2000 12:00:00 Number of rows in table composite_instance_fault purged is : 1
01-JAN-2000 12:00:00 Number of rows in table xml_document purged is : 1
01-JAN-2000 12:00:00 Number of rows in table instance_payload purged is : 1
01-JAN-2000 12:00:00 Number of rows in table composite_sensor_value purged is : 0
01-JAN-2000 12:00:00 Number of rows in table composite_instance_assoc purged is : 1
01-JAN-2000 12:00:00 Number of rows in table component_instance_purge inserted = 0
01-JAN-2000 12:00:00 Number of rows in table xml_document purged is : 0
01-JAN-2000 12:00:00 Number of rows in table instance_payload purged is : 0
01-JAN-2000 12:00:00 Number of rows in table component_instance purged is : 0
01-JAN-2000 12:00:00 Number of rows in table attachment purged is : 0
01-JAN-2000 12:00:00 Number of rows in table attachment_ref purged is : 0
01-JAN-2000 12:00:00 : completed fabric.deleteComponentInstances
01-JAN-2000 12:00:00 : time check
01-JAN-2000 12:00:00 : sysdate = 01/JAN/2000:12/00
01-JAN-2000 12:00:00 : stoptime = 01/JAN/2000:12/00
01-JAN-2000 12:00:00 : loop count = 2
01-JAN-2000 12:00:00 : deleting orphaned instances
01-JAN-2000 12:00:00 : calling soa_orabpel.deleteNoCompositeIdInstances
01-JAN-2000 12:00:00 Number of rows in table temp_document_dlv_msg_ref Inserted no cikey 1
01-JAN-2000 12:00:00 Number of rows in table temp_cube_instance Inserted = 0
01-JAN-2000 12:00:00 Number of rows in table temp_document_ci_ref Inserted = 0
01-JAN-2000 12:00:00 Number of rows in table temp_document_dlv_msg_ref Inserted = 0
01-JAN-2000 12:00:00 Number of rows in table HEADERS_PROPERTIES purged is : 1
01-JAN-2000 12:00:00 Number of rows in table AG_INSTANCE purged is : 0
01-JAN-2000 12:00:00 Number of rows in table TEST_DETAILS purged is : 0
01-JAN-2000 12:00:00 Number of rows in table CUBE_SCOPE purged is : 0
01-JAN-2000 12:00:00 Number of rows in table AUDIT_COUNTER purged is : 0
01-JAN-2000 12:00:00 Number of rows in table AUDIT_TRAIL purged is : 0
01-JAN-2000 12:00:00 Number of rows in table AUDIT_DETAILS purged is : 0
01-JAN-2000 12:00:00 Number of rows in table CI_INDEXES purged is : 0
01-JAN-2000 12:00:00 Number of rows in table WORK_ITEM purged is : 0
01-JAN-2000 12:00:00 Number of rows in table WI_FAULT purged is : 0
01-JAN-2000 12:00:00 Number of rows in table XML_DOCUMENT purged is : 1
01-JAN-2000 12:00:00 Number of rows in table DOCUMENT_DLV_MSG_REF purged is : 1
01-JAN-2000 12:00:00 Number of rows in table DOCUMENT_CI_REF purged is : 0
01-JAN-2000 12:00:00 Number of rows in table DLV_MESSAGE purged is : 1
01-JAN-2000 12:00:00 Number of rows in table DLV_SUBSCRIPTION purged is : 0
01-JAN-2000 12:00:00 Number of rows in table DLV_AGGREGATION purged is : 0
01-JAN-2000 12:00:00 Number of rows in table CUBE_INSTANCE purged is : 0
01-JAN-2000 12:00:00 Number of rows in table BPM_AUDIT_QUERY purged is : 0
01-JAN-2000 12:00:00 Number of rows in table BPM_MEASUREMENT_ACTIONS purged is : 0
01-JAN-2000 12:00:00 Number of rows in table BPM_MEASUREMENT_ACTION_EXCEPS purged is : 0
01-JAN-2000 12:00:00 Number of rows in table BPM_CUBE_AUDITINSTANCE purged is : 0
01-JAN-2000 12:00:00 Number of rows in table BPM_CUBE_TASKPERFORMANCE purged is : 0
01-JAN-2000 12:00:00 Number of rows in table BPM_CUBE_PROCESSPERFORMANCE purged is : 0
01-JAN-2000 12:00:00 : completed soa_orabpel.deleteNoCompositeIdInstances
01-JAN-2000 12:00:00 : calling workflow.deleteNoCompositeIdInstances
01-JAN-2000 12:00:00 : workflow.deleteNoCompositeIdInstances begins
01-JAN-2000 12:00:00 : workflow.truncate_temp_tables
01-JAN-2000 12:00:00 : workflow.deleteNoCompositeIdInstances populates temp_wftaks_purge using createdDate between
min_date=01-JAN-00 12.00.00.000000 AMand max_date=31-JAN-00 12.00.00.000000 AM
01-JAN-2000 12:00:00 : workflow.deleteNoCompositeIdInstances done. No WFTask instances were found
01-JAN-2000 12:00:00 : completed workflow.deleteNoCompositeIdInstances
01-JAN-2000 12:00:00 : calling mediator.deleteNoCompositeIdInstances
01-JAN-2000 12:00:00 Number of rows in table temp_mediator_instance Inserted = 0
01-JAN-2000 12:00:00 : No Mediator instances found with composite instance id as null or zero
01-JAN-2000 12:00:00 Number of rows in table temp_mediator_instance Inserted = 0
01-JAN-2000 12:00:00 : No Mediator instances found from mediator_resequencer_message
01-JAN-2000 12:00:00 Number of rows in table temp_mediator_instance Inserted = 0
01-JAN-2000 12:00:00 : No Mediator instances found in mediator_deferred_message
01-JAN-2000 12:00:00 : completed mediator.deleteNoCompositeIdInstances
01-JAN-2000 12:00:00 : calling decision.deleteNoCompositeIdInstances
01-JAN-2000 12:00:00 Number of rows in table temp_brdecision_instance Inserted = 0
01-JAN-2000 12:00:00 : No Decision instances found with null composite instance ids
01-JAN-2000 12:00:00 : completed decision.deleteNoCompositeIdInstances
01-JAN-2000 12:00:00 : calling fabric.deleteNoCompositeIdInstances
01-JAN-2000 12:00:00 Number of rows in table reference_instance_purge inserted = 0
01-JAN-2000 12:00:00 Number of rows in table xml_document purged is : 0
01-JAN-2000 12:00:00 Number of rows in table instance_payload purged is : 0
01-JAN-2000 12:00:00 Number of rows in table reference_instance purged is : 0
01-JAN-2000 12:00:00 Number of rows in table composite_fault_purge inserted = 0
01-JAN-2000 12:00:00 Number of rows in table xml_document purged is : 0
01-JAN-2000 12:00:00 Number of rows in table rejected_msg_native_payload purged is : 0
01-JAN-2000 12:00:00 Number of rows in table instance_payload purged is : 0
01-JAN-2000 12:00:00 Number of rows in table composite_instance_fault purged is : 0
01-JAN-2000 12:00:00 Number of rows in table component_instance purged is : 0
01-JAN-2000 12:00:00 : completed fabric.deleteNoCompositeIdInstances


Viewing all articles
Browse latest Browse all 228

Trending Articles