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
Datatype Conversion At times it is necessary to convert a value from one datatype to another. For e.g. if you want to inspect a rowid, you should convert it to a character stri

Assignments in pl/sql The Variables and constants are initialized every time a block or subprogram is entered. By default, the variables are initialized to NULL. Therefore, unle

Effects of NULL for union - SQL The treatment of NULL in invocations of EXCEPT is as for UNION. This is different from its treatment in those of NOT IN and quantified compari

Left and Right Joins LEFT OUTER JOIN can be used when you want to retrieve the data from the main table (table1) even if there is no match in other tables (table_2, table_3...

Declaring Exceptions The Exceptions can be declared only in the declarative part of the PL/SQL subprogram, block, or package. By introducing its name, you can declare an excep

Organi c Evolution Evolution is a slow continuous, irreversible and natural process of change to give rise to advance and diverse forms of life i.e. formation of new specie

Fetching with a Cursor The FETCH statements retrieve the rows in the result set one at a time. After each and every fetch, the cursor advance to the next row in the result set

Collection Methods:   The collection method is a built-in function or procedure which operates on the collections and is called using the dot notation. The methods like the C

Product-specific Packages The Oracle and different Oracle tools are supplied with the product-specific packages which help you to build the PL/SQL-based applications. For illu

1. Create a procedure called TAX_COST_SP to accomplish the tax calculation task. Keep in mind that the state and subtotal values are inputs into the procedure and the procedure is