Run steps in a chain at a specific time frame

I've got an ETL process running in a scheduler chain. First steps are extracting data from remote servers. Each remote server has it's own time frame in which I can extract the data. Once the window is closing I need to kill the job immediately.
My question is, Is it possible to define a time frame for single steps in a chain ?
Other options i'm considering (but all are less favorable)
Create a job with max_run_duration for each extraction step and manually time the transformation / load chain steps after. Advantage - simple, Disadvantage - A lot of ideal time.
Same as above but make the transformation / load chain with an event based job to when all extraction jobs are done. Advantage - Less ideal time, Disadvantage - More complex, error prune.
These two options requires a sniper job to catch JOB_OVER_MAX_DUR event and kill the job.These options also require breaking up the chain - something I would like to avoid. Another option that keeps the chain intact is
Defining the step rule with a time based condition (and using low evaluation_interval ~ 60 seconds) But then I cannot set max_run_duration and there for cannot stop the job if it's working when the time frame is closing.
I would appreciate any ideas on solving this problem.

Hello,
You can for instance execute the following when you create your Refresh Group:
BEGIN
DBMS_REFRESH.MAKE(
name => '"{color:red}schema{color}"."{color:red}refresh_group_name{color}"',
list => '',
next_date => TRUNC(SYSDATE) + 1 + 1/24,
interval => 'TRUNC(SYSDATE) + 1 + 1/24',
implicit_destroy => FALSE,
lax => FALSE,
job => 0,
rollback_seg => '{color:red}rollback_segment{color}',
push_deferred_rpc => TRUE,
refresh_after_errors => TRUE,
purge_option => NULL,
parallelism => NULL,
heap_size => NULL);
END;
/Then you add your MV to the Refresh Group as follow:
BEGIN
DBMS_REFRESH.ADD(
name => '"{color:red}schema{color}"."{color:red}refresh_group_name{color}"',
list => '"{color:red}schema{color}"."{color:red}MV_name{color}"',
lax => TRUE);
END;
NB: The syntax and option can change with the Release (this syntax is well tested on 8.1.7).
Hope it can help.
Best regards,
Jean-Valentin
Edited by: Lubiez Jean-Valentin on Dec 16, 2009 9:04 AM

