drnk
drnk

Reputation: 764

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.

Upvotes: 0

Views: 34

Answers (1)

Emu
Emu

Reputation: 504

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.

Upvotes: 1

Related Questions