There are fine resources on how to purge SOA Suite instances. However there are case where you want to delete the instances for a specific composite deployed in the SOA Suite. An example could be after an extensive test or test load on a specific service implemented in a SCA composite.
Here is the PL/SQL we used to purge instances of the productservice
composite in the test
partition. It is based on the default packages that are bundled with the SOA Suite to purge instance data:
DECLARE
l_min_creation_date TIMESTAMP := to_timestamp('2010-01-01','yyyy-mm-dd');
l_max_creation_date TIMESTAMP := to_timestamp('2012-09-10 1600','yyyy-mm-dd hh24mi');
l_batch_size INTEGER := 100;
l_max_runtime INTEGER := 60;
l_soa_partition_name varchar2(100) := 'test';
l_composite_name varchar2(100) := 'productservice';
BEGIN
-- delete instances for specific composite
soa.delete_instances( min_creation_date => l_min_creation_date
, max_creation_date => l_max_creation_date
, batch_size => l_batch_size
, max_runtime => l_max_runtime
--, retention_period =>
, purge_partitioned_component => FALSE
, composite_name => l_composite_name
--, composite_revision =>
, soa_partition_name => l_soa_partition_name
);
commit;
END; |
declare
l_min_creation_date timestamp := to_timestamp('2010-01-01','yyyy-mm-dd');
l_max_creation_date timestamp := to_timestamp('2012-09-10 1600','yyyy-mm-dd hh24mi');
l_batch_size integer := 100;
l_max_runtime integer := 60;
l_soa_partition_name varchar2(100) := 'test';
l_composite_name varchar2(100) := 'productservice';
begin
-- delete instances for specific composite
soa.delete_instances( min_creation_date => l_min_creation_date
, max_creation_date => l_max_creation_date
, batch_size => l_batch_size
, max_runtime => l_max_runtime
--, retention_period =>
, purge_partitioned_component => false
, composite_name => l_composite_name
--, composite_revision =>
, soa_partition_name => l_soa_partition_name
);
commit;
end;
You can use the instances tab to track the progress of the delete script:
