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;

Similar Messages

  • Deployment Queries related to Quartz Scheduler for SOA 11g???

    Dear All,
    We are using Quartz Scheduler for SOA 11g and have queries on its testing:
    1. Can we change the cron expression(say, previously cron expression was with the interval of 15 minutes every hour and we are changing it to 5 minutes every hour) in the scheduler table after we deployed the scheduler application? Should this require redeployment of Scheduler Application or the scheduler java class needs to be be run again to trigger the newly updated cron expression. Or, Will commiting the scheduler details table alone update the application to schedule for every 5 minutes in an hour?
    2. Also, if we are trying to schedule a new application(say, previously only 2 of our applications are scheduled and trying to add newly built application in the Scheduler table), will commiting the table alone will schedule the new application or require redeployment of Scheduler Application or the scheduler java class needs to be be run again?
    Please share your thoughts!
    Thanks in advance

    Were you able to control the frequency from the table. Can you please share the detials..

  • Converting a standalone SOA/AIA instance to a cluster instance.

    Hi Architects,
    We have a SOA/AIA11g instance running as a standalone instance with DR configured. Now team wants to convert this standalone instance to a 2 node clustered instance.
    Can someone let us know if it is possible to convert a standalone SOA instance to a clustered instance.
    Thanks,
    Edited by: user1144870 on Jun 14, 2011 4:44 AM

    That is quite some work.
    You can add a cluster by using the console and add the soa_server to the cluster.
    The problem is that when you add another server to the cluster the resources (such as JMS) are targetted to the soa_server
    are not targetted to the other server in the cluster. So you have to retarget all the resources to the cluster.
    The trouble you are going to run into are the distributed JMS resources (such as queues and topics) for those
    you have to add new resources and target them to the right server instance.
    Some extra information can be found here: http://middlewaremagic.com/weblogic/?p=6872
    I think the best way to proceed is the configure a new clustered environment an example of the configuration steps
    involved can be found here: http://middlewaremagic.com/weblogic/?p=6040

  • Where does OEM store information about SOA composite instances

    Hi All,
    I am posting this query the third time here. I really and urgently need information on where this OEM 12c Cloud Control stores the information about the SOA composite instances like.. if the instances is completed, running,faulted,terminated in the management repository or it does not store these information at all. But then from where it fetches the information on faulted instances which it shows on a SOA composite home page in OEM console.
    I really need some concepts on this.
    Please help!!
    Thanks in Advance!!

    This forum is answered on a best effort basis. For time sensitive urgent issues, please log a service request with Oracle Support.

  • SOA Purging Scripts failing

    Hi All,
    I am following the below Oracle post for running the SOA Purging scripts.
    http://docs.oracle.com/cd/E23943_01/admin.1111/e10226/soaadmin_partition.htm#SOAAG97396
    When I follow Step 3 under 9.3.6 Executing the Purge Scripts the script is failing with the below errors. What I have observed is that @@ file name under package is not getting executed.
    For Example : purge_bpel_oracle.sql is failing because of @@ and all other files are failing because of this issue.
    CREATE OR REPLACE
    PACKAGE body soa_orabpel
    AS
    @orabpel_pruneOpenCompositeIDs.sql
    @orabpel_deleteComponentInstances.sql
    @orabpel_deleteNoCompositeIdInstances.sql
    @orabpel_deleteComponentInstancesDOP.sql
    @orabpel_isComponentPartitioned.sql
    END soa_orabpel;
    I tried giving complete path of the file even then it is failing.
    CREATE OR REPLACE
    PACKAGE body soa_orabpel
    AS
    @D:\WeblogicMiddleware1117\Oracle_SOA1\rcu\integration\soainfra\sql\soa_purge\orabpel\orabpel_pruneOpenCompositeIDs.sql
    @D:\WeblogicMiddleware1117\Oracle_SOA1\rcu\integration\soainfra\sql\soa_purge\orabpel\orabpel_deleteComponentInstances.sql
    @D:\WeblogicMiddleware1117\Oracle_SOA1\rcu\integration\soainfra\sql\soa_purge\orabpel\orabpel_deleteNoCompositeIdInstances.sql
    @D:\WeblogicMiddleware1117\Oracle_SOA1\rcu\integration\soainfra\sql\soa_purge\orabpel\orabpel_deleteComponentInstancesDOP.sql
    @D:\WeblogicMiddleware1117\Oracle_SOA1\rcu\integration\soainfra\sql\soa_purge\orabpel\orabpel_isComponentPartitioned.sql
    END soa_orabpel;
    SQL> @soa_purge_scripts.sql
    Procedure created.
    Procedure created.
    Procedure created.
    Procedure created.
    Function created.
    Function created.
    Function created.
    Function created.
    Procedure created.
    Function created.
    Procedure created.
    Procedure created.
    Type created.
    Type body created.
    PL/SQL procedure successfully completed.
    Package created.
    Warning: Package Body created with compilation errors.
    PL/SQL procedure successfully completed.
    Package created.
    Warning: Package Body created with compilation errors.
    PL/SQL procedure successfully completed.
    Package created.
    Warning: Package Body created with compilation errors.
    PL/SQL procedure successfully completed.
    Package created.
    Warning: Package Body created with compilation errors.
    PL/SQL procedure successfully completed.
    Package created.
    Warning: Package Body created with compilation errors.
    Package created.
    Warning: Package Body created with compilation errors.
    PL/SQL procedure successfully completed.
    Package created.
    SP2-0310: unable to open file "delete_instances.sql"
    SP2-0310: unable to open file "delete_insts_in_parallel_job.sql"
    SP2-0310: unable to open file "delete_instances_in_parallel.sql"
    Warning: Package Body created with compilation errors.
    SQL> show errors;
    Errors for PACKAGE BODY SOA:
    LINE/COL ERROR
    3/17     PLS-00323: subprogram or cursor 'DELETE_INSTANCES' is declared in
             a package specification and must be defined in the package body
    14/11    PLS-00323: subprogram or cursor 'DELETE_INSTANCES_IN_PARALLEL' is
             declared in a package specification and must be defined in the
             package body
    27/11    PLS-00323: subprogram or cursor 'DELETE_INSTS_IN_PARALLEL_JOB' is
             declared in a package specification and must be defined in the
             package body
    Can any one help me on the above issue.

    I resolved the issue.
    I logged in as dev_soa_infra user and changed all the relative path to absolute path and the script worked.

  • Run shutdown oc4j instance automatically when user Turn off/Log off

    Hi All,
    Can you help me anyone to run the shutdown oc4j instance automatically when user Turn off/Log off the application or the computer?
    I want to use any Schema level trigger if possible to solve the issue.
    I am using oracle Developer Suite 10g and Database 10g as well.
    Arif

    Ah, sorry I misunderstood your question (probably not enough coffee in the morning); anyway there are folders for scripts which should be executed on startup / shutdown or logon / logoff:
    Startup
    %SYSTEMROOT%\System32\GroupPolicy\Machine\Scripts\StartupShutdown
    %SYSTEMROOT%\System32\GroupPolicy\Machine\Scripts\ShutdownLogon
    %SYSTEMROOT%\System32\GroupPolicy\User\Scripts\LogonLogoff
    %SYSTEMROOT%\System32\GroupPolicy\User\Scripts\LogoffWrite a script to startup / shutdown your OC4J (probably calls to startinst.bat and stopinst.bat) and place them in the apropriate folders.
    cheers

  • SOA Purge using delete_instances on SNAP

    Hi,
    We have SOA 11g 11.1.1.5. In our Production Database our SOA schema size is over 1.5 TB. The current purge script we have is not deleting all the instances and so the Database size is growing. We decided to use the below as we really don't need any data beyond 1 week.
    SOA_SOAINFRA.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,
       ignore_state => true,
       purge_partitioned_component => false);
    In order to use this as a scheduled job we want to delete the old data first. It's taking way too long to even delete even a one week of old data. So we want to see if the below approach will work.
    Take the SNAP of Production Database and then run the above script and purge the data.
    Reclaim the space following Oracle Note "How to Free Space from LOB Segments in the SOA Schema (Doc ID 1380989.1)"
    Use this version of SNAP for the Production Database.
    Any feedback is appreciated
    Thanks

    Hi Vipin,
    Thanks for your replay, I even tried with the commands you mentioned. I was trying to include the time frame in the below purge script it is not working:
    DECLARE
    MAX_CREATION_DATE timestamp;
    MIN_CREATION_DATE timestamp;
    batch_size integer;
    max_runtime integer;
    retention_period timestamp;
    BEGIN
    MIN_CREATION_DATE := to_timestamp('2010-01-01','YYYY-MM-DD');
    MAX_CREATION_DATE := to_timestamp('2010-01-31','YYYY-MM-DD');
    max_runtime := 60;
    retention_period := to_timestamp('2010-01-31','YYYY-MM-DD');
    batch_size := 10000;
    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,
    purge_partitioned_component => false);
    END;

  • 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

  • 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

  • BPEL Scheduling in SOA Suite 11g

    Hi,
    I am new to Oracle SOA. I have come across of multiple ways of scheduling in BPEL (Using Servelts with Quartz, DBMS_JOB, Enterprise Scheduler, Wiat activity etc). Can any one suggest best approach to handle various scenarios in scheduling. What is the industry standard way of doing it? How should a scheduler handle the any erros during the BPEL executions?
    As I know most of the cases, we are using BPEL exposed WSDL call for it's execution. But what is best practices to handle any errors during remote BPEL execution? Also can we get return paramaters to the scheduler from BPEL?
    Thanks in advance.
    Vic

    Hi-
    You can refer to the below link.
    http://darwin-it.blogspot.com/2008/01/how-to-create-bpel-job-scheduler.html
    I have not personally tried but I think it should work.
    PLease let us know how it goes.
    Thanks,
    Dibya

  • Job-scheduling on a specific instance on source system

    Hello All,
    Is there any possibility to schedule an infopackage in BW and tell the job that the corresponding job on source system (e.g. R/3-system) should run on a specific instance?
    Thanks,
    Pavan

    Hi,
    I guess the job is related to extraction job in R/3 that relates to the BI load..
    Here if this job runs on a particaular RFC user always , depending on the user u can resrtict the instance on which it is supposed to run...
    Take the help from BASIS they can fix the issue....
    rgds,

  • Post Mass External Transfer - can't seem to schedule in our FINDEV instance

    We recently applied patch sets (7666112,6317575,7044061) to our FINDEV instance, and now when testing the FA functions, we can't seem to get the LOV to the Post Mass External Transfer job. We tried receiving PO line items and also transfer asset to new location but still can't select LOV entitled 'LCB Assets'. Can you help isolate which table and/or script to check what triggers the LOV to display. We appreciate it.

    Per Oracle support - suggested to apply one off patch 7533992. After applying patch, we were able to schedule Post Mass External Transfer job.

  • OIM/SOA/OAM Instance cloning

    Hi All,
    Can anyone give me inputs on how to replicate an instance of OIM/SOA/OAM from one machine to another machine, with same configuration details.
    Given that I have oracle home location and the password to use. How do I go ahead about cloning the instance on different machines?
    Regards,
    Shashi

    Further to this discussion, I found these scripts what would copy environments and home instances and its components.
    http://docs.oracle.com/cd/E23943_01/core.1111/e10105/clone.htm
    Can the same procedure be followed for environment cloning?
    We are planning to try this approach, so, needs any of your reviews,
    1. Use backup & restore strategy to import the schema and data.
    2. Use the cloning procedure given at the above link to import the instance details.
    Regards,
    Shashi
    Updated the message with approach details

Maybe you are looking for

  • Ingo - How to have 2 RKFs in Webi on same characterstic

    Hello, I am trying to develope 2 restricted key figures in Universe. I follwed the white paper given by Ingo. I better explain with example; 1. Created a 'Measure1' and wrote MDX in properties with a prompt on 'Doc Type'. And when I run the Webi, the

  • I need help with Zen Micr

    I went to repair cause it cannot switch on after charging.. But now i charge, there is this lighting bolt shown but did not indicate how much power was charge. after charge for 6 hrs.. it can on but later return to its charge status.

  • Can not deactivated the serial number of Adobe Photoshop Elements 10

    After a HDD crash must new installed Win 7 and Photoshop. Have Photoshop new installed and new registered with the serial number. All was ol. Than comes an automaticly download with a update. By the next start of Photoshop I see the message, that the

  • Remote Log in

    Hi I wanna remote log in a Linux server and compress/uncompress a file using my Java app Any suggestion regarding this ..............????

  • Does flyover works on iphone

    Flyover does not operate on iphone