Scenario that ends Oracle transaction - Oracle Transaction

Q.  Which of the following scenarios ends an Oracle transaction?

- Published on 12 Aug 15

a. COMMIT or ROLLBACK is issued
b. User disconnects from Oracle
c. User process terminates abnormally
d. All of the above

ANSWER: All of the above
 

    Discussion

  • Nirja Shah   -Posted on 22 Sep 15
    - A transaction ends when any of the following actions occurs:

    1. A user issues a COMMIT or ROLLBACK statement without a SAVEPOINT clause.
    - In a commit, a user explicitly or implicitly requested that the changes in the transaction be made permanent.
    - Changes made by the transaction are permanent and visible to other users only after a transaction commits.

    2. A user runs a DDL command such as CREATE, DROP, RENAME, or ALTER.
    - The database issues an implicit COMMIT statement before and after every DDL statement.
    - If the current transaction contains DML statements, then Oracle Database first commits the transaction and then runs and commits the DDL statement as a new, single-statement transaction.

    3. A user exits normally from most Oracle Database utilities and tools, causing the current transaction to be implicitly committed. The commit behavior when a user disconnects is application-dependent and configurable.

    4. A client process terminates abnormally, causing the transaction to be implicitly rolled back using metadata stored in the transaction table and the undo segment.

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.)