Controlling autonomous transactions, PL-SQL Programming

Controlling Autonomous Transactions

The first SQL statement in an autonomous routine starts a transaction. Whenever one transaction ends, the next SQL statement starts the other transaction. All the SQL statements executed as the last commit or rollback make up the present transaction. To control the autonomous transactions, use the statements shown below, that apply only to the present (active) transaction:

(i)COMMIT

(ii)ROLLBACK [TO savepoint_name]

(iii)SAVEPOINT savepoint_name

(iv)SET TRANSACTION

The COMMIT ends the present transaction and makes the permanent changes made during that transaction. The ROLLBACK ends the present transactions and undoes the changes made during that transaction. The ROLLBACK TO undo part of a transaction. The SAVEPOINT names and marks the present point in a transaction. The SET TRANSACTION sets the transaction properties like read/write access and isolation level.

Posted Date: 10/5/2012 4:49:31 AM | Location : United States







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

Write discussion on Controlling autonomous transactions
Your posts are moderated
Related Questions
How Calls Are Resolved? The figure shows that how the PL/SQL compiler resolves the subprogram calls. When the compiler encounters the procedure or function call, it tries to di

This is a Customer Management project. Customer data is presented in a text file. The program will load this text data into its DB columns. The data mapping is user definable. User

Procedural Constraint Enforcement (Triggers) SQL has an alternative method of addressing database integrity, involving event-driven procedural code. The special procedures th

set serveroutput on declare a number(5); b number(5); c number(5); begin a:=&a; b:=&b; c:=a/b; dbms_output.put_line(c); exception when zero_divide then d

Implicit Rollbacks Before execute the INSERT, UPDATE, or DELETE statement, the Oracle marks an implicit savepoint . When the statement fails, the Oracle rolls back to the save

Cursors   To execute the multi-row query, the Oracle opens an unnamed work region which stores the processing information. The cursor names the work region, access the informa

Use of Table Expressions - Expressing Constraint Conditions With the exception of key constraints, the examples in the theory book all explicitly reference at least one relvar

Boolean Values Only the values TRUE, FALSE, & NULL can be assigned to a Boolean variable. For illustration, given the declaration DECLARE done BOOLEAN; the following statements

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' )".

The accuracy of product table data is critical and the Brwebean's. owner wants to have an audit file that contains information regarding all DML activity on the BB_PRODUCT table. T