Execute 4 jobs at the same time

Hello guys,
Is it possible with DBMS_SCHEDULER to execute 4 jobs at the same time. I'd like to use DBMS scheduler to refresh 4 different materialized view at the same time. After that, I'd like to start another job if they refreshed correctly.
So, can this be achieved?
Thanks for your help

It can be achieved using a chain job. Here is how you would do it:
Call DBMS_SCHEDULER.create_program to create 5 programs corresponding to the 4 MV jobs + the one extra job.
Call DBMS_SCHEDULER.create_chain to create a new disabled chain.
Call DBMS_SCHEDULER.define_chain_step to create 5 chain steps corresponding to the 5 programs you created earlier.
Call DBMS_SCHEDULER.define_chain_rule to create 3 chain rules:
-- Rule1:
condition => 'TRUE'
action => 'START step1, step2, step3, step4'
-- Rule2:
condition => 'step1 SUCCEEDED and step2 SUCCEEDED and step3 SUCCEEDED and step4 SUCCEEDED'
action => 'START step5'
-- Rule3:
condition => 'step5 SUCCEEDED'
action => 'END'
Call DBMS_SCHEDULER.enable to enable the chain.
Call DBMS_SCHEDULER.create_job to create the corresponding chain job of type chain.
Hope that helps.

