Oracle SOA Suite 12c - Purge

Posted by Dirk Nachbar on Wednesday, March 21, 2018
Many people struggle with the configuration and execution of the SOA Purge functionality under Oracle SOA Suite 12c.

Oracle provided with SOA Suite 12c a nice web interface for enabling, and scheduling the AutoPurge functionality within the Enterprise Manager Fusion Middleware Control 12c.

But in case you just enable, schedule and define your retention time for the AutoPurge within this web interface nothing will be happen :-( You have to modify in addition some MBeans in order to enable and execute your AutoPurge Schedules correctly.

Simply login to your Enterprise Manager Fusion Middleware Control 12c (usually http://servername:/em), open the Target Navigation, navigate to "SOA/soa-infra" (in case you got a clustered environment, simply pick one of the available soa-infra, changes will be valid for all cluster members):


Under your soa-infra open the menu "SOA Infrastructure / SOA Administration / Auto Purge"


In the Auto Purge option you will have to define multiple sections.

  • Pick your "Auto Purge Job":
    • SOA Flow Purge Job 1
    • SOA Flow Purge Job 2
    • SOA In-Memory Flow Purge Job
    • Integration Workload Statistics Purge Job
    • Health Check Purge Job
  • Activate the "Enable" button
  • Define your "Job Schedule"
  • Set your "Retain Data"
  • Hit the Apply Button
  • Finally click the Link "More Auto Purge Configuration Properties...": this will bring you to the System MBean Browser to set the necessary options, so that your Auto Purge Job will really do something :-)


In the System MBean Browser you will be pointed directly to the Application Defined MBeans: AutoPurgeJobConfig:purge.
There you will find the Attribute "PurgeJobDetails", simply click it


Under the Attribute PurgeJobDetails you will see under the Key following Structure:

  • PurgeJobDetails
    • DELETE_INSTANCES_AUTO_JOB1
    • DELETE_INSTANCES_AUTO_JOB2
    • DELETE_INMEMORY_JOB1
    • DELETE_AWR_JOB1
    • DELETE_HC_JOB1
Open the DELETE_INSTANCES_AUTO_JOB1


Below the DELETE_INSTANCES_AUTO_JOB1 you will need to align the Key / Element pairs:

  • maxCreationPeriodDays, default value is -1, which means it's DISABLED !!!
  • minCreationPeriodDays, default value is -1, which means it's DISABLED !!!
  • purgePartitionedComponent, default is false, which means you don't have Partitions in your Metadata Repository tables


In my case, I have defined a retentionPeriod of 7 (under the Auto Purge Option, it's called Retain Data), so I have to set my maxCreationPeriodDays to retentionPeriod + 1 = 8 and my minCreationPeriodDays I define with 250. In case your SOA Metadata Repository was created with the profile LARGE in the Repository Creation Utility (rcu), you will have Partitions in several Metadata Repository tables, so you will need to align the value for purgePartitionedComponent from false to true.


Finally go up to the top of the current page and hit the button "Apply" to save your changes.


Now your Auto Purge Job will really purge data in your SOA Metadata Repository. Either wait to the next scheduled execution or execute the Auto Purge Job manually.


In order to check the executions of your Auto Purge Jobs, you can easily query the table SOA_PURGE_HISTORY under your SOAINFRA schema. Under the columns START_TIME and END_TIME you will see the start and end time of the Purge Job, under the column T you can see if your Job execution was single or parallel loop, under the column THREAD you will find the number of parallel threads and under the column S you will find the status of your Job execution, C = Completed, R = Running

 select * from SOA_PURGE_HISTORY order by 1;
    JOB_NO START_TIME                     END_TIME                       T     THREAD S
---------- ------------------------------ ------------------------------ - ---------- -
       442 14-MAR-18 12.00.03.227904 AM   14-MAR-18 12.00.03.677408 AM   S          0 C
       462 15-MAR-18 12.00.00.795402 AM   15-MAR-18 12.00.01.217016 AM   S          0 C
       482 16-MAR-18 12.00.03.573783 AM   16-MAR-18 12.00.04.036468 AM   S          0 C
       483 17-MAR-18 12.00.02.378165 AM   17-MAR-18 12.00.02.863812 AM   S          0 C
       503 18-MAR-18 12.00.02.381384 AM   18-MAR-18 12.00.02.862942 AM   S          0 C
       523 19-MAR-18 12.00.01.608355 AM   19-MAR-18 12.00.02.016223 AM   S          0 C
       524 20-MAR-18 12.00.03.018806 AM   20-MAR-18 12.00.03.347581 AM   S          0 C
       543 21-MAR-18 12.00.02.885658 AM   21-MAR-18 12.00.03.341806 AM   S          0 C
       544 21-MAR-18 01.12.56.213402 PM   21-MAR-18 01.12.58.535938 PM   S          0 C

Enjoy your SOA Purging :-)


Categories: