ORA-02055 - Part of distributed statement fails, due to an integrity constraint violation

Q.  If a part of a distributed statement fails, due to an integrity constraint violation then the database returns which error number?
- Published on 29 Jul 15

a. ORA-02055
b. ORA-02067
c. Both A & B
d. None of the above

ANSWER: ORA-02055
 

    Discussion

  • Nirja Shah   -Posted on 21 Sep 15
    - You can use a trigger or stored procedure to create a distributed query.

    - This distributed query is decomposed by the local Oracle into a corresponding number of remote queries, which are sent to the remote nodes for execution.

    - The remote nodes execute the queries and send the results back to the local node.

    - The local node then performs any necessary post-processing and returns the results to the user or application.

    - If a portion of a distributed statement fails, for example, due to an integrity constraint violation, Oracle returns error number ORA-02055.

    - Subsequent statements or procedure calls return error number ORA-02067 until a rollback or rollback to savepoint is issued.

    - You should design your application to check for any returned error messages that indicate that a portion of the distributed update has failed.

    - If you detect a failure, you should rollback the entire transaction (or rollback to a savepoint) before allowing the application to proceed.

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)