Transaction control, PL-SQL Programming

Transaction Control

The Oracle is transaction oriented; that is, Oracle uses the transactions to make sure the data integrity. The transaction is a sequence of SQL data manipulation statements that does a logical unit of work. For illustration, the two UPDATE statements might credit one bank account and debit another.

At the same time, the Oracle makes permanent or undoes all the database changes made by a transaction. If your program fails in the middle of the transaction, the Oracle detects the error and rolls back the transaction. Therefore, the database is restored to its previous state automatically.

You use the ROLLBACK, COMMIT, SAVEPOINT, & SET TRANSACTION commands to control the transactions. The COMMIT makes everlasting and any database changes made during the present transaction. The ROLLBACK ends the present transaction and undoes any changes made as the transaction began. The SAVEPOINT marks the present point in the processing of a transaction. Used with the ROLLBACK, SAVEPOINT undoes part of a transaction. The SET TRANSACTION sets the transaction properties like the read/write access and isolation level.

Posted Date: 10/4/2012 3:38:43 AM | Location : United States







Related Discussions:- Transaction control, Assignment Help, Ask Question on Transaction control, Get Answer, Expert's Help, Transaction control Discussions

Write discussion on Transaction control
Your posts are moderated
Related Questions
Using EXTEND To enlarge the size of a collection, use EXTEND. This process has 3 forms. The EXTEND appends one null element to a collection. And the EXTEND(n) appends n null e

Object Type: The object type is a user-defined composite datatype which encapsulates a data structure along with the functions and procedures required to manipulate the data

Grouping and Ungrouping in SQL Example specifying EXAM_MARK in place of COURSE in the main FROM clause. Example: Obtaining C_ER2 from EXAM_MARK SELECT CourseId, CAST

Using %TYPE The %TYPE attribute gives the datatype of a variable or the database column. In the example below, the %TYPE gives the datatype of a variable: credit REAL(7,2); debi

Passing Cursor Parameters You use the OPEN statement to pass the parameters to a cursor. Unless you want to accept the default values, each proper parameter in the cursor decl

Example of Cast Operator So long as CAST is used as shown, we could obtain the total marks for each exam in similar fashion, using SUM (Mark) AS TotalMarks. However, this giv

Difference between 9i & 10G When Oracle releases any new databases then it are having some discrepancy with them. But 10G is having much difference than oracle 9i has. Oracle

Processing Transactions This part describes how to do the transaction processing. You learn the fundamental techniques that safeguard the consistency of your database, involvin

Parameter and Keyword Description: type_name: This identifies a user-defined type specifier that is used in the subsequent declarations of the objects. AUTHID Clause:

Exception handling In the PL/SQL, a warning or error condition is known as an exception. The Exceptions can be internally defined (by the run-time system) or user defined. The