TRANSACTION CONTROL DEFINITION: Set of operations dependent on each other that are made in the database. For the transaction is executed, must be carried out each and every one of the parties or transactions that compose it; In the event that any fault will fail the entire transaction. The user can define the beginning and end of a transaction.
IN ORACLE: .- transaction begins with the 1 st order SQL user session or the 1 st order after the end of the previous transaction.
.- ends when you run a command transaction control (commit or rollback), a command data definition (DDL) or when the session ends.
Once the transaction is not undoable.
COMMAND CONTROL
.- COMMIT TRANSACTION: terminating the transaction making the changes final, releasing the locked rows. Only after you run a commit other users have access to change data.
.- ROLLBACK: terminating the transaction by undoing the changes made and releasing the locked rows.
.- IMPLICIT ROLLBACK: When a program it fails to handle the exception that caused the failure. Melt all operations except those within the program have been confirmed.
.- SAVEPOINT
: Use with "rollback to" safeguard to score when processing transactions. This will undo some of a transaction.
.- ROLLBACK TO
: Undo the work done on the database after the point of preservation. However neither confirms the work done to the point of preservation. The transaction is not actually confirm or deny until there is a commit or a rollback.
I1 I2
P1 SAVEPOINT
SAVEPOINT
P1 ROLLBACK TO COMMIT / ROLLBACK
scopes p1, p2 depend on the transaction.
· Transactions AUTONOMOUS
are those that can confirm or reject regardless of what happens in the current transaction. Conversely, what happens to the current transaction does not affect the self.
programs are used in small or blocks. meeting was declared in the declarative as
AUTONOMOUS_TRANSACTION PRAGMA; (Establishing the autonomous transaction) ... ... ... ... ... ... ... ... ... ... .... Commit / rollback;
UPDATE UPDATE
F (X) à pragma i1 i2 i3 i4 autonomous_transaction commit;
Rollback
UPDATE UPDATE
· TRANSACTIONS OF SOLO READING
are used to ensure consistency of data retrieved from different queries against any changes that may occur between them.
The beginning of a transaction read-only set with SET TRANSACTION READ ONLY. All queries will be executed only after those changes committed before the commencement of the transaction. (As if we did a picture of the BD). It confirms or rejects commit or rollback.
before a transaction is read only to do a rollback or commit or something to end the current transaction.
Rerenfia: http://www.lopezatienza.es/oracle/oracle-control-de-transacciones/
0 comments:
Post a Comment