Similar Messages

  • Could Compressor run several jobs at the same time?

    everytime when I use the batch export function, I found it just will convert the clips one by one only. would it be possible to process several jobs at the same time in order to save time?
    Thanks

    Hello Jiqiu,
    Please respond back in this duplicate thread if you have further questions.
    Gerardo O.
    RF Systems Engineering
    National Instruments

  • Execute 2 processes at the same time same session

    is it possible to execute 2 (or 3, 4 would be better =) store procedures at the same time trough the same session?
    (something like parallelism)
    I need to to that, I don't care too much the result of the execution, some ideas???
    I made a store procedure that makes ping to 400 ip's but is kind of slow, I have one DB trigger to execute it, that is the reason to execute it "trough parallelism".

    MikeWasouski wrote:
    is it possible to execute 2 (or 3, 4 would be better =) store procedures at the same time trough the same session?
    (something like parallelism)
    I need to to that, I don't care too much the result of the execution, some ideas???
    I made a store procedure that makes ping to 400 ip's but is kind of slow, I have one DB trigger to execute it, that is the reason to execute it "trough parallelism".Don't use triggers. Triggers are there to guard the integrity of the data of the table. It is not the best of ideas to make use of triggers to perform other work that's not relevant to that integrity of that row's data - like sending an e-mail or pinging an IP for example.
    Triggers however can trigger work that needs to be done when a row is inserted. The triggers can schedule a DBMS_JOB. This becomes part of the transaction that trigger is subjected to.
    When that transaction is committed, the DBMS_JOB is committed for execution. When the transaction is rolled back, that DBMS_JOB is removed and not executed. Unlike doing the work in the trigger where the work is done (e.g. sending an e-mail) when the transaction can still be rolled back.
    When scheduling a once-off job, you also need to decide how you are going to deal with errors in the job. Bad firing off 400 jobs to ping IPs and your code is broken somewhere (run-time error) and have these 400 job executing (and failing) 16x times each, before clogging up the job queue as broken jobs.

  • Avoid 2 instances of a BPEL process executing an activity at the same time?

    Hi,
    Is there a way I can avoid execution of an activity from two or more different instances of the same BPEL process at the same time?
    I would like to know if I can lock the activity across BPEL instances so that only one instace can execute an activity at a time?
    Kindly give me possible ways I can achieve this? We are using BPEL PM 10.1.2.
    Thanks,
    Sasi Bhushan

    As HEWizard said, you need to look at 'singleton'
    http://blogs.oracle.com/matt/2006/08/23
    http://orasoa.blogspot.com/2007/05/create-singleton-process.html
    the idea behind a singleton is you can only make one instance of the process. In the process you can handle the sap-activity.

  • Execute several workitems at the same time

    Hi everybody, we are implementing the Release Payment Funcionality, but due to a big volume of workitems it's necessary to execute a lot of workitems at the same time.
    I mean, we manage 3000 workitems per week and all of them follow a procedure in wich in some cases there is only one "Releaser", so he needs to release payments in a mass way.
    Is it possible to do that??
    Regards

    If the Approval step is a User Decision, the Approver can first select all that he/she shall Approve or, all that he/she shall Reject, or whatever other options you configure. 
    Once selected, click on the "Execute" button found on the toolbar immediately above the list of workitems in the Business Workplace.
    The Approver will then be presented with the User Decision for the first selected work item.  Now, whatever choice he/she wants applied to this and all selected work items, they should click it.
    Next, the Approver will be prompted with a question asking if they want the same choice applied to the selected work items that remain.
    I don't suggest this method for all 3,000 at once, but in a pinch, for a few hundred at a time, it works pretty well.
    Hope this is relevent...apologies if not.
    Tom Carruth

  • Will USB-6251 execute multiple tasks at the same time?

    Hi all,
    I have an application controling an experiment and logging data using a USB 6251. One measurement uses Two Edge Seperation , and takes a while to complete (20 to 30 seconds). Meanwhile I need to execute another task repeatedly to sense a digital input pin. Does anyone know if the USB 6251 can execute a second task while it's busy doing the edge seperation task? So far I haven't found anything in the documentation or on the forums.
    BTW I can't just 'try it and see', or at least it's very tricky to do so. The control system is at the top of a scaffold tower, a long way from my development system. Every code change has to be deployed and installed to test it.
    I recomend you avoid such an installation if you can  )  It makes for a tough time debugging.
    Thanks for any help.
    Bandit.
    Message Edited by Bandit on 03-20-2007 12:05 PM

    A small addition to YatimM's answer
    You can execute two tasks together as long as they are not accessing the same channels or digital lines.
    For acquisiton on analog input channels, you cannot execute 2 tasks simultaneously even if they scan for 2 seperate sets of channels
    For Ex: task 1: acquiring from analog channels 0 to 3 and task2 : acquiring from analog channels 4 to 6, will still give a 'device reserved' error, because a single ADC is available and used for multiplexing all channels in a task/ scan list and the second task will give up this error

  • Executing two commands at the same time from Runtime.getRuntime

    Hi everybody,
    I m executing a command of imageMagic from javacode to crop and for changing the quality of image.The code is as below :
    String changeQuality = new String("convert " + originalImage
                        + " -crop " + imageWidth + "x" + imageHeight + "+" + imageX
                        + "+" + imageY + " -quality " + quality + " " + finalImage);
                   Runtime.getRuntime().exec(changeQuality);
    But before going to next page of jsp I want the size of the finalImage. So I m calling a new function from the base file, from which i m calling the above function, for getting the size of image:
    public String getSize(String finalImage) {
                   proc = Runtime.getRuntime().exec("identify " + finalImage);
    As identify cmd gives the size and various values of image but this command is showing the size zero. and if try to read the file then it shows FileNotFoundException.It means the file is not on the server.
    What should i do to execute both the command and getting the right result.
    Any help is appreciated.
    Thanks in advance.
    Vivek Kumar Gupta

    Hi everyone,
    Nobody ans my question but finally i got the ans of my question.
    I use a input stream for reading the first one imagemagic command. through this the second command execute after the first command finished its execution.
    And my images are now displaying without error.
    I know now you all are thinking how great mind I am!!! hai na
    Hmm woh to main hoon.
    post a question if u have over here. Perhaps i can solve your prob.

  • Illustrator CS6 crashes when 40 or more files are open at the same time

    Windows 7 SP1, Illustrator CS6
    The end users spends 7 hours of their 8 hours in Illustrator. As part of the job, they have to have over 40 different files open at the same time because they are working on several jobs at the same time as well as working forward. So the answer is not "they have to close some files". This, unfortunately, is not an option.
    We recently upgraded them to CS6. They said that version CS5 was fine and didn't crash like this. But Illustrator CS6 crashes on them, closes itself, and obviously they lose all unsaved changes (saving the changes isn't a choice either, because the files are shared and have to stay original).
    The only modification we've done to the program is to UNcheck "Append" in the preferences.
    This happens on all 3 computers for all 3 users, so I don't believe it to be end-user related.
    Does anyone out there know of a way to get Illustrator to stop crashing?
    Is there a specific limit on the number of files that can be open?
    Thanks,
    Spencer

    No, they aren't working on the same files. All 3 employees are working on different files.
    They are all on Dell Optiplex GX745 with 4 Gb of RAM.
    The crashes are at different times, not all 3 crashing at the same time. Therefore, I don't believe network is the cause of the issues. Also, it didn't crash on CS5, but now it does on CS6.
    What I'm looking for are possible settings within Illustrator CS6 that I can tweak to make it a more stable program.
    Thanks

  • Dbua upgrading multiple db at the same time

    hi
    in rac environment is it possible to run multiple dbua to upgrade 2 db's at the same time ? they both share the same rac db home.. i dnt think if its possible to run both from nodea but what if i run one from nodea and one from nodeb? will that work ?

    in rac environment is it possible to run multiple dbua to upgrade 2 db's at the same time ?Yes you can execute two binaries at the same time.
    they both share the same rac db home.. DBUA will upgrade database not ORACLE_HOME so if you are going to upgrade you will stop the database.
    i dnt think if its possible to run both from nodea but what if i run one from nodea and one from nodeb?It will happen because before upgrading you need to shutdown, so it is possible
    will that work ?Yes but very careful .. :)

  • I am in the middle of a job using CS 6, but at the same time opening the Creative Suite apps.  I created an InDesign file in CS 6, saved it, and now I can't open it. I'm getting this message: Cannot open file because it was saved with a newer version of A

    I am in the middle of a job using CS 6, but at the same time opening the Creative Suite apps.  I created an InDesign file in CS 6, saved it, and now I can't open it. I'm getting this message: Cannot open file because it was saved with a newer version of Adobe InDesign CC (10.1). You must use that version or later to open the file." AARRGGHH! So how do I access the file?

    Sounds like you opened and saved it in CC, so now you need to go back to CC and either complete the project there, or export to IDML to take it back into CS6.

  • I am doing two people's jobs and I need to use two separate log-ins on the same website. How can I keep both log-ins open at the same time. Everytime I switch tabs I have to log in again.

    I am doing two people's jobs and I need to use two separate log-ins on the same website. How can I keep both log-ins open at the same time. Everytime I switch tabs I have to log in again.

    Try one of these extensions for multiple cookie sessions.
    Multifox: <br />
    http://br.mozdev.org/multifox/ <br />
    Cookie Swap extension: <br />
    https://addons.mozilla.org/firefox/3255/ <br />
    Cookie Pie extension: <br />
    http://www.nektra.com/oss/firefox/extensions/cookiepie/

  • Execute more than one thing at the same time.

    Hey why every time i want to execute more than one thing(create tables) at the same time
    it say "ORA-00911: invalid character" , i dont wanna execute one thing at a time. check the pic please
    http://img370.imageshack.us/img370/5120/oraclesw5.jpg
    but in my school i use something called isqlplus and i can execute all the things i want at the same time with-out any error.
    im using right-know
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production

    1) Unless you are using something like DBMS_JOB, SQL*Plus, iSQL*Plus, the Oracle XE web-based front-end, or any other application is going to execute one SQL statement at a time.
    2) There is a dedicated XE forum-- the folks over there might know how to run a script using this particular front-end.
    3) Assuming the XE database is on your local system, you should be able to log in via SQL*Plus and use that utility to run your scripts.
    Justin

  • Can RMAN backup and export datapump executed at the same time?

    Hello,
    I have several databases that I backup using RMAN and export datapump everynight starting at 6PM and end at Midnight. The backup maintenance window doesn't give me enough time for each database to run at different time. I am using crontab to schedule my backups. Since I have so many databases that need to be backed up between 6PM - Midnight, some of the export and RMAN backup scripts will execute almost at the same time. My question is can my export data pump and RMAN backup scripts run at the same time?
    Thank you in advance.
    John

    Needs must. If you don't run expdp parallel then it doesn't use that much. If it was really killing the system then look into setting up a Resource plan that knocks that user down but this is a big step.
    I woud better look into using Rman
    system incrementals, and block change tracking, to minimize your RMAN time.
    Regards
    If your shop needs to do both simultaneously then go for it.
    Chris.
    PS : One of my shops has maybe 20-30 rmans and pumps all kicking off some simultaneous, some not, from 0000 to 0130. No complaints from users and no problems either. Go for it.
    Edited by: Chris Slattery on Nov 25, 2012 11:19 PM

  • Event based scheduler job - 2 events at the same time only 1 run

    Hi,
    i converted our dbms_job - jobs to the newer package dbms_scheduler.
    It is a 10.2.0.4 patch 23(8609347) database on an windows server 2003 R2 Enterprise x64 Edition SP2.
    The Jobs(about 130) are nothing special ... only some statistics, matview-refreshes and so on.
    For the notification of failed jobs and jobs which run over the max_run_duration i downloaded and installed the job notification package.
    The jobs are assigned to different departments and the corresponding developer teams in our company.
    I created a notification job for each department and if a job fails we (the database administrators) and the corresponding deverlopers will be informed.
    Now i ascertained that only 1 email will be send if 2 jobs of the same department fails at the same time.
    The emailer-jobs are auto-generated by the job notification package. I only modified them to look after all jobs of special department and not only after one job. (--> event_condition ... object_name LIKE 'XXX%')
    example for dba-jobs(copy of the script output of TOAD):
    SYS.DBMS_SCHEDULER.CREATE_JOB
           job_name        => 'DBA_JOBS_EMAILER'
          ,start_date      => NULL
          ,event_condition => tab.user_data.object_name LIKE ''DBA%'' AND tab.user_data.event_type in (''JOB_FAILED'',''JOB_OVER_MAX_DUR'')'
          ,queue_spec      => 'SYS.SCHEDULER$_EVENT_QUEUE, JOB_FAILED_AGENT'
          ,end_date        => NULL
          ,program_name    => 'SYS.EMAIL_NOTIFICATION_PROGRAM'
          ,comments        => 'Auto-generated job to send email alerts for jobs "DBA%"'
        );I thought that a queue is used to manage all events from the scheduler jobs. So i made a test with 2 dba jobs and simulated a failure at the same time but i received only one mail.
    So what is happend with the second event? I looked for the events in the qtab(SCHEDULER$_EVENT_QTAB) which belongs to the event queue(SYS.SCHEDULER$_EVENT_QUEUE) and no event was missing.
    So i think the emailer job has to run 2 times.
    Is anyone able to explain or to find my mistake?
    I know that the easiest way is to create one emailer job for each normal job but i think this is a little bit costly because all the arguments are the same for one department.
    Thanks & Regards

    Thanks for your fast answer.
    You are right with the "enabled => TRUE;" part and i only forgot to post it.
    So the Job is enabled (otherwise it would not send any mail). Because it is sending one mail i think it is also not necessary to hand over a job_type.
    Additionally the job starts a program ... so it is right to set the job_type='STORED_PROCEDURE' isn't it?
    And also right ... i already added the agent as subscriber to the queue.
    Anyway i think the whole thing do what it have to do. So in my oppinion there are no big mistakes in creating the job or at adding the subscriber.
    There are also no problem in raising the events by itself and enqueue them in the scheduler event queue.
    There is only a problem when 2 jobs fails (or run out ouf max duration) at exactly the same time.
    If i understand it right:
    The agent/subscriber will find the "JOB_FAILED"-event for the first Job in the queue and starts the emailer Job.
    The agent will also find the "JOB_FAILED"-event for the second Job and wants to start the emailer Job again.
    I don't know if this is really the problem but perhaps the emailer-job can not be started in consequence of the second event because ist is already running.
    I also don't know if this is a mistake of the agent or of the emailer-job by itself.
    I only want that it runs two times (one run for each event). I my case it also doesn't matter which email is send at first.

  • Prevent Jobs Running Twice at the same time

    Hi all, I would like to know if they are any ways to prevent a release job to run twice at the same time. For exemple, if  I create a job to run every 5 minutes and the job did not finish after 5 minutes, the scheduler will start the same job agains.  This situation causing us bad issues.
    I double check the job start conditions in sm37 but I found nothing special.
    Thanks for help

    Hi Marc,
    We use a workaround. We have asked our abap developpers to write a small utility report which checks if the job it is part of is already running and aborts the job if it is the case.
    When we need a job which must absolutely run only once at the same time, we just add this utility as first step.
    Regards,
    Olivier

