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
Bulk Binds advantages In the Embedded Oracle RDBMS, the PL/SQL engines accept any valid PL/SQL subprogram or block. As the figure shows, the PL/SQL engine executes all procedur

Package Body: The package specification is implemented by the package body. That is, the package body has the definition of every cursor and the subprogram declared in the pac

Type versus Representation Confusion in SQL This describes how a value might have two or more distinct representations. For example, user-defined type POINT might have a decla

Overloading The PL/SQL overloads the subprogram names. That is, you can use similar name for few different subprograms as long as their formal parameters differ in the number

Example of ADD CONSTRAINT in SQL Example: Alternative formulation for MAX_ENROLMENTS ALTER TABLE IS_ENROLLED_ON ADD CONSTRAINT MAX_ENROLMENTS CHECK ((SELECT COUNT (*)

heap sort program in pl/sql

Assignment of Variable - Updating a Variable Syntax: SET SN = SID ('S2'); This can obviously be read as "set the variable SN to be equal in value to SID ( 'S2' )".

Package STANDARD package named STANDARD defines the PL/SQL atmosphere. The package specification globally declares the exceptions, types, and subprograms that are available a

Tables within a Table - SQL Figure here is an exact copy of the one in the theory book and as before it is just an alternative way of representing some of the information con

Keyword and Parameter Description select_statement: This is a query which returns a result set of the rows. Its syntax is such that of select_ into_statement without the IN