Ending transactions, PL-SQL Programming

Ending Transactions

A good quality programming practice is to commit or roll back every transaction explicitly. Whether you rollback or issue the commit in your PL/SQL program or in the host atmosphere, it depends on the flow of application logic. When you neglect to commit or roll back a transaction explicitly, the host atmosphere determines its last state.

For illustration, in the SQL Plus atmosphere, if your PL/SQL block does not involve a COMMIT or ROLLBACK statement, the final state of your transaction totally depends on what you do after running the block. When you execute the data control, data definition, or COMMIT statement or if you issue the DISCONNECT, EXIT, or QUIT command, the Oracle commits the transaction. When you execute a ROLLBACK statement or abandon the SQL Plus session, the Oracle rolls back the transaction.

In the Oracle Pre-compiler atmosphere, if your program does not expire in general, the Oracle rolls back your transaction. The program terminates generally if it explicitly commits or rolls back work and disconnects from the Oracle using the RELEASE parameter, which is as shown:

EXEC SQL COMMIT WORK RELEASE;

Posted Date: 10/4/2012 5:16:33 AM | Location : United States







Related Discussions:- Ending transactions, Assignment Help, Ask Question on Ending transactions, Get Answer, Expert's Help, Ending transactions Discussions

Write discussion on Ending transactions
Your posts are moderated
Related Questions
JOIN and AND in SQL In this Section is all about one operator, JOIN. SQL's closest counterpart, NATURAL JOIN, has already been covered. Here we look at several other "join" op

Cursors The Oracle uses work areas to execute the SQL statements and to store process information. A PL/SQL construct known as the cursor. Let's you assume name a work area and

THEO R Y OF ETERNITY OF LIFE (PRAYER - 1880) - The theory of eternity of life, also called the steady-state theory , states that life has ever been in existence as at presen

Updating by insertion Syntax : INSERT INTO ENROLMENT VALUES (SID ('S4'), 'Devinder', CID ('C1'));

Packages The package is a schema object which groups logically associated to the PL/SQL items, types, and subprograms. The Packages have 2 sections: the specification & the bod

what is the use of declare keyword

LEVEL You use the LEVEL with the SELECT CONNECT BY statement to categorize rows from a database table into a tree structure. The LEVEL returns the level number of a node in a

Creating and Destroying Base Tables: Example shows an SQL command to create the base table counterpart of the ENROLMENT variable Example  Creating a base table. CREATE T

Using Host Arrays The Client-side programs can use anonymous PL/SQL blocks to bulk-bind input and output host arrays. However, this is the well-organized way to pass the colle

Many of the reports generated from the system calculate the total dollars in purchases for a shopper. Complete the following steps to create a function named TOT_PURCH_SF that acce