Maybe you are looking for

  • New Ink Cartridge but can not print out/copy any document.

    I have HP Printer Deskjet 1050. I've just bought 1 x Original HP Ink Cartridge Colour Black No.61 that can be used as well for my HP Deskjet 1050 (because I could't get No.802 Black Cartridge). I have pulled out the empty one and pushed the new one i

  • Lightroom not working on Macbook Pro (2014)

    I've just bought a new Macbook Pro, 2.8 Ghz i7, and I've installed Lightroom 5.6 via the Creative Cloud. Everytime I open the software, after the splash screen, all I've got is a grey window (where the actual software should be displayed). Also, I've

  • L8 Autoloader not displaying S/N

    We have an L8 Autoloader with the 320GB SDLT. When connected up to the system, it does not display the s/n. The S/N is on the physical unit but manager is requesting it display correctly on system so it does not need to be removed from cabinet when v

  • Where to Purchase OSX Snow Leopard 10.6.3

    Hello, I lives in india, and there is no way to get SNOW leopard 10.6.3 DVD here. i tried it Apple store, it costs $29 isn't very expensive. But they ships in US only, Could any one please tell me where can i find OSX Snow Leopard 10.6.3, i tried in

  • Bug report about Erase Application from disk

    Hi, Steps to reproduce this problem : - only jdev11tp2 opened in Windows - create a new Application Workspace - from the 'Application Menu' icon, choose 'Erase Application from disk' ==> the Application directory is remove from IDE but not erased fro