Overview of Commit and Rollback The Transaction Control Statements in Oracle 10g
A transaction is a logical unit of work. In oracle a transaction relates to a series of Data Manipulation Language statements that does a logical unit of work. That is, changes made to a database, by one or more Data Manipulation Language commands like insert, update or delete can be referred to as a transaction.
It is possible either to make the database transaction permanent by committing or to reverse it by rolling back. This process is executed by the two commands commit and rollback. Commit makes the changes visible to other database sessions too. Rollback undoes the work done in the transaction. The other commands used to control transactions are savepoint and set transaction commands.
We can use savepoints to rollback portions of transactions that has occurred. A savepoint is a named processing point in a transaction. Rolling back to a savepoint will cause only all the changes that were done after the savepoint to be undone.
of above code will cause only the first two insert to be reflected. A
commit erases all savepoints in a transaction and also releases the transaction
locks. If there are four savepoints A, B, C and D in order and rollback
is done to savepoint C only D is erased.
Usually commit and rollback operations are done based on commands that are initiated from the application programs explicitly. However there are certain instances when they are initiated by the system implicitly. These instances when a commit is forced to occur without instructions are, when commands such as quit, exit or any Data Definition Language command is executed.
In some cases when a series of Data manipulation Language commands are executed and not been either explicitly or implicitly committed but some serious error or failure occurs then oracle will rollback work automatically. This is known as the auto rollback feature of oracle.
| Characterization of Materialized views and its types in Oracle10g | Introduction to Capability Maturity Model (CMM) | Introduction to Data Blocks, Extents and Segments Logical Storage Structures in Oracle 10g Server | Oracle Application Server10g Business Intelligence Services | Oracle Application Server10g Content Management Services | Overview of Commit and Rollback The Transaction Control Statements in Oracle 10g | Overview of Flashback Features in Oracle10g | Overview on Database Change Notification in Oracle10g | Overview on Implicit and Explicit Cursors in PL/SQL | Overview on Sequential Control and Conditional Control Statements in PL/SQL | Overview on some of the new features in Oracle Database 10g | Overview on the usage of Cursor Variables in PL/SQL | Performance Tuning in Oracle10g Best Practices in Application Development | Representing Conditional Expressions as Data in Oracle10g | Understanding Indexes and their key benefits in Oracle10g | Understanding Oracle10g Application Server Portal Services |
Copyright - © 2004 - 2017 - All Rights Reserved.