How to run the same procedure in parallel for different parameter value.

Hi There,
I am currently working on extracting data in to flat file and I am able to do so for one revenue month (e.g. 200101) using PL/SQL procedure(get_rev_data). it takes almost 1 hour to execute the procedure completely and it generates 400 MB data file. Now I have to run this procedure for last 10 yrs of data (i.e. 120 revenue months) . my prolem here is to figure out a way/logic in such a way that I can run the procedure in parallel for each revenue month and at the same time it will write the data in respective data file for each revenue month. so the final result of this exercise would be 120 flat files, one for each revenue month with file names like
EXTRACT_00001001 to EXTRACT_00001120.
where
first five digits : 00001 will indicate the Extract run number and
last three digits : 001 will indicate the thread number for each run.
I am thinking of doing this by creating a table "RevMonth" with two values (revenue_month, thread_num) and calling the procedure in a simple select statement and passing revenue_month as parameter of the procedure like
SELECT get_rev_data(revenue_month, thread_num)
FROM REVMONTH;
But I am not sure if that will do the needful. Any idea on how to achieve this will be of great help. Thank you.

Hi Smit,
Thanks for the advise. I am not planning to run for all 120 months at once. actually I am planning to run like 1 year (12 revenue months at a time). I am not sure if that will work well but I was planning to run this through shell script (Unix) and will call the same procedure with different parameter (revenue_month and Thread_number) values and see what happens. I hope that will run in parallel for each revenue month.
Let me know if you have more knowledge about it. THanks a lot.
Thanks,
.

