We have 4 different partitions in our organization. We would like to target one partition at a time with various retention period. The following pl/sql block works for one partition but not on other partitions. Please advise.
PL/SQL block:
DECLARE
max_creation_date timestamp;
min_creation_date timestamp;
batch_size integer;
max_runtime integer;
DOP integer;
max_count integer;
purge_partitioned_component boolean;
SOA_PARTITION_NAME VARCHAR2(200);
BEGIN
min_creation_date := to_timestamp('2015-01-01','YYYY-MM-DD');
max_creation_date := sysdate - 0;
max_runtime := 60;
batch_size := 10000;
DOP := 3;
max_count := 1000000;
SOA_PARTITION_NAME := 'default'; --define multiple partitions
DEV_SOAINFRA.soa.delete_instances_in_parallel (
min_creation_date => min_creation_date,
max_creation_date => max_creation_date,
batch_size => batch_size,
max_runtime => max_runtime,
DOP => DOP,
max_count => max_count,
SOA_PARTITION_NAME => SOA_PARTITION_NAME
);
END;
Thanks.
As you can see from the block itself it has a "partition" option. "SOA_PARTITION_NAME := 'default'; "
use below script and while invoking please specify the SOA_PARTITION_NAME
DECLARE
max_creation_date timestamp;
min_creation_date timestamp;
batch_size integer;
max_runtime integer;
DOP integer;
max_count integer;
purge_partitioned_component boolean;
SOA_PARTITION_NAME VARCHAR2(200);
BEGIN
min_creation_date := to_timestamp('2015-01-01','YYYY-MM-DD');
max_creation_date := sysdate - 0;
max_runtime := 60;
batch_size := 10000;
DOP := 3;
max_count := 1000000;
SOA_PARTITION_NAME := SOA_PARTITION_NAME; --define multiple partitions
DEV_SOAINFRA.soa.delete_instances_in_parallel (
min_creation_date => min_creation_date,
max_creation_date => max_creation_date,
batch_size => batch_size,
max_runtime => max_runtime,
DOP => DOP,
max_count => max_count,
SOA_PARTITION_NAME => SOA_PARTITION_NAME
);
END;
You can make this a variable and call this package directly or from OSB or SOA in a schedule.
Hope it helped.