Managing Data and Concurrency (Transactions)

Transactions

we do not have to, but we can manually set the start of the transaction with

SET TRANSACTION

we can also set SAVEPOINT as a point in commands to which we want to rollback to.

SAVEPOINT savepoint_name;

Manual rollback is done with the ROLLBACK command and it has to be done before the statements are committed. Just ROLLBACK will return the state to that of the beginning of the transaction. If we want to rollback to some point in the transaction we need to rollback to a certain savepoint with

ROLLBACK TO savepoint_name;

Committing is done with a COMMIT command. DDL statements are automatically committed and they can not be rolledback.

It is possible to write command

SET AUTOCOMMIT ON

and then COMMIT will be automatically appended to every DML statement.

When a user exit SQL*PLUS correctly (with EXIT command), Oracle issues COMMIT automatically.

Locking

Row level or Table Level.
Exclusive mode or Shared mode.

Write more on this topic!!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: