In Oracle SOA Suite, if your application creates number of instances and if your application has large number of payloads the database will grow faster and it uses all of the available disk space in your machine. If your application continues it consumes all your disk space and your SOA application will stop functioning and degrades the performance of your application.
There is a simple way to avoid this type of problem, the available option is purging the database. Purge script deletes the instances which are completed successfully, faulted, terminated, stale and unknown states. The following steps shows how to purge the instances using sql scripts.
step 1: open command prompt
step 2: change directory to <middleware_hom>\soa\rcu\integration\soainfra\sql\soa_purge
ex: cd C:\oracle117\Middleware\soa\rcu\integration\soainfra\sql\soa_purge
step 3: sqlplus / as sysdba
step 4: GRANT EXECUTE ON DBMS_LOCK TO <RCU PREFIX>_SOAINFRA;
ex: GRANT EXECUTE ON DBMS_LOCK TO DEV_SOAINFRA;
step 5: GRANT CREATE JOB TO <RCU PREFIX>_SOAINFRA;
ex: GRANT CREATE JOB TO DEV_SOAINFRA;
There is a simple way to avoid this type of problem, the available option is purging the database. Purge script deletes the instances which are completed successfully, faulted, terminated, stale and unknown states. The following steps shows how to purge the instances using sql scripts.
step 1: open command prompt
step 2: change directory to <middleware_hom>\soa\rcu\integration\soainfra\sql\soa_purge
ex: cd C:\oracle117\Middleware\soa\rcu\integration\soainfra\sql\soa_purge
step 3: sqlplus / as sysdba
step 4: GRANT EXECUTE ON DBMS_LOCK TO <RCU PREFIX>_SOAINFRA;
ex: GRANT EXECUTE ON DBMS_LOCK TO DEV_SOAINFRA;
step 5: GRANT CREATE JOB TO <RCU PREFIX>_SOAINFRA;
ex: GRANT CREATE JOB TO DEV_SOAINFRA;
step 6: exit
step 7: sqlplus DEV_SOAINFRA/<password>
step 8: @soa_purge_scripts.sql
step 9: To see the list of available instance execute execute the following command
select state, id, composite_dn from composite_instance;
step 10: execute the following sql command to purge the instance from the time interval 01-01-2014 to 31-03-2014
execute soa.delete_instances ( to_timestamp('2014-01-01','YYYY-MM-DD'),to_timestamp('2014-03-31','YYYY-MM-DD'),20000,60,to_timestamp('2014-03-31','YYYY-MM-DD'),false);
step 11: re execute the following command.
select state, id, composite_dn from composite_instance;