Explain how to end the current transaction in Oracle

Explain how to end the current transaction in Oracle.

Following commands could be run to explicitly end the current transaction:

a. COMMIT
b. ROLLBACK

A transaction ends when any of the following actions occurs:

1. A user issues a COMMIT or ROLLBACK statement without a SAVEPOINT clause.

2. In a commit, a user explicitly or implicitly requested that the changes in the transaction be made permanent. Changes made by the transaction are permanent and visible to other users only after a transaction commits.

3. A user runs a DDL command such as CREATE, DROP, RENAME, or ALTER.

4. The database issues an implicit COMMIT statement before and after every DDL statement. If the current transaction contains DML statements, then Oracle Database first commits the transaction and then runs and commits the DDL statement as a new, single-statement transaction.

5. A user exits normally from most Oracle Database utilities and tools, causing the current transaction to be implicitly committed. The commit behavior when a user disconnects is application-dependent and configurable.

6. Applications should always explicitly commit or undo transactions before program termination.

7. A client process terminates abnormally, causing the transaction to be implicitly rolled back using metadata stored in the transaction table and the undo segment.
Explain how oracle optimizer works
The optimization is determining the most efficient way to execute a SQL statement after considering the factors related to the objects referenced and the conditions specified in the query...
Optimization methods, i.e. cost-based approach and role-based optimization
Oracle decides how to retrieve the necessary data whenever a valid SQL statement is processed....
Oracle database tuning
Oracle includes many performance tuning enhancements like: Automatic Performance Diagnostic and Tuning Features......
Post your comment