SCNs to coordinate distributed transactions among different databases - Oracle Transaction

Q.  In which of the following ways does the database use SCNs to coordinate the distributed transactions among different databases?
- Published on 13 Aug 15

a. An application establishes a connection using a database line
b. The distributed transaction commits with the highest global SCN among all the databases involved
c. The commit global SCN is sent to all databases involved in the transaction
d. Both A & B
e. All mentioned above

ANSWER: All mentioned above
 

    Discussion

  • Nirja Shah   -Posted on 22 Sep 15
    - A system change number (SCN) is an internal timestamp for a committed version of the database.

    - The Oracle Database server uses the SCN clock value to guarantee transaction consistency.

    - For example, when a user commits a transaction, the database records an SCN for this commit in the redo log.

    - The database uses SCNs to coordinate distributed transactions among different databases.

    - For example, the database uses SCNs in the following way:

    1. An application establishes a connection using a database link.
    2. The distributed transaction commits with the highest global SCN among all the databases involved.
    3. The commit global SCN is sent to all databases involved in the transaction.

    - SCNs are important for distributed transactions because they function as a synchronized commit timestamp of a transaction, even if the transaction fails.

    - If a transaction becomes in-doubt, an administrator can use this SCN to coordinate changes made to the global database.

    - The global SCN for the transaction commit can also be used to identify the transaction later, for example, in distributed recovery.

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