Similar Messages

  • How can I execute a command every 10 seconds in a specific time-frame

    Hello,
    I would like to create a script which in a specific time-frame collects some outputs and also pings every 10 seconds.
    To collect the outputs every minute from 22:00PM to 22:10PM I have the following:
    event manager applet snmp_output
    event timer cron cron-entry "0-10/1 22 * * *" maxrun 30
    action 010 cli command "enable"
    action 020 cli command "show clock"
    action 030 cli command "terminal exec prompt timestamp"
    action 040 cli command "show snmp stats oid | append bootdisk:show_snmp_stats_oid.txt "
    action 045 wait 5
    action 050 cli command "show snmp pending | append bootdisk:show_snmp_pending.txt "
    action 055 wait 5
    action 060 cli command "show snmp sessions | append bootdisk:show_snmp_sessions.txt "
    acionn 065 wait 5
    action 070 cli command "end"
    To confirm connectivity to the device doing the SNMP polls I would like to execute a ping every 10 seconds in the same timeframe.
    Cron seems only to support minutes. Is it possible to combine a watchdog timer + a cron timer?
    Can this ping function be incorporated in the SNMP output applet or will I have to write a new one?
    Will I need TCL here (I have no experience in TCL)?
    Best regards,
    Tim

    If you wanted the pings to run in parallel, you could have this applet configure another applet to do the pinging, then remove it on the last run.  This will require an amount of programmatic logic, though.  If you wanted to keep things a bit simpler, add another applet that runs at 22:00 that configures a watchdog pinging applet, then a third applet that runs at 22:10 that removes the pinging applet.
    When it comes to embedded quotes when you configure your nested pinging applet, you'll need to use $q to stand for the embedded quotes.  You'll also need to configure:
    event manager environment q "

  • To run a scenario exactly once in a specific time every day

    I would like to run a scenario which will read a file in a specific directory and will update the data in the database.
    File -> JDBC
    I would like to run the scenario only once a day in a specified time
    i.e. say 12:00 midnight.
    How can I specify that in the scenario?

    Hi
    Note:You will need to have the authorizations of the user group SAP_XI_ADMINISTRATOR with the role modify.
    Go to Runtime Workbench -> Component Monitoring -> Communication Channel Monitoring
    Locate the link Availability Time Planning on the top right corner of your Communication Channel Monitoring page.
    In your case, the requirement is to schedule the Sender file adapter daily once at 12:00 at midnight.
    In Availability Time Planning, choose the Availability time as daily and say create.
    Provide the details like the time 12:00
    Then select the communication channel , goto the Communication Channels tab and filter and add the respective channel (File Sender).
    Once all the above has been done 'Save' the changes.
    hope it helps
    Thanks

  • How to migrate data from one database to another for a specific time frame

    Hi
    This is the scenario:
    We have 2 databases:
    PTT : THis has data from march 11 to March 19 that was created when the production was down due to a crash
    PROD : THis was recovered after March 19. Hence has no data created between March 11 and March 19
    How do I transfer this data from March 11 to March 19 from PTT to PROD so that Production can be up to date asap.
    Please let meknow the methods to get this done
    Regards
    Gayathri

    Hi,
    You could use EXP/IMP to move the data from PTT to PROD. But, you should be careful with sequences, modification to the same data.....
    eg Customer Address was updated between Mar 11 - 19, again the same customers was updated after 19 Mar, under this situation if you load the data from PTT you would be wrongly updating the data.....
    You have to study well and apply changes...........

  • Manuals users should not be able to submit a concurrent program at a specific time frame:

    Hi
    Please let me know is it possible to restrict some users to submit a Concurrent program during a selected time frame .
    Eg we have an issue in which Process Lockboxes concurrent Program is submitted by the batch user and is also by the Users manually from Front end .What I want is that during a particular time frame everyday say from 12:00 AM to 6 PM I want to restrict manual users to submit this program ,whereas the Program can be submitted by the Batch user any time  .
    Please let me if its possible to achieve this and how .
    Thanks
    Rishabh

    Please don't post duplicates -- restrict user to submit concurrent Program
    Continue the discussion in your original post.
    Thanks,
    Hussein

  • Counting records in a specific time block per day

    I have a scenario where I need to find the number of records in a table called 'DEALS', for a specific time frame (in this case 8am until 9am where the date field stores dates in the following format '06/01/2005 08:23:35'). I need to run this query to include each business day between two dates (ie., june 1, 2005 until current_date).
    In addition, this query has to take into account only Users that are ACTIVE in a second table called 'DEALUSERS'
    I have worked out the following to get the overall record set, but it is not narrowed down to just the specified time frame, nor does it produce the count for each day's 8:00-9:00 time frame.
    SELECT fdls.DEALDATE, user.USERROLE
    FROM DEALS dls, DEALUSER user
    WHERE dls.CLIENTUSERID = user.USERID
    AND user.STATUS = 'ACTIVE'
    AND dls.PROXYTRADEFLAG = 'YES'
    AND dls.MODENAFLAG = 'YES'
    AND TRUNC(dls.DEALDATE)
    BETWEEN TO_DATE('06/01/2004 08:00:00', 'MM-DD-YYYY HH:MI:SS')
    AND current_date
    I tried using the following at the end of the above query, but it doesn't work - any ideas? :confused:
    AND TO_CHAR(EXTRACT('HOUR' FROM DEALTS)) = '8'
    Can someone help, pls :o

    Not quite sure what you ultimately want here, but something like:
    SELECT TRUNC(dls.dealdate, 'hh'), user.userrole, count(*)
    FROM deals dls, dealuser user
    WHERE dls.clientuserid = user.userid AND
          user.status = 'ACTIVE' AND
          dls.proxytradeflag = 'YES' AND
          dls.modenaflag = 'YES' AND
          dls.dealdate BETWEEN TO_DATE('06/01/2004 08:00:00', 'MM-DD-YYYY HH:MI:SS') AND current_date and
          TO_CHAR(dls.dealdate, 'hh24') = '08'
    GROUP BY TRUNC(dls.dealdate, 'hh'), user.userroleshould give you some ideas.
    HTH
    John

  • Two signals on two outputs with specific time interval

    I cant manage with following:
    Have NI-6251 card. Trying to sent two step-signals on two outputs with
    specific time interval, say 1 to 10 ms with 1us accuracy.
    How can I start?
    Thanks!

    Hi Anonymous,
    What do you mean by step-signals?  Do you mean a signal that steps up the voltage over time, a step function signal that is zero until a certain time then goes to 1, or a pulse train?
    In the meantime you can find examples for getting started in the NI Example Finder by selecting Help » Find Examples
    When that opens you can limit the examples to ones that are compatible with your hardware.  In the bottom left corner select your hardware and check the Limit results to hardware box.
    Browse to Hardware Input and Output » DAQmx » Digital Generation or Generating Digital Pulses.
    Best Regards,
    Bryan H.

  • Interface to run at a specific time

    Hi
    I am trying to let a interface run at a specific time, I have setup the bpm and will probable use the wait step? Is this the way to go, because I was thinking of setting my sender adapter to run let's say every 2 hours and then when it reach 10pm it will let all the data go to the end point?
    Thanks in advance
    Clinton

    Hi,
    you can collect all of your messages
    (before BPM) and then at 10 let all then start the BPMs
    /people/alexander.bundschuh/blog/2006/01/04/scheduling-messages-in-sap-xi
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Failing at ACR step in process chain?

    Hi,
      Could any body explain on this topic?
    In process chain job mostly the chain was failing at ACR(attribute change run) step. that it is materdata ACR step.i want permanent solution for this step? I want find why this ACR step is failing weekly twice not regularly.
    So,plz any body help on this..
    Thanks&regards,
    Goodyear.

    What is happening here is that while the ACR process is trying to run in one chain(the main MD chain) most probably another chain is already getting kicked off before the MD chain and its ACR process is RUNNING while the main MD chain's  ACR process is trying to kick off.
    -Try to have sufficient spacing between the process chain batch scheduling runs so that 2 ACR processes NEVER clash.
    -An ACR process while running,locks the MD tables and so no MD loads on those said infoobjects should kick off while the ACR process is running.
    -goto Tools->Attr/Change run.It does contain a short log of the past ACR runs.Maybe u can get details about..at which day/time ACR process taking long time.
    -Recommend that u have single ACR process at the end of the MD load chain.U can even have a meta chain having all MD chains as local chains and then put an AND collector from the local chains and map it to a ACR process.Right click on the ACR process and then insert the list of all MD infoobjects that are being loaded in all the local chains.
    cheers,
    Vishvesh

  • Save Hierarchy step in process chain

    Hi All,
    I have a process chain which include the following steps.
    Z* program([for loading multiple hierarchies   |http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e0d5c74a-8a39-2d10-2d8b-9e1971cb053a]) --> Save hierarchy --> Change run
    In the above scenario, I cannot include a step for the hierarchy save/activate because the hierarchy is not being loaded in this chain through an infopackage.
    And I learned from the [site|http://help.sap.com/saphelp_nw70/helpdata/en/3d/320e3d89195c59e10000000a114084/content.htm], that 'Save hierarchy' has to be included after loading the hierarchial data.
    So, is there any procedure for including any step in process chain for activating the hierarchial master data..?
    If I want write a Z* program for activating hierarchial data, which programs/ function modules are used to activate hierarchial master data..?
    Thanks in advance.

    Hi,
    There is an option in the infopackage used to load hierarchy -- to activate upon loading.
    tick that option and remove the hierarchy name from Save hierarchy variant of the process chain.
    Ticking this option will activate your hierarchy automatically after loading.No need to explicitely save it.
    Hope this helps !!
    Regards,
    Yogita.

  • Comapre two day run for a process chain

    Hi BIs
    Is there any transaction or steps to compare any two independent run of a process chain.If so please expalin me how?
    thanks in advance
    Bala

    Hi
    Goto se38.
    execute program /ssa/bwt.
    When you get the "Process Chain Analysis Chain"
    Cleick on the Process chains button
    Give the chain name in the Chain Id field
    Now suppose you want to compare the runs on 5th and 11th of a month
    In the start date give 5th and in the end date give 11th.
    You will get the logs of all the selected dates.
    Now select only the 5th and the 11th run.
    Click the button Compare runtimes.
    It will the comparison of runtime of each individual step in the PC.
    You can comapre as many runs together as you want
    Hope this helps
    Regards
    Shilpa

  • SELECT top two longest running steps from a log file

    Simplified example.
    Our jobs write records to our own internal log file. I want to write a query that will pull log records for a specific job, between specific dates. This will help determine if the job is running slower than usual and to find the steps within the job that
    are the longest running.
    Jobs are identified by the Type field. Type=1 is a specific job name.
    Each job writes a DESC=START record to the log at the beginning of the job. the Desc=START record will be updated at the end of the job with the ENDDT.
    I want to pull the top two longest running steps (ENDDT-BEGINDT) for each job (Type) where the step startdr and enddt falls between the START startDT and end dt.
    I also want to always pull key step names, like DESC=START and DESC=xya for each job.
    LOG RECORDS
    DESC,TYPE,BEGINDT,ENDDT
    START,1,2014-10-22 07:56:56.000,2014-10-22 09:56:56.000
    aaa,1,2014-10-22 07:57:56.000,2014-10-22 08:57:56.000
    bbb,1,2014-10-22 08:57:56.000,2014-10-22 09:01:56.000
    ccc,1,2014-10-22 09:01:56.000,2014-10-22 09:56:56.000
    xya,1,2014-10-22 09:55:56.000,2014-10-22 09:56:56.000
    START,1,2014-10-21 11:56:56.000,2014-10-22 02:56:56.000
    aaa,1,2014-10-21 11:57:56.000,2014-10-22 01:57:56.000
    bbb,1,2014-10-22 01:57:56.000,2014-10-22 02:56:56.000
    ccc,1,2014-10-22 02:56:56.000,2014-10-22 02:56:56.000
    xya,1,2014-10-22 09:55:56.000,2014-10-22 09:56:56.000
    Desired result set.
    If pulling job type 1 records for last 2 days, would end up with this result set. START and xya are always pulled and then the top 2 longest running steps for each of the START records.
    DESC,TYPE,BEGINDT,ENDDT,Duration
    START,1,2014-10-22 07:56:56.000,2014-10-22 09:56:56.000
    aaa,1,2014-10-22 07:57:56.000,2014-10-22 08:57:56.000
    ccc,1,2014-10-22 09:01:56.000,2014-10-22 09:56:56.000
    xya,1,2014-10-22 09:01:56.000,2014-10-22 09:56:56.000
    START,1,2014-10-21 11:56:56.000,2014-10-22 02:56:56.000
    aaa,1,2014-10-21 11:57:56.000,2014-10-22 01:57:56.000
    bbb,1,2014-10-22 01:57:56.000,2014-10-22 02:56:56.000
    xya,1,2014-10-22 09:55:56.000,2014-10-22 09:56:56.000
    I am asking for help in how to create this query. Thanks

    Hi TheBrenda,
    According to your description, I have written a sample query and tested it in my local environment.
    The following sample query is for your reference:
    --create table log_records
    CREATE TABLE log_records ([DESC] varchar(10),[TYPE] int,BEGINDT datetime,ENDDT datetime)
    --insert values to table log_records
    INSERT INTO log_records VALUES
    ('START',1,'2014-10-22 07:56:56.000','2014-10-22 09:56:56.000'),
    ('aaa',1,'2014-10-22 07:57:56.000','2014-10-22 08:57:56.000'),
    ('bbb',1,'2014-10-22 08:57:56.000','2014-10-22 09:01:56.000'),
    ('ccc',1,'2014-10-22 09:01:56.000','2014-10-22 09:56:56.000'),
    ('xya',1,'2014-10-22 09:55:56.000','2014-10-22 09:56:56.000'),
    ('START',1,'2014-10-21 11:56:56.000','2014-10-22 02:56:56.000'),
    ('aaa',1,'2014-10-21 11:57:56.000','2014-10-22 01:57:56.000'),
    ('bbb',1,'2014-10-22 01:57:56.000','2014-10-22 02:56:56.000'),
    ('ccc',1,'2014-10-22 02:56:56.000','2014-10-22 02:56:56.000'),
    ('xya',1,'2014-10-22 02:56:56.000','2014-10-22 02:56:56.000')
    --run the following main query to get top two longest running steps
    WITH A AS
    (SELECT BEGINDT,ENDDT FROM log_records WHERE [DESC]='START'),
    B AS
    SELECT LR.[DESC], LR.TYPE, LR.BEGINDT BEGINDT1, LR.ENDDT ENDDT1, A.BEGINDT BEGINDT2, A.ENDDT ENDDT2,DATEDIFF(SECOND,LR.BEGINDT,LR.ENDDT) AS timediff,ROW_NUMBER() OVER(PARTITION BY A.BEGINDT ORDER BY DATEDIFF(SECOND,LR.BEGINDT,LR.ENDDT) DESC ) AS rn FROM log_records LR JOIN A
    ON LR.BEGINDT >= A.BEGINDT AND LR.ENDDT<=A.ENDDT
    SELECT [DESC],[TYPE],BEGINDT1 BEGINDT,ENDDT1 ENDDT FROM B WHERE rn<4 or [DESC]='xya' ORDER BY BEGINDT2,rn
    The result of the main query is:
    DESC      TYPE     
    BEGINDT                                             
    ENDDT
    START   1              2014-10-21 11:56:56.000                2014-10-22 02:56:56.000
    aaa         1              2014-10-21 11:57:56.000                2014-10-22
    01:57:56.000
    bbb        1              2014-10-22 01:57:56.000                2014-10-22 02:56:56.000
    xya         1              2014-10-22 02:56:56.000                2014-10-22
    02:56:56.000
    START   1              2014-10-22 07:56:56.000                2014-10-22 09:56:56.000
    aaa         1              2014-10-22 07:57:56.000                2014-10-22
    08:57:56.000
    ccc          1              2014-10-22 09:01:56.000                2014-10-22
    09:56:56.000
    xya         1              2014-10-22 09:55:56.000                2014-10-22
    09:56:56.000
    If you have any question, please feel free to let me know.
    Regards,
    Jerry Li

  • Change run error in Process Chain

    Hi,
    I got an error in running the change run step in the process chain.
    The error is "The action is locked by a change run".
    Could this mean that the change run was running when this step in the process chain was invoked.
    I have a process chain with multiple(4) parallel processes and I would like to know from you gurus the best way to model such a process chain. Should I keep just one attribute change run at the end of the complete process chain or should I let the change run after every PC (each of the 4).
    Any inputs will be appreciated
    Thanks & Regards
    Sid

    Siddhartha,
       Exactly, you need to keep the change run process at the end of the PC. no need to run the change run for every master data flow.
    check whether change run is running? check in RS12 for locked entries.
    All the best.
    Regards,
    Nagesh Ganisetti.

  • Attribute change run Failing in Process Chain

    Hi guys,
    Every day my process chains is failing due to Attribute change run and I am maually running attribute change run.
    And one more thing when the attr. change run is triggered automatically,then it is generating 2 change counters in RSATTR tcode instead of 1.
    One is successfully completes and one is still in schedule.After 2days days it is showing like completed change count id.
    Please help me.
    Regards,
    Tiragati.

    Hi,
    As you said Attribute change run step is failing every day.
    can you post the error message. is it failing because of Lock issue or some other issue.
    Mostly attribute change runs fails with lock issues. if its the same problem in your case. make sure that no master data objects runs at the time attribute change run runs.
    Try to put some delay in the process of the Attribute change run so that it will not get failed.
    Check if its the same ACR scheduled or diff objects?
    Regards
    KP

  • Oracle Scheduler Chain Step - Succeeds and Fails at the same time?

    Hi,
    I have a chain program that executes a script :-
    exec DBMS_SCHEDULER.CREATE_PROGRAM (
    program_name => 'xxxx_execute_script'
    ,program_type => 'EXECUTABLE'
    ,program_action => '/home/xxx/run_remote_xxxx.sh'
    ,number_of_arguments => 0
    ,enabled => true
    ,comments => 'execute drms shell script'
    The script does a remote execute to a another script on a different machine.
    I have a chain step setup as :-
    exec DBMS_SCHEDULER.DEFINE_CHAIN_STEP (
    chain_name => 'xxx_drms_manual_load',
    step_name => 'STEP30',
    program_name => 'drms_execute_script');
    I have chain rules :-
    (execute the script)
    exec DBMS_SCHEDULER.DEFINE_CHAIN_RULE (
    chain_name => 'xxx_drms_manual_load'
    ,condition => 'STEP20 succeeded'
    ,action => 'START STEP30'
    ,rule_name => 'drms_rule_030'
    ,comments => 'start drms step30 - execute_script'
    (chain rule for failed - executes a stored procedure to sends a warning email)
    exec DBMS_SCHEDULER.DEFINE_CHAIN_RULE (
    chain_name => 'jpl_drms_manual_load'
    ,condition => 'STEP30 failed'
    ,action => 'start step31'
    ,rule_name => 'drms_rule_035'
    ,comments => 'drms - sends unix script error email'
    (chain rule for succeeded - executes a stored procedure to check for certain processing codes)
    exec DBMS_SCHEDULER.DEFINE_CHAIN_RULE (
    chain_name => 'jpl_drms_manual_load'
    ,condition => 'STEP30 succeeded'
    ,action => 'START STEP40'
    ,rule_name => 'drms_rule_050'
    ,comments => 'start drms step40 - check for errors'
    Everything has been running fine until a couple of days ago.
    The job chain now seems to run Step 31 (failed) AND step40 (successful) ! How can this be?
    All job steps run according to the oracle job log (all_SCHEDULER_JOB_RUN_DETAILS) - (STEP31 does not appear in the log - even though it runs - we recieve a warning email)
    There no non zero return codes for the job steps.
    Is there a way to see the return code from the execution of the script (STEP30) to see what the return code is ??
    Thanks in advance,

    Hi,
    You can select from the dba_scheduler_job_run_details and filter on job name to track the execution progress of a chain.
    Hope this helps,
    Ravi.

Maybe you are looking for

  • Open sales orders report

    Hi,      Does anyone know of any open sales orders report ? VA05 ? Table join between VBAP-VBAK ? Thanks

  • Read Only Fields

    When a read only field is in a user role and the field is removed, the read only flag disappears. How can controls be implemented so that a role can not be added back in and the read only doesn't follow. It is important to have some fields read only

  • How do I get magnification (to the left of the address bar) in the newest version to be saved on various sites, as it did previously?

    In previous versions, I magnified or reduced each site I visited to fill my screen by clicking + or -. When I revisited those sites, I automatically got the magnification I previously chose. Now I must increase or reduce the magnification manually ev

  • Usage of dbms_lob.substr()

    Hi all, I have a question to the usage of dbms_lob.substr function in PL/SQL. I have a clob with dbms_lob.getlength(l_clob) = 12295. When I call dbms_lob.substr to get the clob starting from the specified location, I miss data at the end of the resul

  • Help needed on explaining JVM thrashing behavior

    Hi there, We run a webapp on Tomcat 4.1.29 + JDK 1.4.2_02-b03. We've been seeing memory issues in our production environment. It's not an OutOfMemoryError or StackOverflowError or anything of that sort. The symptoms are described below: Stage 1: GC r