Parallel execution of same program with different parameters.

Is it possible to start the same plsql routine parellelly from PLSQL.
Begin
prog1 1 1000
prog1 1001 2000
prog1 2001 3000
End;
I mean to say something like in Unix where in you can
prog1 1 1000 &
prog1 1001 2000 &
prog1 2001 3000 &
Thanks.

There are two methods in Oracle. DBMS_JOB and DBMS_SCHEDULER. These are APIs that allows you to create background PL/SQL processes.
Details on both APIs are in the [url http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/toc.htm]Oracle® Database PL/SQL Packages and Types Reference guide.
Example (using DBMS_JOB):
declare
jobID number; -- job ID returned by DBMS_JOB for scheduled job
begin
-- schedule 3 jobs for starting at SYSDATE, as once off jobs as we
-- do not specify any interval
DBMS_JOB.Submit( jobID, 'prog1 1 1000;,' SYSDATE );
DBMS_JOB.Submit( jobID, 'prog1 1001 2000;,' SYSDATE );
DBMS_JOB.Submit( jobID, 'prog1 2000 3000;,' SYSDATE );
-- only when these job submissions are committed, will the job queue
-- processing pool see these jobs
commit;
end;

Similar Messages

  • Messed up response to calls to same servlet with different parameters

    Hi,
    I am facing a very strange problem on our production server which is a tomcat 3.2.3 and mod-jk . We have a servlet that recieves a couple of parameters and returns the page contents based on those parameters. Now, if two users call the servlet with their own (different) parameters, sometime the result for one user goes to another one and vice versa.
    For example, if user 1 calls :
    http://www.mydomain.com/servlet/DynamicPageBuild?siteID=577&categoryID=69&catName=
    and user 2 calls (note the difference in parameters) :
    http://www.mydomain.com/servlet/DynamicPageBuild?siteID=781&categoryID=54&catName=
    SOMETIMES the result of first request ends up going to user 2's browser or vice versa!
    Anyone PLEASE any ideas of why this is happening?

    When this happens there are two threads in the servlet container, and both of them are (simultaneously) running the same instance of the servlet. So if your servlet has instance variables, both threads (the two users) are accessing and changing the same instance variables... remember, there's only one instance of the servlet.
    So if you change your servlet logic to use local variables (the ones declared inside a method) instead of instance variables, that would probably solve your problem (although it could be more complicated than that). Each thread would have its own copy of the local variables, and there would be no conflict.

  • Same sqlID with different  execution plan  and  Elapsed Time (s), Executions time

    Hello All,
    The AWR reports for two days  with same sqlID with different  execution plan  and  Elapsed Time (s), Executions time please help me to find out what is  reason for this change.
    Please find the below detail 17th  day my process are very slow as compare to 18th
    17th Oct                                                                                                          18th Oct
    221,808,602
    21
    2tc2d3u52rppt
    213,170,100
    72,495,618
    9c8wqzz7kyf37
    209,239,059
    71,477,888
    9c8wqzz7kyf37
    139,331,777
    1
    7b0kzmf0pfpzn
    144,813,295
    1
    0cqc3bxxd1yqy
    102,045,818
    1
    8vp1ap3af0ma5
    128,892,787
    16,673,829
    84cqfur5na6fg
    89,485,065
    1
    5kk8nd3uzkw13
    127,467,250
    16,642,939
    1uz87xssm312g
    67,520,695
    8,058,820
    a9n705a9gfb71
    104,490,582
    12,443,376
    a9n705a9gfb71
    62,627,205
    1
    ctwjy8cs6vng2
    101,677,382
    15,147,771
    3p8q3q0scmr2k
    57,965,892
    268,353
    akp7vwtyfmuas
    98,000,414
    1
    0ybdwg85v9v6m
    57,519,802
    53
    1kn9bv63xvjtc
    87,293,909
    1
    5kk8nd3uzkw13
    52,690,398
    0
    9btkg0axsk114
    77,786,274
    74
    1kn9bv63xvjtc
    34,767,882
    1,003
    bdgma0tn8ajz9
    Not only queries are different but also the number of blocks read by top 10 queries are much higher on 17th than 18th.
    The other big difference is the average read time on two days
    Tablespace IO Stats
    17th Oct
    Tablespace
    Reads
    Av Reads/s
    Av Rd(ms)
    Av Blks/Rd
    Writes
    Av Writes/s
    Buffer Waits
    Av Buf Wt(ms)
    INDUS_TRN_DATA01
    947,766
    59
    4.24
    4.86
    185,084
    11
    2,887
    6.42
    UNDOTBS2
    517,609
    32
    4.27
    1.00
    112,070
    7
    108
    11.85
    INDUS_MST_DATA01
    288,994
    18
    8.63
    8.38
    52,541
    3
    23,490
    7.45
    INDUS_TRN_INDX01
    223,581
    14
    11.50
    2.03
    59,882
    4
    533
    4.26
    TEMP
    198,936
    12
    2.77
    17.88
    11,179
    1
    732
    2.13
    INDUS_LOG_DATA01
    45,838
    3
    4.81
    14.36
    348
    0
    1
    0.00
    INDUS_TMP_DATA01
    44,020
    3
    4.41
    16.55
    244
    0
    1,587
    4.79
    SYSAUX
    19,373
    1
    19.81
    1.05
    14,489
    1
    0
    0.00
    INDUS_LOG_INDX01
    17,559
    1
    4.75
    1.96
    2,837
    0
    2
    0.00
    SYSTEM
    7,881
    0
    12.15
    1.04
    1,361
    0
    109
    7.71
    INDUS_TMP_INDX01
    1,873
    0
    11.48
    13.62
    231
    0
    0
    0.00
    INDUS_MST_INDX01
    256
    0
    13.09
    1.04
    194
    0
    2
    10.00
    UNDOTBS1
    70
    0
    1.86
    1.00
    60
    0
    0
    0.00
    STG_DATA01
    63
    0
    1.27
    1.00
    60
    0
    0
    0.00
    USERS
    63
    0
    0.32
    1.00
    60
    0
    0
    0.00
    INDUS_LOB_DATA01
    62
    0
    0.32
    1.00
    60
    0
    0
    0.00
    TS_AUDIT
    62
    0
    0.48
    1.00
    60
    0
    0
    0.00
    18th Oct
    Tablespace
    Reads
    Av Reads/s
    Av Rd(ms)
    Av Blks/Rd
    Writes
    Av Writes/s
    Buffer Waits
    Av Buf Wt(ms)
    INDUS_TRN_DATA01
    980,283
    91
    1.40
    4.74

    The AWR reports for two days  with same sqlID with different  execution plan  and  Elapsed Time (s), Executions time please help me to find out what is  reason for this change.
    Please find the below detail 17th  day my process are very slow as compare to 18th
    You wrote with different  execution plan, I  think, you saw plans. It is very difficult, you get old plan.
    I think Execution plans is not changed in  different days, if you not added index  or ...
    What say ADDM report about this script?
    As you know, It is normally, different Elapsed Time for same statement in different  day.
    It is depend your database workload.
    It think you must use SQL Access and SQl Tuning advisor for this script.
    You can get solution for slow running problem.
    Regards
    Mahir M. Quluzade

  • Two adf components sharing same VO with different params on same screen

    Hello everybody,
    My current problem is that I need to create a screen with multiple graphs sharing the same VO but with different parameters for each one.
    Lets suppose that I want to use EmployeesVO to show 2 graphs on the same jspx page.
    One graph will show all employee salaries for department "Marketing" and another will show all employee salaries for department "IT".
    Remember that I want both on the same screen.
    The read-only VO will look like this:
    SELECT First_Name
    , Salary
    FROM employees
    WHERE department_id = :p_dept
    To do this I did the following:
    For each graph I created one Iterator.
    For each Iterator I created one ExecuteWithParams. (one receiving "Marketing Depto" and anther receiving "IT Depto")
    For each ExecuteWithParams I created one InvokeAction .
    While running the application all graphs show the same information. All of them show only one department (the last InvokeAction in the Executables List).
    The question is: How to keep each graph with their own parameter on the same screen?
    I'm using JDeveloper 11.1.2.1 on Windows 7 x64 SP1.
    Thanks in advance!

    Why dont you add 2 instances of the same Vo in the AM. For each instance set the different VC.

  • HANA procedure call n times with different parameters

    Hi,
    I am implementing some procedures on sql script and due to parallelization reasons i would like to call the same procedure n times with different parameters being the procedure name one of the parameters.
    Which method would you advise me (xsjs, ...)?
    Thanks in advance

    This is a known issue. We plan to have a fix in a future release but there is currently no ETA that I can share with you. I would recommend that you log an SR with support so that we can track the fact that this issue is affecting you.
    Chris

  • How to load and unload same SWF with different xmlFilePath?

    I have a slideshow on my homepage and try to load and unload same instance with different xmlFilePath based on language on the same page.
    var flashvars = {
            xmlFilePath: escape("http://www.bodto.com.tr/kik.aspx"),
            xmlFileType: "OPML",
            lang: swfobject.getQueryParamValue("lang")    
            //initialURL: escape(document.location)   
          var params = {
            bgcolor: "#000000",  
            allowfullscreen: "true",
            wmode:"transparent",
            allowScriptAccess: "always"
          var attributes = {}
              swfobject.embedSWF("/swf/slideshowpro.swf", "flashcontent", "550", "400", "10.0.0", false, flashvars, params, attributes);
    Actionscript3
    var langPath = root.LoaderInfo.parameters["xmlFilePath"]+root.LoaderInfo.parameters["lang"];
    my_ssp.xmlFilePath = langPath;
    var fileType = root.LoaderInfo.parameters["xmlFileType"];
    my_ssp.xmlFileType = fileType;
    Based on above informations, how could I achieve it?

    Suddenly that code in the following gives me some error
    var langPath = root.LoaderInfo.parameters["xmlFilePath"]+root.LoaderInfo.parameters["lang"];
    my_ssp.xmlFilePath = langPath;
    var fileType = root.LoaderInfo.parameters["xmlFileType"];
    my_ssp.xmlFileType = fileType;
    Access of possibly undefined property LoaderInfo through a reference with static type flash.display:DisplayObject.
    The only code snippet works is
    var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
    for (var param in paramObj) {
       if (param == "xmlFilePath") {
          my_ssp.xmlFilePath = paramObj[param];
       if (param == "xmlFileType") {
          my_ssp.xmlFileType = paramObj[param];

  • HT2905 I have multiple album titles of the same name with different artists. How can I get them to go under one album title again?

    I have multiple album titles of the same name with different artists. How can I get them to go under one album title again?

    In iTunes(on a Mac or PC) just tap on 'Albums' rather than 'Artists' and you'll see them all together.
    You may find that there are songs mislabelled. In which case right tap on the Album or Artist and tap 'Get Info', then change to the correct name and the songs will join the rest of the songs for that Artist or Album.
    Then resync with your iPhone and all will be well.

  • How do I copy purchases between 2 itunes libraries on the same computer with different log ins and separate apple user ids?

    How do I copy purchases between 2 itunes libraries on the same computer with different log ins and separate apple user ids?

    Load the library which doesn't contain the songs and drag them into the open iTunes application window. If you need to move them between different computer user accounts, put them into /Users/Shared/.
    (74502)

  • Why can't two different users use Itunes on the same computer with different log ins

    Why can't two different users use Itunes on the same computer with different log ins

    Pmorgan5672 wrote:
    Why can't two different users use Itunes on the same computer with different log ins
    They can, but not at the same time.
    If one user left iTunes running, and another user tries to use iTunes from a different Windows user ID, that second user will get an error message.  If they really want to use iTunes, they either have to beg the first user to log in and close iTunes, or else they have to restart the computer.
    If you are asking the technical reason why, it is something about context switching.

  • CAn I run Lion and snow leopard on the same computer with different sign-ins?

    CAn I run Lion and snow leopard on the same computer with different sign-ins?

    Alternatively, partition your internal HD and dual-boot it. Do note that you have to reboot to switch back and forth. You can't do it by logging out and back in.

  • Can you have 2 ipods on the same accounts with different play list?

    Can I have 2 ipods on the same accounts with different plalists?

    Sure.  Each iPod is identified in iTunes with its own name and you configure each one as you wish:

  • Merge of two same items with different Qty in po

    Hi Experts,
    Is it possible to merge two Same items with different Quantity into 1.
    For Eg:- 2 similar  items  with qty 2 & 3 must show 5 qty appearing once.Is it possible through Transnotification what should be the query.
    Mona

    Hi Mona,
    If you want to display a Purchase Order on screen summarized by item, set the "Summary Type"  to "By Item" (by default it is "No Summary"). The PO lines will then be summarized by item with total quantity for each item.
    If you want to display it on the printout then you need to modify the PLD. It is quite easy actually. You can use the Repetitive Area Footer to display the summary of each item and set all fields in the Repetitive Area to be not visible and set the height to minimum height.
    Cheers,
    Marini

  • Same  Material with different itemcatagory groups

    We have 3rd party manufacturers that make product for company and sometimes they send the finished product back to company and other times they will drop ship it to one of our customers.
    this scenario we need to have the same material with different itemcatagory groups
    i tried to create same material with different storage locations, but it's possible but the thing is when i change the item catagory group for the material , the same is applicable for 2nd same material, my requirement is i need 2 different itemcatagory for the same material,  hope u understand my requirement
    i will be expecting your possible replys.
    Thanks & Regards
    Venkat.Dhanemkula

    Hi Venkat..
    Please explain it more clear manner..
    With whatever i have understand, i think you scenerio is manual 3rd party order processing.
    In that case the material that you normally deliver yourself but occasionally need to order from a third-party vendor, you can overwrite the item category during sales order processing.
    Keep only one material and specify the item category group NORM in the material master.
    If, as an exception, you use a third-party material, change the entry TAN to TAS in the ItCa field when processing the sales document. The item is then processed as third-party item.
    hope it helps you.
    Regards
    Harry

  • Use the same form with different button turned on in different calls

    Can I use the same form with different buttons turned on in different calls?
    Thanks!

    This is to avoid piracy. What could happen is, people could buy music, and give it away for free online. Usually it is then you buy a complete album off iTunes that it will only be available on one device. It is tied to that account, and the device must be registered to that account to listen to it.

  • HELP!! Authorization in the same laptop with different operation systems

    My BF installed Win 7 operation system on his laptop yesterday and re-authorized it when he used iTunes. However, when he finished authorization, a dialog block showing that "*Including this one, you have authorised two computers out of your available 5*" appeared; what's worse, when he connected his iPhone to the laptop, it deleted all the bought apps in the iPhone, instead of synchronizating.
    I also want to install Win 7 operation system, but I'm afraid that the same thing would happen again (to my iTouch).
    We're quite confused that why the authorization in the same laptop with different operation systems is counted as two times. Friends who know please tell us whether this is the case.. If not, please tell us how to deal with it as we frequently re-install operation system for quicker operation.
    Message was edited by: Shiwen
    Message was edited by: Shiwen

    It's the *operating system* that is authorised, not the particular user profile or the hardware. Before upgrading/reinstalling deauthorise and you won't run out...
    tt2

Maybe you are looking for