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
Name Resolution   During the compilation, the PL/SQL compiler relates identifiers like the name of a variable with an address or memory location, actual value, or datatype. Th

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

Using Cursor Attributes: Every cursor has 4 attributes: %NOTFOUND, %FOUND, %ISOPEN, and %ROWCOUNT. If appended to the cursor name, they return the helpful information about

SQL Cursor   The Oracle implicitly opens a cursor to process each SQL statement not related with an explicit cursor. The PL/SQL refers to the most current implicit cursor as t

EXIT The EXIT statement forces a loop to done unconditionally. Whenever an EXIT statement is encountered, the loop is done immediately and controls the passes to the next statem

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

BETWEEN and NOT BETWEEN Operator in SQL Example: Restricting exam marks to between 0 and 100 CREATE ASSERTION Marks_between_0_and_100 CHECK (NOT EXISTS (SELECT * FROM

Updating by replacement Syntax: UPDATE ENROLMENT SET Name = 'Ann' WHERE StudentId = SID ('S1'); Note the use of SET, as already noted in connection with direct a

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:

Synonyms You can create the synonyms to provide location transparency for the remote schema objects like tables, views, sequences, stand-alone subprograms, and packages. Though,