How to enforce order of execution of parallel tasks?

How do I set the order of execution of parallel tasks in a container?
The execution isn't truly random. It appears to be set to a random constant at package creation.
Demo
I set up a dummy package.
Max concurrent executions = 1
sequence container with four script tasks that do a thread.sleep
The tasks always execute in the order 4, 2, 1, 3. Closing/opening the solution makes no difference to the order of parallel execution.
Is there a way i can change the execution order? Do I need to change the guid/id of the object (tried this but it invalidates the xml) or is there an order somewhere else in the XML?
I've found a hack/workaround but it's a bit ugly so I'm wondering if there's a way to do it without adding dummy tasks.
Basically if i create a dummy start task and then drag off "on success" constraints to each of the four threads, the threads will execute in parallel in the order in which i created the constraints
Why do i want to do this? I have a number of parallel tasks in a sequence container where three will take a long time and the rest won't take as long.
I'll minimise the time required for the execution of container by using parallel tasks AND controlling the queue order (longest first). It won't matter whether I have 1 logical cpu or as many logical cpus as i have tasks.
Thanks
Jakub @ Adelaide, Australia

I think the problem you are trying to say is 
a) You have multiple tasks( i assume 10) now out of these 3 execute slowly.
b) You done have any constraints for task execution, so what you want to achieve is that the 7 task should continue without waiting for the other 3 in your case the 3 are starting up earlier and other 7 are not able to start as a result.
AS arthur pointed out these are 2 diff things constraints and parallel execution, and there would always be some task which would be started at some point of time.
But if you know in advance some tasks are going to take time, i would suggest keep 2 diff sequence containers in 1 keep the 7 tasks which runs fast in another one keep the other 3 which tend to run slow
Abhinav http://bishtabhinav.wordpress.com/