Similar Messages

  • How to own the same e-mail-address for different Apple-IDs

    Hello
    I’m under the impression, that I can’t use the same e-mail-address for iCloud I used already in my Apple-ID for iTunes, because I get no verification mail for the iCloud account. Is this correct or did I something wrong?
    Thanks for supporting me
    I already raised this question in the iCloud forum, but till now nobody answered - may be the wrong sub-forum

    Many thanks for the answer - that's what I suspected. Anyway...
    The problem I have now is, that my Apple-ID I used already for some years in order to buy apps is in the "old" format (e.g. duggy832), that means not in the form of an eMail-address. iCloud accept only Apple-IDs in the “new” format meaning in the form like an eMail-address (e.g. [email protected]).
    So it needs to modify the old Apple-ID from duggy832 to [email protected] or to “transfer” – if possible – my shopping from Apple-ID duggy832 to [email protected]
    Which way is possible, which is safe/secure, which is recommended?
    Thanks in advance

  • Running the same code multiple times with different paramters automatica​lly

    Hi guys,
    I want to run the same code multiple times with different paramters automatically. Actually, I am doing some sample scans which takes around 2 hours n then I have to be there to change the paramters and run it again. Mostly I do use folowing paramters only
    X_Intial, X_Final, X-StepSize
    Y_Intial, Y_Final, Y-StepSize
       Thanks,
    Dushyant

    All you have to di is put all of the parameters for each run into a cluster array. Surround your main program with a for loop and wire the cluster array through the for loop. A for loop will autoindex an input array so inside the for loop you just have to unbundle the cluster to get the parameters for each run.
    Message Edited by Dennis Knutson on 07-13-2006 07:50 AM
    Attachments:
    Cluster Array.JPG ‏9 KB

  • How to run the setup tables in CRM for 0CRM_LEAD_I datasource.

    Hi all,
    How to run the setup tables in CRM for 0CRM_LEAD_I datasource.
    what is the tcode and steps to follow.
    Thankyou.

    you dont have to do set up tables for 0CRM_LEAD_I.
    run the init infopack in BW and then subsequent delta's

  • How to know the optimal Degree of Parallelism for my database?

    I have an important application on my databae (Oracle 10,2,0) and the box has 4 CPU. All the tables are not partitioned. Should I set the parallel degree by myself?
    How to know the optimal Degree of Parallelism for my database?

    As far as I am concerned there is no optimal degree of parallism at the database level. The optimal value varies by query based on the plan in use. It may change over time.
    It is not that difficult to overuse the PQO and end up harming overall database performance. PQO is a brute force methology and should be applied carefully. Otherwise you end up with inconsisten results.
    You can let Oracle manage it, or you can manage it on the statement level via hints. I do not like specifying degrees of parallelism at the object level. As I said, no two queries are exactly alike and what is right for one query against a table may not be right for another query against the table.
    If in doubt set up the system to let Oracle manage it. if what you are really asking is how many PQO sessions to allocate then look at your Statspack or AWR reports and judge your system load. Monitor v$px_session and v$pq_slave to see how much activity these views show.
    IMHO -- Mark D Powell --

  • Run the same procedure many times in parallel but no more than 10 at a time

    I have a table filled with individual such criteria and want to run a stored pl/sql procedure to run searches on an external server on each of them. The stored procedure deals with the API and the external server can handle the concurrency.
    I want to be able to the multiple searches concurrently (ie. run the stored procedure concurrently) but no more than 10 concurrent searches at a time (There are 20,000 searches to complete).
    I'm thinking this should involve AQ whose messages call "run once" event based jobs from the Scheduler (I'm running on 10g) but I am very new to Oracle and hence not sure where to begin.
    If somebody could fill in my obvious blanks and give me an approach that will actually achieve my end I would be extremely grateful!
    Cheers, Kim.

    > I'm hoping that each of my "spawned threads" (Jobs)
    will insert all outputs into the same table (I don't
    mind them waiting on each other as it is the
    searching that is the real bottle neck). Is this
    going to be a spanner in the works?
    Inserts into the same table is not a problem. The typical problem is spawning multiple copies of the same PL/SQL proc to update the same table. Somehow each PL/SQL proc needs to find itself a unique set of rows to lock and process - without impact its fellow processes. Using ROWNUM ranges for example does not work in this case.
    The search implies I/O. This is good and bad.
    Good in that the only real way to speed up a ton of I/O (assuming that the ton of I/O is non-negotiable and must happen) is to perform the I/O in parallel. I/O is the slowest operation on a db platform due to I/O latency. And this parallel I/O processing exactly what Oracle does with Parallel Query (PQ).
    The bad is that more processes means a bigger resource footprint and one needs to figure out just what the optimal size is.
    Oracle PQ has a very simplistic mechanism - it allows you to specify the number of PQs that can be spawned (and if on a a cluster, on how many nodes) per table. It also allows you to specify a PQ process pool ceiling.
    But this is fairly primitive as you still need to figure out (in some way) what the optimal PQ sizes are per table.
    The bad is that you either need to do something primitive and similar to PQ - which means a manual monitoring and tuning - or you need to try and automate it. Which in itself can be very interesting, but complex to develop and often quite difficult to get right.

  • How to run the same SSRS report multiple times, each time with a different parameter value?

    Hi,
    I have an SSRS report that produces a list of invoices for a single supplier (so supplier is a parameter specified at runtime). The report is based on a stored procedure in SQL. I would like to make things easier and instead of going through all suppliers
    one by one, I want to have a single action, which produces separate reports, per supplier, for all suppliers that have an outstanding invoice (so not all suppliers on the system as a whole but all suppliers that are within the result set of the stored procedure).
    I assume this would mean first executing the stored procedure to find all suppliers that have invoices at the time. And then running the report multiple times, once for each supplier, where the supplier value is used as the parameter every time. ideally
    this would open separate webpages with a single report per page. (I am creating a button in another software, which is simply launching iexplore.exe and passing a
    fixed SSRS report URL).
    What would be required? I have SQL 2012 and I am building this in Report Builder 3.0.
    Thank you!
    Dimitar
    P.S. What about still running ONE report, but every supplier starting on a new page? Is that more realistic? So supplier will not be a parameter any more, but just something that creates a new page on the report?

    What
    about still running ONE report, but every supplier starting on a new page? Is that more realistic? So supplier will not be a parameter any more, but just something that creates a new page on the report?
    Yes thats a much better option. Its very easy to generate such a report in SSRS. You dont need a parameter
    in that case but just needs to add Supplier as a grouping field in the tablix. Then add other columns and groups if required. Select option set page break after each instance of the group for first grouping (ie based on supplier field). Then report will render
    with one page per supplier. On exporting to excel also each supplier data goes to a different tab
    Here's a similar requirement I did for one of my projects
    http://visakhm.blogspot.in/2013/10/using-ssrs-to-export-sqlserver-data-to.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to run the same report at report runtime?

    i have this report that is automatically run when choosing the icon at reports runtime.
    its it possible that i can run the same report without having to exit the runtime?! can i display the run button on the toolbar?
    i need help on this! thanks

    What
    about still running ONE report, but every supplier starting on a new page? Is that more realistic? So supplier will not be a parameter any more, but just something that creates a new page on the report?
    Yes thats a much better option. Its very easy to generate such a report in SSRS. You dont need a parameter
    in that case but just needs to add Supplier as a grouping field in the tablix. Then add other columns and groups if required. Select option set page break after each instance of the group for first grouping (ie based on supplier field). Then report will render
    with one page per supplier. On exporting to excel also each supplier data goes to a different tab
    Here's a similar requirement I did for one of my projects
    http://visakhm.blogspot.in/2013/10/using-ssrs-to-export-sqlserver-data-to.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to use the same apple id on two different iphones with different sync?

    Hi all,
    I own an iPhone 4s for personal use. Soon my company is going to give me a business phone and I can choose to have another iPhone. I'd love it but I don't know if what I wanna do is possible.
    Let's say I will have iPhone P (personal) and iPhone B (business) and Apple ID MyID.
    At the moment on iPhone P with account MyID I have application App1, App2, ... App9, I have contacts Cont1, Cont2, ...Cont9, I have songs Song1, Song2, ... Song9. All these are synced on my personal PC via iTunes and stored in the iCloud.
    When I'll get iPhone B I'd love to be able to use on it my Apple ID MyID and to sync it with my business PC (so NOT the same one I use for iPhone P).
    The configuration I'd love to have would be the following.
    iPhone P
    - Applications: App1, App2, App3, App8, App9
    - Contacts: Cont1, Cont2, ... Cont9
    - Songs: Song1, Song2, ... Song9
    iPhone B
    - Applications: App4, App5,App6, App7, App8, App9, App10 etc.
    - Contacts: Cont1, Cont2, Cont10, Cont11, ..., Cont20
    - Songs: Song1, Song2, Song10, Song11, ... Song20
    So will it be possible using the same Apple ID MyID on both iPhones to have this configuration? Some apps, contacts and songs in common and some differents?
    If so, how should I configure the two iPhones and the two PCs?
    Kind regards.

    If you use the same Apple ID for iCloud on each device, yes. However, you can use the same Apple ID for iTunes content on each device, but different Apple ID's for iCloud, iMessage, FaceTime, etc., on each device. That way, you can have whatever iTunes content you want on each phone, but keep all of the other data separate. You can create another Apple ID here:
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/wa/createAppleId?loca lang=en_US
    Must be a verified email address.

  • How to edit the same iWeb site on 2 different Macs?

    How can I edit the same iWeb site on 2 different Macs? I know we create a folder with the files, but when copying that to Mac2, iWeb on Mac2 doesn't see that folder - I can't see what the linkage is between the app's interface and the folder of site files....

    The answer is Domain.sites (extension hidden by default). You'll find this on the Mac you used to create the site at Users/YourUserName/Library/Application Support/iWeb. Copy that file to removable media and drag it to the same location on the other Mac. Launch iWeb and you'll see the site structure in the Site Organizer.
    Once you keep the Domain package in sync between the two machines everything will work smoothly no matter which you use. There's a neat tip here which may help in this respect, but you use whatever strategy you prefer:
    http://discussions.apple.com/message.jspa?messageID=1525121#1525121
    [ Visit here for iWeb Tips, Tricks and Hacks ]

  • How to define the same font size,color for a text field label

    hi all,
    In my project i need to define the same font size & color for all the text field lables in the application.how do we can achieve this?
    Thanks & regards,

    ...or you could use declarative components....
    Not sure if skinning would prevent developers from overriding a look and feel??? hmmm not sure..
    Grant

  • How to run the same license on two computers?

    Hello,
    I have searched around a bit for answers to my questions without luck so far.
    I have used Adobe Lightroom 3 & 4 on my computer for years. Now I have purchased a laptop computer as well. I am the only user of both computers. As I understand the end user license agreement, I am allowed to use the same license on both of my computers.
    Is this straightforward? Do I just install LightRoom 4 with the serial number from the purchase? LR4 was an upgrade from LR3. Do I need to install LR3 first, or just use both serial numbers?
    I will also like to upgrade my standalone computer from Windows 7 to Windows 8. I have actualle tried the upgrade process, and was told it failed, and that I need to do a complete (fresh) installation of Windows 8 (after formatting the computers disk).
    Will I be able to do this? My preferred "end result" is running LR4 on both computers with Windows 8, although a fresh installation of Windows 8 on the standalone computer.
    I am also considering purchasing Adobe Acrobat. Will I be able to run that as well on both computers?
    What if I replace the standalone with a new computer one day - will I be able to move the license from the "old" one?
    I would appreciate an answer to this post.
    Best Regards,
    Svein A. Martinsen

    As you already indicated your awareness, you are allowed to install and activate Adobe software on two machines.  You should only need to install and then activate.  If you have the discs, then go that way.  I f you do not have discs, download the version(s) and use your serial number from your original purchase to activate.
    As far as changing from Windows 7 to Windows 8 goes, that's generally beyond the calling of folks here.  I personally would not upgrade an OS, having done it once in the past and regretting it every day after that - I now prefer to live with what came with the machine.  You might find older software is not compatible with Windows 8 and there is nothing anyone here can do to change that.

  • How to run the same instance of oracle 10g on another computer

    hello everyone sorry for my ignorance. I have downloaded oracle 10g express edition on 2 computers however when i login using sql developer i get two different instances of oracle databases. What file do i need to change on one of the computers so that when i log in through sql developer im always on the same database. Is there are tns.ora file that i need to make the same on my other machine? Any help would be appreciated.

    user633029 wrote:
    I have downloaded oracle 10g express edition on 2 computers however when i login using sql developer i get two different instances of oracle databases. What file do i need to change on one of the computers so that when i log in through sql developer im always on the same database.Hi!
    I'm not sure does I understand your requirement good?
    But if so:
    You have 2 computers and from both you want to access one single Oracle database.
    If this correct then you need only on one machine to install XE Server and on another machine ONLY XE Client.
    After that you need to copy tnsnames.ora file from computer where XE server resides to according directory where XE client resides.
    HTH

  • How can I use the same thread pool implementation for different tasks?

    Dear java programmers,
    I have written a class which submits Callable tasks to a thread pool while illustrating the progress of the overall procedure in a JFrame with a progress bar and text area. I want to use this class for several applications in which the process and consequently the Callable object varies. I simplified my code and looks like this:
            threadPoolSize = 4;
            String[] chainArray = predock.PrepareDockEnvironment();
            int chainArrayLength = chainArray.length;
            String score = "null";
            ExecutorService executor = Executors.newFixedThreadPool(threadPoolSize);
            CompletionService<String> referee = new ExecutorCompletionService<String>(executor);
            for (int i = 0; i < threadPoolSize - 1; i++) {
                System.out.println("Submiting new thread for chain " + chainArray);
    referee.submit(new Parser(chainArray[i]));
    for (int chainIndex = threadPoolSize; chainIndex < chainArrayLength; chainIndex++) {
    try {
    System.out.println("Submiting new thread for chain " + chainArray[chainIndex]);
    referee.submit(new Parser(chainArray[i]));
    score = referee.poll(10, TimeUnit.MINUTES).get();
    System.out.println("The next score is " + score);
    executor.shutdown();
    int index = chainArrayLength - threadPoolSize;
    score = "null";
    while (!executor.isTerminated()) {
    score = referee.poll(10, TimeUnit.MINUTES).get();
    System.out.println("The next score is " + score);
    index++;
    My question is how can I replace Parser object with something changeable, so that I can set it accordingly whenever I call this method to conduct a different task?
    thanks,
    Tom                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    OK lets's start from the beginning with more details. I have that class called ProgressGUI which opens a small window with 2 buttons ("start" and "stop"), a progress bar and a text area. It also implements a thread pool to conducts the analysis of multiple files.
    My main GUI, which is much bigger that the latter, is in a class named GUI. There are 3 types of operations which implement the thread pool, each one encapsulated in a different class (SMAP, Dock, EP). The user can set the necessary parameters and when clicking on a button, opens the ProgressGUI window which depicts the progress of the respective operation at each time step.
    The code I posted is taken from ProgressGui.class and at the moment, in order to conduct one of the supported operations, I replace "new Parser(chainArray)" with either "new SMAP(chainArray[i])", "new Dock(chainArray[i])", "new EP(chainArray[i])". It would be redundant to have exactly the same thread pool implementation (shown in my first post) written 3 different times, when the only thing that needs to be changed is "new Parser(chainArray[i])".
    What I though at first was defining an abstract method named MainOperation and replace "new Parser(chainArray[i])" with:
    new Callable() {
      public void call() {
        MainOperation();
    });For instance when one wants to use SMAP.class, he would initialize MainOperation as:
    public abstract String MainOperation(){
        return new SMAP(chainArray));
    That's the most reasonable explanation I can give, but apparently an abstract method cannot be called anywhere else in the abstract class (ProgressGUI.class in my case).
    Firstly it should be Callable not Runnable.Can you explain why? You are just running a method and ignoring any result or exception. However, it makes little difference.ExecutorCompletionService takes Future objects as input, that's why it should be Callable and not Runnable. The returned value is a score (String).
    Secondly how can I change that runMyNewMethod() on demand, can I do it by defining it as abstract?How do you want to determine which method to run?The user will click on the appropriate button and the GUI will initialize (perhaps implicitly) the body of the abstract method MainOperation accordingly. Don't worry about that, this is not the point.
    Edited by: tevang2 on Dec 28, 2008 7:18 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Running same scenario in parallel for different values

    Hi all, I have a requirement that,on a high level, calls for running a scenario "in parallel" for a set of values that are passed into it. To break it down, say you have a scenario that does some processing (could be anything), and in order to do this processing, it needs a list of values (say 1, 2 and 3). What we need is that the scenario runs for these three values at the same time, the reason being it may run 10 mins for 1, 20 mins for 2, and 10 mins for 3 and we don't want to wait for it to finish for 1 and move onto 2 and finish 2 and then move on to 3. In order to test this can be done, ideally we'd like to see in the operator that when the scenario is kicked off, it is running for all three values simultaneously. Please gurus, if there is any way this can be achieved, do let me know.
    Thanks so much!

    Hi Bhabani, Thanks for your response. I think you've understood the requirement perfectly. It will generate different sessions for each loop. What I'm trying to test here is whether each of those sessions will be launched at the same time. Using the asynchronous mode should, in theory, ensure that they are but how can we verify this? Is there anything we can include in the package (maybe some Odi Tool) that will visibly show that all the sessions have been kicked off?
    Appreciate your help!

Maybe you are looking for