SOA being middleware mostly does not requires much of data to be stored .We can follow standard oracle purge doc for this .Steps we did are below
select sum(bytes/1024/1024/1024) from dba_data_files where tablespace_name='DEV_SOAINFRA';
SUM(BYTES/1024/1024/1024)
-------------------------
325.999969
select sum(bytes/1024/1024/1024) from dba_data_files where tablespace_name='DEV_SOAINFRA';
SUM(BYTES/1024/1024/1024)
-------------------------
325.999969
connect as DEV_SOAINFRA
Create packages
@/home/oraqa/soa_purge/soa_purge_scripts.sql
========================
@soa_purge_scripts.sql
Procedure created.
Function created.
Type created.
Type body created.
PL/SQL procedure successfully completed.
Package created.
Package body created.
===================
Run Purge.sql ---Modify Dates accordingly
$ cat purge.sql
DECLARE
MAX_CREATION_DATE timestamp;
MIN_CREATION_DATE timestamp;
batch_size integer;
max_runtime integer;
BEGIN
MIN_CREATION_DATE := to_timestamp('2014-01-01','YYYY-MM-DD');
MAX_CREATION_DATE := to_timestamp('2014-12-31','YYYY-MM-DD');
max_runtime := 920;
batch_size := 5000;
soa.delete_instances(
min_creation_date => MIN_CREATION_DATE,
max_creation_date => MAX_CREATION_DATE,
batch_size => batch_size,
max_runtime => max_runtime,
purge_partitioned_component => false,
ignore_state => true);
END;
ALTER TABLE XML_DOCUMENT MODIFY lob (DOCUMENT) (shrink space);
No comments:
Post a Comment