Similar Messages

  • How to maintain order of execution of the Queries in Data Model

    Hi,
    I have 5 queries in the Data Model
    Query_1 will fetch some values based on the selection criteria and inserts values in a table(say Table_1) using a formula column
    The other queries will fetch data from DB using the records in Table_1
    The problem now i am facing is Query_2|Query_3|Query_4|Query_5 is being executed before Query_1
    How can we maintain the order of execution
    Any help will be appreciated
    thanks
    siva

    No there is no join between Q_1 and other queries
    all the queries are individually hanging in the data model
    moreover we cannot have a Master-Detail kinda relasionship in this case
    please give me some suggestions

  • How to change the order of execution

    How to make a table driving table in the list of joining tables in the from clause?
    for
    select count(1)
    from
    table_a a , table_b b , table_c c
    where a.col1=b.col1
    and b.col2 = c.col2
    I know that we can use ordered hint to make oracle the use the ordered mentioned in the from clause.
    How about joinng order in the where clause.
    Do I need to give any extra hints.
    I understand a bit of checking oracle execution path.
    Is there any material which can give me insight of the same.
    thanks in advance

    Hi,
    hints should be used when there is no way to obtain a correcte execution path having objects analyzed and properly setup.
    In that case, the /*+ ORDERED */ hint after the SELECT clause forces the execution plan to follow the execution order based on the FROM clause.
    Be aware that, if if You have more than 2 tables in the from clause, You can have a Cartesian Product if the from clause is not properly set.
    Hope this helps
    Max

  • How can we ask an order of execution ?

    I want to command un order of execution of two operations in my VI. At the beginning, my program worked well but when I added a for loop, the program doesn't work enought like I want it work...
    Thanks in advance
    hasna

    I've just succeeded in solving my probem but I have another, I want to open a query of my database thanks to labview but I want to open it and it must stay open but noaw, it open and disapear immeditly...
    Have you an idea for my problem ???
    Attachments:
    lecture_de_la_table.vi ‏24 KB

  • How can I execute Stored Procedures in PARALLEL and DYNAMICALLY ?

    Hi 
    I have a stored procedure. It can be executed like this
    exec test @p = 1;
    exec test @p = 2
    exec test @p = n;
    n can be hundred.
    I want the sp being executed in parallel, not sequence. It means the 3 examples above can be run at the same time.
    If I know the number in advance, say 3, I can create 3 different Execution SQL Tasks. They can be run in parallel.
    However, the n is not static. It is coming from a table. 
    How can I execute Stored Procedures in PARALLEL and DYNAMICALLY ?
    I think about using script task. In the script, I get the value of n, and the list of p, from the table, then running a loop with. In the loop, I create a threat and in the threat, I execute the sp like : exec test @p = p. So the exec test may
    be run parallel. But I am not sure if it works.
    Any idea is really appreciated.

    Hi nam_man,
    According to your description, you want to call stored procedures in parallel, right?
    In SSIS, we can create separate jobs with different stored procedures, then set the same schedule to kick the jobs off at the same time. In this way, we should be careful to monitor blocking and deadlocking depending on what the jobs are doing.
    We can also put all stored procedures in SSIS Sequence container, then they will be run in parallel.
    For more information about SSIS job and Sequence container, please refer to the following documents:
    http://www.mssqltips.com/sqlservertutorial/220/scheduling-ssis-packages-with-sql-server-agent/
    https://msdn.microsoft.com/en-us/library/ms139855(v=sql.110).aspx
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • How can I make the execution of my script faster

    Hi everyone
    How can I make the execution of my script faster, because it takes a lot of time to execute? The following is my script:
    DECLARE
    CURSOR C1 IS
    SELECT A.ITEM_CODE,A.STORE_CODE,ST_UNIT,SA_UNIT,CART_QTY,QUANTITY_ON_HAND
    FROM PROJ.IM_LOCATION A
    WHERE A.ITEM_CODE BETWEEN :ITEM_FRM AND :ITEM_TO
    AND A.STORE_CODE = :FRM_STORE
    ORDER BY
    A.STORE_CODE ;
    CURSOR C2 IS
    SELECT A.ITEM_CODE,A.STORE_CODE,ST_UNIT,SA_UNIT,CART_QTY,QUANTITY_ON_HAND
    FROM PROJ.IM_LOCATION A
    WHERE A.ITEM_CODE BETWEEN :ITEM_FRM AND :ITEM_TO
    AND A.STORE_CODE = :FRM_STORE
    ORDER BY
    A.STORE_CODE ;
    big_syb_qty_issue number(12,3);
    small_syb_qty_issue number(12,3);
    big_issue number(12,3);
    small_issue number(12,3);
    item_syb_code varchar2(30);
    big_syb_qty_rec number(12,3);
    small_syb_qty_rec number(12,3);
    BI_SUPP_REC number(12,3);
    SM_SUPP_REC number(12,3);
    big_syb_qty_ADJ number(12,3);
    small_syb_qty_ADJ number(12,3);
    big_ADJ number(12,3);
    small_ADJ number(12,3);
    big_syb_qty_rec_iner number(12,3);
    small_syb_qty_rec_iner number(12,3);
    BI_INTER number(12,3);
    SM_INTER number(12,3);
    cl_big_qty number(12,3);
    cl_small_qty number(12,3);
    cl_big_qty1 number(12,3);
    cl_small_qty1 number(12,3);
    BIG_QTY_OPEN number(12,3);
    SMALL_QTY_OPEN number(12,3);
    BEGIN
         IF ((:FRM_STORE IS NULL) OR (:ITEM_FRM IS NULL) OR (:ITEM_TO IS NULL) OR (:DATE_FRM IS NULL)) THEN
              SHOW_MESSAGE('You Should Enter the Parameters Values Correctly Please try again !!!! ');
              RAISE FORM_TRIGGER_FAILURE;
              GO_FIELD('DATE_FRM');
         END IF;     
    DELETE FROM STOCK_AT_DATE_REP2;
    COMMIT;
    cl_big_qty := 0;
    cl_small_qty := 0;
    -- MESSAGE('Please Wait The System Calculating The Transactions !!!');
    SET_APPLICATION_PROPERTY(CURSOR_STYLE,'BUSY');
    FOR R IN C1
    LOOP
    cl_big_qty := R.CART_QTY ;
    cl_small_qty := R.QUANTITY_ON_HAND;
    -- Transerfer Data 1
    BEGIN
    SELECT B.ITEM_CODE,SUM(NVL(CART_QTY,0)) ,SUM(NVL(ITEM_QUANTITY,0))
    INTO item_syb_code,big_syb_qty_issue,small_syb_qty_issue
    FROM IM_TRANS_ISSUE_HEADER A,IM_TRANS_ISSUE_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND B.DEL_STORE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND DOC_DATE > :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- SHOW_MESSAGE('ISSUED BIG'||' '||big_syb_qty_issue);
    exception
    when no_data_found then big_syb_qty_issue := 0;
    small_syb_qty_issue := 0;
    when others then MESSAGE(10,sqlerrm);
    END ;
    -- Goods Received Data From Supplier 1
    BEGIN
    SELECT B.ITEM_CODE,SUM(B.CART_QTY),SUM(ITEM_QUANTITY)
    INTO item_syb_code,big_syb_qty_rec,small_syb_qty_rec
    FROM IM_GOODS_RECIEVE_HEADER A,IM_GOODS_RECIEVE_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND STORE_CODE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND DOC_DATE > :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- SHOW_MESSAGE('RECEIVED FROM SUPPLIER BIG'||' '||big_syb_qty_rec);
    exception
    when no_data_found then big_syb_qty_rec := 0;
    small_syb_qty_rec := 0;
    when others then message(10,sqlerrm);
    END ;
    -- Adjustement Data 1
    BEGIN
    SELECT B.ITEM_CODE ,SUM(NVL(CART_QTY,0)) ADJUST_QTY,SUM(NVL(ITEM_QUANTITY,0))
    INTO item_syb_code,big_syb_qty_ADJ,small_syb_qty_ADJ
    FROM IM_ADJUST_HEADER A,IM_ADJUST_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND B.STORE_CODE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND A.DOC_DATE > :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- SHOW_MESSAGE('Adjust BIG'||' '||big_syb_qty_ADJ);
    exception
    when no_data_found then big_syb_qty_ADJ := 0;
    small_syb_qty_ADJ := 0;
    when others then message(10,sqlerrm);
    END ;
    -- Goods Received Data From Stores 1
    BEGIN
    SELECT B.ITEM_CODE,SUM(B.CART_QTY),SUM(ITEM_QUANTITY)
    INTO item_syb_code,big_syb_qty_rec_iner,small_syb_qty_rec_iner
    FROM IM_TRANS_REC_HEADER A,IM_TRANS_REC_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND REC_STORE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND DOC_DATE > :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- show_message('here');
    -- SHOW_MESSAGE('Received From Stores BIG'||' '||big_syb_qty_rec_iner);
    exception
    when no_data_found then
    big_syb_qty_rec_iner := 0;
    small_syb_qty_rec_iner := 0;
    when others then message(10,sqlerrm);
    END ;
    cl_big_qty := (NVL(cl_big_qty,0) + NVL(big_syb_qty_issue,0));
    cl_big_qty := (NVL(cl_big_qty,0) - NVL(big_syb_qty_rec,0));
    cl_big_qty := (NVL(cl_big_qty,0) - NVL(big_syb_qty_rec_iner,0));
    big_syb_qty_ADJ := -1 * NVL(big_syb_qty_ADJ,0);
    cl_big_qty := (NVL(cl_big_qty,0) + NVL(big_syb_qty_ADJ,0));
    -- srw.message(2000,'cl_small_qty'||cl_small_qty);
    cl_small_qty := (NVL(cl_small_qty,0) + NVL(small_syb_qty_issue,0));
    cl_small_qty := (NVL(cl_small_qty,0) - NVL(small_syb_qty_rec,0));
    cl_small_qty := (NVL(cl_small_qty,0) - NVL(small_syb_qty_rec_iner,0));
    small_syb_qty_ADJ := -1 * NVL(small_syb_qty_ADJ,0);
    cl_small_qty := (NVL(cl_small_qty,0) + NVL(small_syb_qty_ADJ,0));
    -- srw.message(2000,'cl_small_qty'||cl_small_qty); srw.message(2000,'cl_small_qty'||cl_small_qty);
    INSERT INTO STOCK_AT_DATE_REP2
    VALUES(R.STORE_CODE,R.ITEM_CODE,cl_big_qty,cl_small_qty,R.ST_UNIT,R.SA_UNIT,:DATE_FRM,
    :DATE_TO,0,0,0,0,0,0,0,0,cl_big_qty,cl_small_qty);
    cl_big_qty := 0;
    cl_small_qty := 0;
    END LOOP;
    COMMIT;
    FOR R IN C2
    LOOP
    -- Transerfer Data 2
    BEGIN
    SELECT B.ITEM_CODE,SUM(NVL(CART_QTY,0)) ,SUM(NVL(ITEM_QUANTITY,0))
    INTO item_syb_code,big_issue,small_issue
    FROM IM_TRANS_ISSUE_HEADER A,IM_TRANS_ISSUE_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND B.DEL_STORE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND DOC_DATE BETWEEN :DATE_FRM AND :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- SHOW_MESSAGE('ISSUED BIG'||' '||big_syb_qty_issue);
    exception
    when no_data_found then
    big_issue := 0;
    small_issue := 0;
    when others then MESSAGE(10,sqlerrm);
    END ;
    -- Goods Received Data From Supplier 2
    BEGIN
    SELECT B.ITEM_CODE,SUM(NVL(B.CART_QTY,0)),SUM(NVL(ITEM_QUANTITY,0))
    INTO item_syb_code,BI_SUPP_REC,SM_SUPP_REC
    FROM IM_GOODS_RECIEVE_HEADER A,IM_GOODS_RECIEVE_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND STORE_CODE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND DOC_DATE BETWEEN :DATE_FRM AND :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- SHOW_MESSAGE('1- SM_SUPP_REC '||' '||SM_SUPP_REC );
    -- SHOW_MESSAGE('RECEIVED FROM SUPPLIER BIG'||' '||big_syb_qty_rec);
    exception
    when no_data_found then
    BI_SUPP_REC := 0;
    SM_SUPP_REC := 0;
    when others then message(10,sqlerrm);
    END ;
    -- Adjustement Data 2
    BEGIN
    SELECT B.ITEM_CODE ,SUM(NVL(CART_QTY,0)) ADJUST_QTY,SUM(NVL(ITEM_QUANTITY,0))
    INTO item_syb_code,big_ADJ,small_ADJ
    FROM IM_ADJUST_HEADER A,IM_ADJUST_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND B.STORE_CODE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND A.DOC_DATE BETWEEN :DATE_FRM AND :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- SHOW_MESSAGE('Adjust BIG'||' '||big_syb_qty_ADJ);
    exception
    when no_data_found then
    big_ADJ := 0;
    small_ADJ := 0;
    when others then message(10,sqlerrm);
    END ;
    -- Goods Received Data From Stores 2
    BEGIN
    SELECT B.ITEM_CODE,SUM(NVL(B.CART_QTY,0)),SUM(NVL(ITEM_QUANTITY,0))
    INTO item_syb_code,BI_INTER,SM_INTER
    FROM IM_TRANS_REC_HEADER A,IM_TRANS_REC_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND REC_STORE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND DOC_DATE BETWEEN :DATE_FRM AND :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- show_message('here');
    -- SHOW_MESSAGE('Received From Stores BIG'||' '||big_syb_qty_rec_iner);
    exception
    when no_data_found then
    BI_INTER := 0;
    SM_INTER := 0;
    when others then message(10,sqlerrm);
    END ;
    BEGIN
         BIG_QTY_OPEN := 0;
    SMALL_QTY_OPEN := 0;
    BEGIN
    SELECT NVL(S_BIG_QTY_OPEN,0) ,NVL(S_SMALL_QTY_OPEN,0)
    INTO
    BIG_QTY_OPEN,SMALL_QTY_OPEN
    FROM STOCK_AT_DATE_REP2
    WHERE S_STORE_CODE = R.STORE_CODE
    AND S_ITEM_CODE = R.ITEM_CODE;
    END;
    BIG_QTY_OPEN := ((BIG_QTY_OPEN) + NVL(big_issue,0));
    BIG_QTY_OPEN := ((BIG_QTY_OPEN) - NVL(BI_SUPP_REC,0));
    big_adj := -1 * NVL(big_adj,0);
    BIG_QTY_OPEN := ((BIG_QTY_OPEN) + NVL(big_adj,0));
    BIG_QTY_OPEN := ((BIG_QTY_OPEN) - NVL(BI_INTER,0));
    SMALL_QTY_OPEN := ((SMALL_QTY_OPEN) + NVL(SMALL_issue,0));
    SMALL_QTY_OPEN := ((SMALL_QTY_OPEN) - NVL(SM_SUPP_REC ,0));
    SMALL_adj := -1 * NVL(SMALL_adj,0);
    SMALL_QTY_OPEN := ((SMALL_QTY_OPEN) + NVL(SMALL_adj,0));
    SMALL_QTY_OPEN := ((SMALL_QTY_OPEN) - NVL(SM_INTER,0));
    END;
    BEGIN
    UPDATE STOCK_AT_DATE_REP2
    SET BIG_SUP_REC = BI_SUPP_REC,
    SMALL_SUP_REC = SM_SUPP_REC,
    BIG_ISSUE_TRAN = big_issue,
    SMALL_ISSUE_TRAN = SMALL_issue,
    BIG_ADJUST = big_adj,
    SMALL_ADJUST = SMALL_adj,
    BIG_INTER_REC = BI_INTER,
    SMALL_INTER_REC = SM_INTER,
    S_BIG_QTY_OPEN = BIG_QTY_OPEN,
    S_SMALL_QTY_OPEN = SMALL_QTY_OPEN
    WHERE S_STORE_CODE = R.STORE_CODE
    AND S_ITEM_CODE = R.ITEM_CODE;
    exception
    when no_data_found then
    NULL;
    when others then
    message(10,sqlerrm);
    END;
    END LOOP;
    COMMIT;
    SET_APPLICATION_PROPERTY(CURSOR_STYLE,'default');
    SYNCHRONIZE;
    -- SHOW_MESSAGE('The Data Have Been Calculated !!!');
    END;
    declare
         pl_id ParamList;
    APPLICATION_ID VARCHAR2(20):='PRD';
              COMMAND_LINE VARCHAR2(100) :='STOCK_LEDGER';
    BEGIN
    pl_id := Get_Parameter_List('tmpdata');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := Create_Parameter_List('tmpdata');
    Add_Parameter(pl_id,'DATE_FRM',TEXT_PARAMETER,:DATE_FRM);
    Add_Parameter(pl_id,'DATE_TO',TEXT_PARAMETER,:DATE_TO);
    Add_Parameter(pl_id,'ITEM_FRM',TEXT_PARAMETER,:ITEM_FRM);
    Add_Parameter(pl_id,'ITEM_TO',TEXT_PARAMETER,:ITEM_TO);
    Add_Parameter(pl_id,'FRM_STORE',TEXT_PARAMETER,:FRM_STORE);
    IF :REPORT_TYPE = 1 THEN
    Run_Product(REPORTS,'C:\INV\RDF\STOCK_LEDGER.rdf',SYNCHRONOUS,RUNTIME,
    FILESYSTEM, pl_id,NULL);
    ELSIF :REPORT_TYPE = 2 THEN
    Run_Product(REPORTS,'C:\INV\RDF\STOCK_LEDGER_2.rdf',SYNCHRONOUS,RUNTIME,
    FILESYSTEM, pl_id,NULL);
    END IF;
    END;
    Waiting for your valuable answer
    Best Regards
    Jamil Alshaibani

    Make a matte in Photoshop.
    From the Photoshop menu bar: File > New > Film & Video Presets. Choose one that suits your FCP project pixel dimensions. Make the background black. Place a white rectangle with rounded corners on top (the white will determine how much of your picture is visible). Flatten Image. Save as TIFF. Import into FCP.
    Move your video clips up to V2. Place the imported TIFF on V1. Highlight all clips on V2.
    Go to Modify > Composite Mode > Travel Matte Luma. Done.
    If you want soft edges, no need for a matte. Double click your clip to place it in the Viewer. Open up the Motion tab > Crop > Edge Feather. Nice and quick. Copy and Paste attributes for the other clips.

  • Order of execution for various Nodes in HANA Views

    Hello Folks,
    I have created some analytic and calculation views. I would like to know order of execution of various nodes inside them such as Logical Join, Data Foundation, Semantics for Analytic views.

    And to find out how to use planviz:
    Show me the timelines, baby! by Lars himself
    Ravi

  • WHERE clause order ox execution question

    I dont understand order of execution of a WHERE clause, using a complex database
    I want to write a SELECT statement with the following condition
    ... WHERE ( branch = 'main' ) AND ( type = 1 ) OR ( charge -1 AND charge = 2 )
    My question is
    <1> Can yoyu use parenthesis inside of a WHERE clause
    <2> How would you write such a clause as above if you can not use parenthesis
    Thanks

    Just to echo what everyone else is saying, of course parentheses are syntactically valid and can make a difference to the logic. In you example though,
    WHERE ( branch = 'main' ) AND ( type = 1 ) OR ( charge {noformat}<{noformat}> -1 AND charge <= 2 )is the same thing as
    WHERE ( branch = 'main' AND type = 1 ) OR ( charge {noformat}<{noformat}> -1 AND charge <= 2 )and even
    WHERE branch = 'main' AND type = 1 OR charge {noformat}<{noformat}> -1 AND charge <= 2because AND takes precedence over OR. You can think of it as a "stronger" operator.
    However I would not use the last version because it's ambiguous to anyone reading it, and code like that can easily hide bugs. I would also not use the first version because all those redundant brackets are just confusing, making it almost as hard to read (and therefore prone to bugs) as the last version.
    btw I've changed your example because I know this forum can swallow *{noformat}<{noformat}>* (I've used {noformat} tags to preserve it).
    I'm not sure if any of this affects order of execution (and if it does, your Oracle version will make a difference).

  • Tracking the order of execution of sql scripts in SQL*Plus

    In our production environment we sometimes have to run some .sql scripts in a particular order. Since the order of execution is important , i have created another .sql file caller caller.sql(shown at the bottom) which will call all the scripts in the right order.
    i thought of putting a exec DBMS_LOCK.SLEEP (5); after the end of every execution of the script so that i can see the
    'Ending script1'message .
    The spooling within the caller script(execute_stack.log) has become meaningless because each script has a spool <filename.log> and spool off within it. These spool logs (for every script) is important for tracking purposes as each script belongs to a different development team and i have to send them the spooled log file after the execution.
    I don't want to see the entire scripts running by in my screen. Since these scripts have their own spooling, i can later check the logs if the scripts where executed properly.
    So i need two things.
    1.I just need to see the following and nothing else in the screen.
    Ending script1
    Ending script2
    Ending script3
    .2. I need to log the order of execution. ie. the execute_stack.log should look like the above.Since there is a spool off within each script, this wouldn't be possible.Right?
    Ending script1
    Ending script2
    Ending script3
    .The caller.sql script which calls all the scripts in the right order
    alter session set nls_date_format = 'DD-MON-YYYY hh24:MI:SS';
    set serveroutput on
    set echo on;
    set feedback on;
    spool execute_stack.log
    @script1.sql
    exec dbms_output.put_line ('Ending script1');
    dbms_output.put_line(chr(10)||chr(10)||'.'||chr(10)||'.'||chr(10));
    exec DBMS_LOCK.SLEEP (5);
    @script2.sql
    exec dbms_output.put_line ('Ending script2');
    dbms_output.put_line(chr(10)||chr(10)||'.'||chr(10)||'.'||chr(10));
    exec DBMS_LOCK.SLEEP (5);
    @script3.sql
    exec dbms_output.put_line ('Ending script3');
    dbms_output.put_line(chr(10)||chr(10)||'.'||chr(10)||'.'||chr(10));
    exec DBMS_LOCK.SLEEP (5);
    @script4.sql
    dbms_output.put_line(chr(10)||chr(10)||'.'||chr(10)||'.'||chr(10));
    exec dbms_output.put_line ('Ending script3');
    commit;
    spool off;Is this a professional way of tracking the execution of .sql scripts?

    Pete_Sg1 wrote:
    Is this a professional way of tracking the execution of .sql scripts?No. There is very little professional about using .sql scripts on a production system - when stored procedures are safer, more robust, easier managed and controlled and secure.. and where a log table can be used to properly log the runtimes (and other stats) of each processing step.
    Let's just take a look at the number of moving parts you need to schedule and run a .sql script. A cron job needs to be configured with the proper environment setting. It needs to run a shell script. That shell script needs to load SQL*Plus. SQL*Plus needs to connect to the database (starting a dedicated server process most likely). SQL*Plus then needs to read a .sql file, parse these commands and either execute these locally (SQL*Plus commands) or remotely (PL/SQL and SQL commands).
    How can this be considered professional when the very same can be achieved with a
    - stored procedure
    - using DBMS_JOB to schedule the procedure for execution
    There are so many things that can go wrong with the first method. And so few things that could go wrong with the last one. No contest as to which method is not only better, but also professional.
    PS. See that you use Windows to run these scripts. It is even worse as it introduces another hardware and software layer making the scenario even more insecure & unsafe with more moving parts that can go wrong or simply fail.

  • Order of execution of named method user properties and server script

    Dear All,
    If for a Custom method on an applet, we have scripts in WebApplet_preinvokemethod and WebApplet_invokemethod and also for the same Custom method we have applet Named Method user properties and BC Named Method user properties, what will be the order of execution of these scripts and Named Method user properties??

    The Private Event Submission sample portlet shows how to achieve this. It is part of the PDK download.
    Peter

  • What is order of execution in Sequence container

    hi all,
     I want to know the order of execution in sequence container. we have sequence container and loading 20 dimension table but no precedence constraints between the task, each tasks are separate.
     What is the flow of execution, is sequence container allow parallel execution of task ?
    Please guide me.
    Thanks in advance.

    Hello,
    All tasks which exist inside your Sequence container will execute in parallel. 
    If you want to control the order in which they execute then you need to use precedence constraints.
    -Vaibhav Chaudhari

  • How to terminate/restart a execution?

    I am using simple user interface(LabView) to develop a new custom UI.
    But I find the Terminate/Restart Button doesn't work: After I use it to terminate one execution, not able to restart it anymore.
    How to restart a terminated execution when run TestUUTs?
    I'm appreciate any help on this.
    Attachments:
    Simple UI Restart not work.JPG ‏59 KB

    There are a couple of possibilities for the cause of the issue you are seeing.
    1) Terminate is asynchronous, so if you are programmatically terminating the execution and restarting it, the restart might be getting done before the termination is complete. Wait for the execution to complete before restarting it. You can use Execution.WaitEx, UIMessages, or polling with GetStates to tell when the execution is really complete.
    2) Executions can be marked as not restartable. The batch model uses this setting (on the new execution sequence call) in order to keep you from incorrectly restarting the socket executions. For the batch model, only the controlling execution should be restarted. Restarting the controlling execution restarts the socket executions automatically.
    -Doug

  • Several executions in parallel : goto cleanup of another sequence

    Hi guys,
    My test sequence has this architecture : it launches 2 executions in parallel and for them to finish. In these 2 executions are placed several subsequences and test to verify my UUT (see image attached).
    My test sequence should follow this behavior : some of my subsequence are crucial to my test, so any step failing inside these sequences (and only these ones) should stop the UUT test. These sequences are set to 'go to cleanup on step failure'. Then my first idea was to add a post-expression to these sequences in order to terminate my 2 executions.
    => It works fine but I'm running into this issue : http://www.ni.com/white-paper/14067/en#224640_by_Category . I need to have the correct status of my test sequence, I can't accept that it returns 'Passed'. 'Terminated' or even better 'Failed' status in mandatory for me (reporting purpose).
    So the second idea was to go to the cleanup of my two executions when one of this critical sequences have a fail status... But I can't find a way to set the PostAction to target a step (group) outside of the current step's sequence.
    Any idea ?
    Attachments:
    Architecture.png ‏25 KB

    There is a way to detect that the execution was terminated. You can do the following:
    1) Specify an object reference variable to store a reference to the execution when creating the sequence call.
    2) After the wait step for the execution (i.e. after the execution has stopped), do something like:
    Locals.myExecution.AsExecution.GetStates(Locals.runState, Locals.termState)
    If the execution was terminated then Locals.termState == 2.
    Hope this helps,
    -Doug

  • How can i order a new printer head for my photoshop 7250e

    How can i order a new printer head for my photoshop 7250e  Is there a number i can ring to speak to someone or email address i can use or a web page where i can order one
    or a list of agents i can use to get it from
    Finding simple information seems impossible, no where does it mention spares or replacements 
    I have tried a lot of fault finding am convinced this is the problem  

    Hello NigelH1, 
    The Print Head for the Photosmart 7250  is not available outside HP.
    Please call HP Tech Support for further assistance.
    If you are in US , the toll free # is 1-800-474-6836 .
    If you are not in US , then log on to www.hp.com , at bottom-left corner there is a world map icon, click on it and then select the region you belong to, which would then provide support options for you for that region.
    Regards,
    Jabzi
    Give Kudos to say "thanks" by clicking on the "thumps Up icon" .
    Click "Accept as Solution" if it solved your problem, so others can find it.
    Although I am an HP employee, I am speaking for myself and not for HP.

  • How to use order by within Group by clause

    Hi All,
    I need a help as to how should i use the Order by clause so that the data should be in order with respect to one column, and at the same time whole data is grouped by some other column...like
    Select RaceNo,Venue,FP,BP from Race group by RaceNo
    Here I want to order by FP in ascending order for each group. When i am using it , whole order is changing.
    Can anybody suggest me how to use order by clause that would apply to each group of data.
    Thanks .

    order by clause should be used at the last in any query.......but in group by clause u can't use use that becoz u group according to column then no ordering is needed there......if u want to filter something then u can use having clause and later if u need to arrange then u can use order by clause.........
    i hope this eg.l gives u some clarification....
    e.g
    select deptno,count(empno)
    from dept
    group by deptno
    having count(empno) > 10
    order by deptno

