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
Need Azure CRM Web Application with two-factor authentication We presently have a CRM-like database stored on MS Azure that we presently access over an MS Access application. It

Create a procedure named STATUS_SHIP_SP that allows a company to employee in the Shipping Department to update the status of an order to add shipping information. The BB_BASKETSTAT

Question: a) Given the following relation: Location(loc_id, bldg_code, room, capacity) The underlined field is a primary key. (i) Write a PL/SQL program using the impl

Initializing Records The illustration below shows that you can initialize a record in its type definition. Whenever you declare a record of the type TimeRec, its 3 fields supp

Attributes: Just similar to variable, an attribute is declared with a name and datatype. The name should be exclusive within the object type. The datatype can be any Oracle ty

Need for Dynamic SQL: You need dynamic SQL in the situations as follows: 1) You would like to execute a SQL data definition statement (like CREATE), a data control statemen

Using ROLLBACK The ROLLBACK statements end the present transaction and undo any change made during the transaction. The Rolling back is helpful for two reasons. Firstly, if yo

Row Counterparts of Table Operators SQL does not have counterparts tuple rename, tuple projection, tuple extension, tuple join and tuple compose. To obtain the same effects as

Read-Only Operator (+) - SQL The term read-only operator to the mathematical term function. Here I just need to add that the SQL standard reserves the term function for read-

Create a view named CustomerAddresses that shows the shipping and billing addresses for each customer in the MyGuitarShop database. This view should return these columns from the