Search This Blog

Monday, June 04, 2018

How to recreate the purge scripts in SOA using instantclient sql

How to recreate the purge scripts in SOA using instantclient sql
Purge scripts should be available in the directory ,
$ORACLE_HOME/soa/common/sql/soainfra/sql/oracle/122100/soa_purge12/soa_purge_scripts.sql

Download the folloiwng files

extract them

unzip -d . instantclient-basic-linux.x64-12.2.0.1.0.zip
unzip -d . instantclient-sqlplus-linux.x64-12.2.0.1.0.zip

cd /home/oracle/instantclient_12_2

export PATH=/home/oracle/instantclient_12_2:$PATH
export LD_LIBRARY_PATH=/home/oracle/instantclient_12_2

now test the connectivity , for example

sqlplus DEV_SOAINFRA/Welcome1@host-name:1521/orcl

after this

cd $ORACLE_HOME/soa/common/sql/soainfra/sql/oracle/122100/soa_purge12/soa_purge_scripts.sql
run the script

@soa_purge_scripts.sql


Then try with the following ,

begin
soa.DELETE_INSTANCES_IN_PARALLEL(
MIN_CREATION_DATE=> to_timestamp('2016-01-01','YYYY-MM-DD'),
MAX_CREATION_DATE=> to_timestamp('2016-01-01','YYYY-MM-DD'),
BATCH_SIZE=>1000,
MAX_RUNTIME=>20,
RETENTION_PERIOD=>to_timestamp('2016-01-01','YYYY-MM-DD'),
DOP=>4,
MAX_COUNT=>1000,
PURGE_PARTITIONED_COMPONENT=>false,
sql_trace=>false);
end;

and also

begin
soa.DELETE_INSTANCES(
MIN_CREATION_DATE=> to_timestamp('2016-01-01','YYYY-MM-DD'),
MAX_CREATION_DATE=> to_timestamp('2016-01-01','YYYY-MM-DD'),
BATCH_SIZE=>1000,
MAX_RUNTIME=>20,
RETENTION_PERIOD=>to_timestamp('2016-01-01','YYYY-MM-DD'),
PURGE_PARTITIONED_COMPONENT=>false,
sql_trace=>false);
end;

Check the Note 

Steps to compile SOA Purge 12.2.1.1 with an explanation (Doc ID 2171885.1)


Tags: Publish
June 04, 2018 at 04:22PM
Open in Evernote