简体   繁体   中英

Secure code block execution in Oracle

For example I have a code:

BEGIN
    BEGIN
        -- First Part
        call_1_1();
        call_1_2();
        ...
        call_1_N();
    END;

    BEGIN
        -- Second Part
        call_2_1();
        call_2_2();
        ...
        call_2_M();
    END;
END;

This code placed at package and running in a job. Execution of this code (job) can be stopped from the outside by stopping the job. Interrupting could crach execution in the middle of the each block. And the question is how secure the execution of the blocks First Part or Second Part when someone interrupting execution from the outside.

Either all the transaction will complete or none of the transaction will complete. Guaranteed. You have to manage your transactions. For example don't commit before the end of the "block" if you want the block to be in one transaction.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM