delete_instances Procedure Looped Purge Script

Managing Database Growth 9-9 a. For looped purge: DECLARE MAX_CREATION_DATE timestamp; MIN_CREATION_DATE timestamp; batch_size integer; max_runtime integer; retention_period timestamp; BEGIN MIN_CREATION_DATE := to_timestamp2010-01-01,YYYY-MM-DD; MAX_CREATION_DATE := to_timestamp2010-01-31,YYYY-MM-DD; max_runtime := 60; retention_period := to_timestamp2010-01-31,YYYY-MM-DD; batch_size := 10000; soa.delete_instances min_creation_date = MIN_CREATION_DATE, max_creation_date = MAX_CREATION_DATE, batch_size = batch_size, max_runtime = max_runtime, retention_period = retention_period, purge_partitioned_component = false; END; b. For parallel purge: DECLARE max_creation_date timestamp; min_creation_date timestamp; retention_period timestamp; BEGIN min_creation_date := to_timestamp2010-01-01,YYYY-MM-DD; max_creation_date := to_timestamp2010-01-31,YYYY-MM-DD; retention_period := to_timestamp2010-01-31,YYYY-MM-DD; soa.delete_instances_in_parallel min_creation_date = min_creation_date, max_creation_date = max_creation_date, batch_size = 10000, max_runtime = 60, retention_period = retention_period, DOP = 3, max_count = 1000000, purge_partitioned_component = false; END;

9.4 Partitioning Component Tables

The runtime and schema code for the following components has been modified to store the flow creation date column with their transactional tables. ■ Oracle BPEL Process Manager ■ Oracle Mediator 9-10 Oracle Fusion Middleware Administrators Guide for Oracle SOA Suite and Oracle BPM Suite ■ Human workflow ■ Oracle B2B ■ SOA Infrastructure includes component instances ■ Oracle BPM Suite The CPST_CREATED_DATE column contains the flow creation date time populated by the instance tracking code. This is available as the normalized message property oracle.integration.platform.instance.CommonConstants.COMPOSITE_ INSTANCE_CREATED_TIME. All SOA components are partitioned on the same partition key. These partitioned components use the same time range and partition ID.

9.4.1 Configuring Partitions

Partitioning is not configured by default; it is a postinstallation step that must be performed manually. Once you decide to implement partitioning of the database, you must perform some initial configuration tasks only once: ■ Using the information in this chapter, decide which groups you want to partition. ■ For each of those groups, decide which tables you want to partition, remembering that there are some mandatory tables in each group that must be partitioned. ■ For each group, decide on the partition interval. ■ Create the partition scripts to partition the Oracle SOA Suite schemas. No scripts are supplied; each DBA is responsible for creating the partition scripts appropriate for their environment. ■ Edit the purge script and remove references to any tables that you partitioned.

9.4.2 Introduction to the Verification Scripts

A verification script is provided for a DBA to determine when to drop a partition and its equipartitioned dependent table.

9.4.3 Component Tables

This section lists the component tables, the groups to which they belong, and their partition key. Note the following table partitioning constraints: ■ You have the choice of partitioning only at the granularity of the components. All the tables from each component must be partitioned or none of them should be partitioned. For example, you can partition the Oracle BPEL Process Manager tables and leave the other components unpartitioned. In such a case, however, all the tables related to the BPEL component must be partitioned. ■ Regardless of the group and component, all tables that are partitioned use the same time range and the partition ID. Table 9–3 through Table 9–8 are divided into three groups. Note: The verification script does not drop any partitions; it just ensures that partitions are eligible to be dropped.