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!!!
Leave a comment