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
BIOCHE M ICA L ORIGIN OF LIFE - It is generally agreed by astronomers, geologists and biologists that the earth is approximately 4500-5000 million years old. It is an

Using raise_application_error The Package DBMS_STANDARD that is supplied with Oracle gives language facilities that help your application to interact with Oracle. For illustra

Example of Foreign Key Constraint Example: Alternative formulation for 6.3 as a foreign key constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Must_be_enrolled_to_take_exam

Perform the following queries on the Hospital1.DB using SQL Anywhere (START EARLY!). a. Which patients have purchased the drug "Tylenol"? List the names and addresses. Arrange the

Example of GROUP BY and COLLECT Operator Example: Using GROUP BY and COLLECT to obtain C_ER2 SELECT CourseId, CAST ( COLLECT (ROW (StudentId, Mark)) AS ROW (Studen

Set Operators The Set operators combine the results of the two queries into one result. The INTERSECT returns all the distinct rows selected by both queries. The MINUS returns

What Are Cursor Variables  ? The Cursor variables are like C or Pascal pointers that hold the memory location (address) of some item rather of the item itself. Therefore, decl

Positional Notation The first procedure call uses the positional notation. The PL/SQL compiler relates the first actual parameter, account, with the first proper parameter, ac

Explicitly specifying the join condition - SQL SELECT * FROM IS_CALLED JOIN IS_ENROLLED_ON ON ( IS_CALLED.StudentId = IS_ENROLLED_ON.StudentId ) Now, the key word JO

Parameter and Keyword Description: dynamic_string: This is a string variable, literal, or expression which represents a SQL statement or the PL/SQL block. define_vari