Maybe you are looking for

  • Problem with subscribed calendar

    I am subscribed to a holiday calendar (the Jewish one, if it matters) and it doesn't have any entries after the end of this year. It's an authorized Apple calendar, who do I contact to get them to update it? Or is there some way to find out if it aut

  • Sensors in BPEL

    Hi,   Summary:       Problem is the records in the VARIABLE_SENSOR_VALUES table are not deleted in after deleting the Instance.   Detail:     I have created the simple bpel service and I created the simple variable sensor for the bpel by creating the

  • Understanding how zenwsimport works

    I am new to ZfD. I am studing it and have some doubt. Enviroment: - Zenworks 4.01 - I have 8 LAN's interconnected through slower links. - Each LAN has one server running the Workstation Importing Service. How each client can know to use each specific

  • No image in Speedgrade

    First, Speedgrade crashed when opening a Premiere project. I contacted Adobe and she reinstalled graphic drivers. Now Speedgrade does not crash anymore, but I can not see the image of the video. It is a black window. The woman from Adobe did not know

  • Strikethrough!

    I'm hoping someone can help me with my issue... I'm running the latest OS on the new iMac. Using Indesign 5.0.2. The key command for strikethrough is command+shift+/ but when I use that shortcut I'm getting the Help/Search pop up menu to open up. I'v