Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happens under the hood when a commit statement is issued in Oracle 10g? [closed]

Suppose an update is made through a transaction, and then a commit statement is issued.

Which are all the internal processes are that happen under the hood in an Oracle server, after a commit statement?

like image 851
user1841982 Avatar asked Feb 10 '13 08:02

user1841982


People also ask

What happens when commit is issued Oracle?

A commit is used on a transaction to apply it into the database which means the database is altered. It can be used implicitly as well as explicitly. A transaction is an atomic unit which consists of one or more logical unit.

What will happen when COMMIT statement is issued?

The commit statement terminates the current database transaction and commits any changes made by the transaction. After you issue a commit statement, you cannot undo (roll back) any changes to the database made by the committed transaction. A commit statement also closes any open cursors.

When a COMMIT statement is executed what happens?

4. COMMIT statement permanently save the state, when all the statements are executed successfully without any error. In ROLLBACK statement if any operations fail during the completion of a transaction, it cannot permanently save the change and we can undo them using this statement.

Under which condition are an COMMIT statement issued?

An automatic commit occurs under the following circumstances: – A DDL statement is issued. – A TCL statement is issued. when there is a system failure.


1 Answers

  1. SCN (System Change Number) is incremented: SCN guarantees the order of transactions
  2. LGWR (Log Writer) writes remaining redo log to disk
  3. LGWR writes SCN into the online redo log files
  4. Transaction is removed from V$TRANSACTION
  5. Locks of the actual session are released, removed from V$LOCK
  6. Other sessions waiting for the locks of the actual session are notified
  7. Block clean out may happen: Lock-related information is cleaned out of the block headers of the blocks modified by the transaction
like image 177
Donato Szilagyi Avatar answered Sep 21 '22 12:09

Donato Szilagyi