Purging instances

I am using SOA 11g.
All of the examples I see using the purge scripts require entering a composite name. Can you run them without the composite name to clear instances for all composites?

That doesn't seem to work. I am using % for the wildcard. I am trying to delete a bunch of stale instances. This is not deleting any instances.
DECLARE
FILTER INSTANCE_FILTER := INSTANCE_FILTER();
MAX_INSTANCES NUMBER;
DELETED_INSTANCES NUMBER;
BEGIN
FILTER.COMPOSITE_NAME := '%';
FILTER.COMPOSITE_REVISION := '1.0';
FILTER.STATE := fabric.STATE_STALE; --change for different states
FILTER.MIN_CREATED_DATE := to_timestamp('2011-01-01','YYYY-MM-DD');
FILTER.MAX_CREATED_DATE := sysdate;
MAX_INSTANCES := 500;
DELETED_INSTANCES := FABRIC.delete_all(
FILTER => FILTER,
MAX_INSTANCES => MAX_INSTANCES
END;
Edited by: user3161913 on Jan 7, 2011 7:13 AM

Similar Messages

  • BPEL server not able to handle load -- need to purge instances

    Hello All,
    I have deployed one BPEL process on 10.1.3.1 server. This process creates new instance every 1 minute. If this is not retired and kept running continuously it creates many instances (e.g. 3k - 11k) & at one stage not able to create & initiate new instance. Then currently we are purging all instances and then its working fine.
    How much load BPEL server can handle? And also would like to know how to increase this capacity. As in the production env we 'll face issue due to this.
    Kindly suggest.
    I need help.
    Thanks in advance
    Regards

    How much load BPEL server can handle? And also would like to know how to increase this capacity. As in the production env we 'll face issue due to this.
    It all depends on how many CPU you have on the SOA Suite server and how much memory you have allocated and the number of threads that are configured. You should plan perfomance tests and scale up / down your environment.
    http://orasoa.blogspot.com/2007/01/tuning-bpel-in-nutshell.html

  • Error message in BPEL console when purging instances

    Hi
    I get an error message in the BPEL console when I Purge All Instances. The problem arised when i patched SOA suite to version 10.1.3.3. (On 10.1.3.1 i beleive this worked.)
    ======================================
    Exception
    Operation failed because:
    Cannot delete instances.
    The process domain was unable to purge the instances from the datastore. The exception reported is: [POL-5130] table or view SYSTEM.WI_FAULT not found
    Please check that the machine hosting the datasource is physically connected to the network. Otherwise, check that the datasource connection parameters (user/password) is currently valid.
    sql statement: DELETE FROM wi_fault WHERE domain_ref = ?
    ======================================
    I also get a similar error message when i use the search activity function in the BPEL console, and when I use the java-api:s to search among activities.
    Does anyone know anything about this error?
    Thankyou
    //Kalle

    I got the same error, but long after I upgraded to 10.1.3.3.
    As this was on Windows with Oracle Lite, I did like below to fix the issue. Unfortunately I seem to have more issues with the BPEL database so I'm going to try to find a way to reinitialize it from scratch.
    C:\product\10.1.3.1\OracleAS_1\Mobile\Sdk\BIN>msql system/manager@jdbc:[email protected]:1531:orabpel
    SQL> @C:\product\10.1.3.1\OracleAS_1\bpel\system\database\scripts\upgrade_10131_10133_olite.sql
    [POL-5130] table or view SYSTEM.WI_FAULT not found
    Table created
    Index created
    Index created
    Object created
    Object created
    [POL-5130] table or view SYSTEM.WFPRODUCTIVITY_VIEW not found
    [POL-5130] table or view SYSTEM.WFTASKPRIORITY_VIEW not found
    [POL-5130] table or view SYSTEM.WFUNATTENDEDTASKS_VIEW not found
    [POL-5130] table or view SYSTEM.WFTASKCYCLETIME_VIEW not found
    View created
    View created
    View created
    View created
    Commit complete

  • Purging instances in Oracle ESB 10.1.3.5

    Hi ,
    I want to purge old instances from production server as the instances are appearing late due to huge records.
    There are 2 ways to do this i.e through ESB console and other is through the Purge_by_date script.
    Please suggest which approch is better one and do we need to restart the SOA server after purging ?
    Thanks,
    Lalit

    Hi ,
    I want to purge old instances from production server as the instances are appearing late due to huge records.
    There are 2 ways to do this i.e through ESB console and other is through the Purge_by_date script.
    Please suggest which approch is better one and do we need to restart the SOA server after purging ?
    Thanks,
    Lalit

  • Scheduling of SOA purge instances (11.1.1.7) generating logs

    What is best practice for scheduling the purging of SOA instances using the Oracle Soa purge strategy?
    Followed the instructions successfully http://docs.oracle.com/cd/E29542_01/admin.1111/e10226/soaadmin_partition.htm#SOAAG97268
    My requirements:
    For each purge run a unique log must be generated on the filesystem.
    The purging must be done frequently according to a schedule (i.e. daily 8pm).
    My issue:
    when I run the looped purge (soa.delete_instances), logs are not being generated as expected within the SOA_PURGE_DIR.
    logs are only generated in SOA_PURGE_DIR when I execute the parallel purge (soa.delete_instances_in_parallel). I need to run looped purge and not parallel purge.
    Current scenario (workaround to generate logs (seems a bit overkill)):
    DBMS_Scheduler job invoking a shell script
    Shell script invokes a custom sql script spooling the output to a log file
    Custom sql script invokes the Oracle soa.delete_instances procedure setting all the parameters
    soa.delete_instances runs.
    Preferred scenario (not working):DBMS_Scheduler job (PL/SQL block) -> Oracle SOA Purge procedure
    DBMS_Scheduler:
    BEGIN
    dbms_scheduler.create_job('SOA_PURGE',
        job_type             =>'EXECUTABLE',
        job_action           =>'/stage/scripts/sh/soa_purge.sh',
        number_of_arguments  =>0,
        start_date           =>TO_TIMESTAMP_TZ('27-NOV-2014 08.00.00.000000000 PM +01:00','DD-MON-RRRR HH.MI.SSXFF AM TZR','NLS_DATE_LANGUAGE=english'),
        repeat_interval      =>'FREQ=DAILY',
        end_date             =>NULL,
        job_class            =>'DEFAULT_JOB_CLASS',
        enabled              =>TRUE,
        auto_drop            =>FALSE,
        comments             =>'Job to purge the data from dehydration gateway database.'
    COMMIT;
    END;
    Shell script:
    SPOOL_FILE1=/stage/logs/soa_purge_$(date +%Y_%M_%DT%H_%M_%S).log
    sqlplus "user/password" <<EOF
    alter session set nls_date_format = 'dd/mm/yyyy hh24:mi:ss';
    SET linesize 100
    SET pagesize 300
    SET time on
    SET timing on
    spool ${SPOOL_FILE1}
    @@/stage/scripts/sql/debug_on.sql
    @@/stage/scripts/sql/soa_purge_test.sql
    @@/stage/scripts/sql/debug_off.sql
    spool off;
    set time off;
    exit;
    EOF
    Custom script (soa_purge_test.sql (above)):
    SET SERVEROUTPUT ON;
    DECLARE
      MAX_CREATION_DATE TIMESTAMP;
      MIN_CREATION_DATE TIMESTAMP;
      BATCH_SIZE        INTEGER;
      MAX_RUNTIME       INTEGER;
      RETENTION_PERIOD  TIMESTAMP;
    BEGIN
      MIN_CREATION_DATE := TO_TIMESTAMP(TO_CHAR(sysdate-90, 'YYYY-MM-DD'),'YYYY-MM-DD');
      MAX_CREATION_DATE := TO_TIMESTAMP(TO_CHAR(sysdate-30, 'YYYY-MM-DD'),'YYYY-MM-DD');
      RETENTION_PERIOD  := TO_TIMESTAMP(TO_CHAR(sysdate-29, 'YYYY-MM-DD'),'YYYY-MM-DD');
      MAX_RUNTIME       := 1380;
      BATCH_SIZE        := 250000;
      SOA.DELETE_INSTANCES(
        MIN_CREATION_DATE    => MIN_CREATION_DATE,
        MAX_CREATION_DATE    => MAX_CREATION_DATE,
        BATCH_SIZE           => BATCH_SIZE,
        MAX_RUNTIME          => MAX_RUNTIME,
        RETENTION_PERIOD     => RETENTION_PERIOD
    END;

    What is best practice for scheduling the purging of SOA instances using the Oracle Soa purge strategy?
    Followed the instructions successfully http://docs.oracle.com/cd/E29542_01/admin.1111/e10226/soaadmin_partition.htm#SOAAG97268
    My requirements:
    For each purge run a unique log must be generated on the filesystem.
    The purging must be done frequently according to a schedule (i.e. daily 8pm).
    My issue:
    when I run the looped purge (soa.delete_instances), logs are not being generated as expected within the SOA_PURGE_DIR.
    logs are only generated in SOA_PURGE_DIR when I execute the parallel purge (soa.delete_instances_in_parallel). I need to run looped purge and not parallel purge.
    Current scenario (workaround to generate logs (seems a bit overkill)):
    DBMS_Scheduler job invoking a shell script
    Shell script invokes a custom sql script spooling the output to a log file
    Custom sql script invokes the Oracle soa.delete_instances procedure setting all the parameters
    soa.delete_instances runs.
    Preferred scenario (not working):DBMS_Scheduler job (PL/SQL block) -> Oracle SOA Purge procedure
    DBMS_Scheduler:
    BEGIN
    dbms_scheduler.create_job('SOA_PURGE',
        job_type             =>'EXECUTABLE',
        job_action           =>'/stage/scripts/sh/soa_purge.sh',
        number_of_arguments  =>0,
        start_date           =>TO_TIMESTAMP_TZ('27-NOV-2014 08.00.00.000000000 PM +01:00','DD-MON-RRRR HH.MI.SSXFF AM TZR','NLS_DATE_LANGUAGE=english'),
        repeat_interval      =>'FREQ=DAILY',
        end_date             =>NULL,
        job_class            =>'DEFAULT_JOB_CLASS',
        enabled              =>TRUE,
        auto_drop            =>FALSE,
        comments             =>'Job to purge the data from dehydration gateway database.'
    COMMIT;
    END;
    Shell script:
    SPOOL_FILE1=/stage/logs/soa_purge_$(date +%Y_%M_%DT%H_%M_%S).log
    sqlplus "user/password" <<EOF
    alter session set nls_date_format = 'dd/mm/yyyy hh24:mi:ss';
    SET linesize 100
    SET pagesize 300
    SET time on
    SET timing on
    spool ${SPOOL_FILE1}
    @@/stage/scripts/sql/debug_on.sql
    @@/stage/scripts/sql/soa_purge_test.sql
    @@/stage/scripts/sql/debug_off.sql
    spool off;
    set time off;
    exit;
    EOF
    Custom script (soa_purge_test.sql (above)):
    SET SERVEROUTPUT ON;
    DECLARE
      MAX_CREATION_DATE TIMESTAMP;
      MIN_CREATION_DATE TIMESTAMP;
      BATCH_SIZE        INTEGER;
      MAX_RUNTIME       INTEGER;
      RETENTION_PERIOD  TIMESTAMP;
    BEGIN
      MIN_CREATION_DATE := TO_TIMESTAMP(TO_CHAR(sysdate-90, 'YYYY-MM-DD'),'YYYY-MM-DD');
      MAX_CREATION_DATE := TO_TIMESTAMP(TO_CHAR(sysdate-30, 'YYYY-MM-DD'),'YYYY-MM-DD');
      RETENTION_PERIOD  := TO_TIMESTAMP(TO_CHAR(sysdate-29, 'YYYY-MM-DD'),'YYYY-MM-DD');
      MAX_RUNTIME       := 1380;
      BATCH_SIZE        := 250000;
      SOA.DELETE_INSTANCES(
        MIN_CREATION_DATE    => MIN_CREATION_DATE,
        MAX_CREATION_DATE    => MAX_CREATION_DATE,
        BATCH_SIZE           => BATCH_SIZE,
        MAX_RUNTIME          => MAX_RUNTIME,
        RETENTION_PERIOD     => RETENTION_PERIOD
    END;

  • Purge instances error

    Hello,
    I am running BPEL on OAS 10.1.3.5. The dehydration store database is running on 11g R2; OS is Windows 2008 R4 64bit
    I found the recommended script to purge old instances located in my OAS home. It is called "purge_instances_oracle.sql"
    When I run this script on the database as orabpel it executes nicely up to the prompt that provides the various lookup and purge options. The lookup functions execute and indicates I have about 3.6 million instances...
    When I call the purge_instances(sysdate - 120); it returns the error below
    ERROR at line1:
    ORA-06575: Package or function PURGE_INSTANCES is in an invalid state
    Any thoughts?

    PURGE_INSTANCES     PROCEDURE     1     12     14     PL/SQL: ORA-00942: table or view does not exist     ERROR     0
    PURGE_INSTANCES     PROCEDURE     2     10     4     PL/SQL: SQL Statement ignored     ERROR     0
    PURGE_INSTANCES     PROCEDURE     3     16     14     PL/SQL: ORA-00942: table or view does not exist     ERROR     0
    PURGE_INSTANCES     PROCEDURE     4     14     4     PL/SQL: SQL Statement ignored     ERROR     0
    PURGE_INSTANCES     PROCEDURE     5     29     14     PL/SQL: ORA-00942: table or view does not exist     ERROR     0
    PURGE_INSTANCES     PROCEDURE     6     27     4     PL/SQL: SQL Statement ignored     ERROR     0
    There are 20 rows returned....

  • Purge a process Instance

    Hi,
    I want to use the ProcessManager API to purge some specific long lived process Instances like this :
    pm.purgeProcessInstance(invocationID);
    But i didn't find a way to get the invocation ID of my process instance.
    I use the TaskManagerQueryService to search for process instances and get a list of ProcessInstanceRow objects.
    But unfortunately, this object doesn't have an invocationID attribute, only the processInstanceID...
    Is there a way to get the invocationID from a process instance ?
    Thanks,
    Will

    Jasmin,
    I know this tool and I tried it but it's a batch used to purge a lot of process intstances depending on the creation date and other stuff.
    In the source of the batch i founded that it use the process Manager API to purge instances.
    I need to purge a specific process instance and I only know the process instance ID of it.
    The only method I know to purge a specific instance is this one (from the Process Manager API, the same used by the batch) :
    ProcessManager pm = new ProcessManager(_factory);
    pm.purgeProcessInstance(_invocationID);
    But I don't know how to get the invocation ID of my process Instance.
    Best regards,
    Will

  • Purging of instances in BPEL domain

    Hi,
    If we choose to purge all instances in a BPEL Domain..BPEL console shows a message that ALL INSTANCES IN BPEL SERVER will be deleted, so does that mean the instances in other BPEL DOMAINS will also be deleted.
    Please suggest,
    TIA
    Phani

    Only in the domain. You can also partly purge instances:
    http://orasoa.blogspot.com/2007/03/delete-bpel-instances.html
    http://orasoa.blogspot.com/2007/02/delete-bulk-bpel-instances.html

  • Different instance numbers in Oracle BPM Workspace 11g

    Hi!!
    I'm running the QuoteProcessLab, I launched the process and in the first activity 'Enter Quote Details' I just save the info, so I see the instance created with number 200043. If I login into te workspace with jstein I see the instance in the 'Process Tracking' Tab with the same instance number 200043. But if I did an advanced search in the 'Process Tracking' tab it retuns the instance with the number 20002.
    The question is: why the instance number is different if i see it in the inbox and if i see it as a result of an advance search???
    I found it a little bit complicated to trace an instance....
    Thanks!
    Ana

    Hi Venkat,
    The SOA Suite is responsible for storing all instances of BPM (active, suspended or terminated).
    No more the concept of purging instances that were in version BEA Aqualogic 5x, 6x.
    So the records of instances will be stored in the database "forever" until you make a DBA or a purge of data in the database.
    More information: http://docs.oracle.com/cd/E17904_01/integration.1111/e10226/soaadmin_partition.htm
    Regards,
    Paulo H.

  • Stop in-flight esb instances?

    Hello,
    I have a few questions. We are testing bulk loading (basic aq adapter to various output adapters) in ESB and noticed that I am surpassing our current limits, due to various reasons such as hardware. After reading some posts, I've gotten quite confused on what is considered best practice.
    If i click on Instances, and see that there are over 100 instances, how do I stop all of those that are currently in process? Do I need to stop the app (opmnctl) and then purge the records from the instance table in the esb repository?
    How is this different than purging instances in the Manage area? Is purging the instance equivalent to purging a log file? Meaning all it's doing is purging the list, and not necessarily clearing out the in - flight instances?
    Sorry for the incorrect terminology, I'm real new to ESB, and Oracle as well.

    Actually this is a known bug, and a patch is available, patch 9537174.
    Will now install patch and retest
    Bug 10090909: EXTREMELY LOW MESSAGE DEQUEUE RATE WHEN MANY MESSAGES IN ESB_RELATION_XML
    When posting messages to ESB, when there is a certain, high number of rows in the ESB_RELATION_XML table, the dequeue rate from AQ$_ESB_MONITOR_I and ESB_MONITOR decreases dramatically.
    A number of tests were run. During some, for example, if there were up to a few thousand rows in ESB_RELATION_XML, the dequeue rate was high, probably around 10s or 100s of rows being dequeued per
    second. With about 100000 rows in ESB_RELATION_XML, the dequeue rate decreased to around 1 message per second or slower. In the customer's case, where they have a throughput of millions of messages,
    the dequeue rate drops to about *30 seconds for 1 message*. Decompilation of the code show a possible cause related to full table scans.
    Bug 9877138: INSTANCES NOT BEING DISPLAYED IN ESB CONTROL SINCE INSTALLING MLR#9
    Bug 9537174: MLR7: MESSAGES BUILDING UP IN ESB_MONITOR QUEUE CAUSING ESB CONSOLE DISP DELAY
    Bug 9828169: ESB INSTANCES ARE TOO SLOW TO SHOW UP IN ESB CONSOLE AFTER UPGRADE TO MLR#8.
    Bug 9819999: TIMESTAMP IN ESB_ACTIVITY TABLE CONTAIN INCORRECT DATETIME

  • Unassign a Process Instance

    Hi,
    Do you know how to unassign a process instance using PAPI? But the login user is not the owner of the process instance. Is there any super privilledge to unassign process instance of others?
    Thanks.

    Jasmin,
    I know this tool and I tried it but it's a batch used to purge a lot of process intstances depending on the creation date and other stuff.
    In the source of the batch i founded that it use the process Manager API to purge instances.
    I need to purge a specific process instance and I only know the process instance ID of it.
    The only method I know to purge a specific instance is this one (from the Process Manager API, the same used by the batch) :
    ProcessManager pm = new ProcessManager(_factory);
    pm.purgeProcessInstance(_invocationID);
    But I don't know how to get the invocation ID of my process Instance.
    Best regards,
    Will

  • Querying instances in 11g and filtering by process data object

    Hi all,
    I have tried to query instance following this link: http://soadev.blogspot.com/2011/07/querying-oracle-bpm-process-instances.html. It works fine, but I need to filter the instances by a process data object with a String type. Is it possible to do this?

    Thanks Mihai
    Does it mean that if the admin user does not purge instances specifically, the uses will continue to find them by querying for completed instances in their worklist (when they have already taken action for their human task, and when the related BPEL instance is finished)?
    Thanks
    Satinder

  • Purging terminated Instants in SOA

    Hi
    I want to Purge BPEL Instances that Terminated on successful completion. I have searched a lot but could not find scenario like this. But this tutorial looking good
    Delete large numbers of instances in Oracle SOA Suite 11g 
    Under "purging instances of multiple composites using STATE filters" the writer has mentioned the following stats
    FILTER.STATE := fabric.STATE_COMPLETED_SUCCESSFULLY;
    --FILTER.STATE := fabric.STATE_RECOVERY_REQUIRED;
    --FILTER.STATE := fabric.STATE_COMPLETED_SUCCESSFULLY;
    --FILTER.STATE := fabric.STATE_FAULTED;
    --FILTER.STATE := fabric.STATE_TERMINATED_BY_USER;
    --FILTER.STATE := fabric.STATE_SUSPENDED;
    --FILTER.STATE := fabric.STATE_STALE;
    --FILTER.STATE := fabric.STATE_UNKNOWN;
    I what meant by FILTER.STATE := fabric.STATE_TERMINATED_BY_USER can i use this to purge successful completed composite with terminated condition
    Please help me in this regards or any other alternative
    Thanks
    Tipu

    You can use a Java API (documented here: http://docs.oracle.com/cd/E21764_01/integration.1111/e10226/soaadmin_apimanage.htm) to remove composite instances, either from Java or Jython, of course. I prefer this to the OOTB purge scripts because they're fairly opaque and after working in middleware for the past 14 years my mind doesn't easily run to database internals so the chance to use a Java facade onto what's actually in SOAINFRA is welcome.
    FWIW, I've got a Jython script that deletes instances within specified timestamps that are not running or needing recovery. One caveat is that the list of states in the CompositeInstance interface is not the same as the list in the database (which you can read here: https://blogs.oracle.com/ateamsoab2b/entry/list_of_all_states_from).
    HTH
    Paddy

  • Availability of old instances in BPEL, and completed instances in worklista

    Hi All
    How log does BPEL store the completed instances?
    Are they purged automatically, after a set interval of time?
    If my process contains a human activity, and a person has say already approved the instance from worklist app, he can still get hold of that instance by filtering for 'COMPLETED' instances. Will this list all the completed instances that he had worked on, even years old?
    THanks
    SAtinder

    Thanks Mihai
    Does it mean that if the admin user does not purge instances specifically, the uses will continue to find them by querying for completed instances in their worklist (when they have already taken action for their human task, and when the related BPEL instance is finished)?
    Thanks
    Satinder

  • How to delete BPEL instances of deleted composits

    Hi,
    I need to delete or abort running instances of BPEL composite that is already deleted.
    is this possible?
    I'm running soa 11g (11.1.1.4)
    Thanks,
    Ronen

    Hi Roneng,
    An optimal way to do this is by using the purging procedures on the SOAINFRA database.
    Take a look at: http://docs.oracle.com/cd/E28280_01/admin.1111/e10226/soaadmin_partition.htm#CJHEBIBH
    You can, for example, purge instances for a certain composite name and revision for a specific time period.
    Cheers
    Tiago

Maybe you are looking for