If the current transaction contains any DML statements, Oracle first commits the transaction, and then runs and commits the DDL statement as a new, single statement transaction. After one transaction ends, the next executable SQL statement automatically starts the following transaction. Committing a transaction means making permanent the changes performed by the SQL statements within the transaction. Oracle has generated undo information. The undo information contains the old data values changed by the SQL statements of the transaction.
Oracle has generated redo log entries in the redo log buffer of the SGA. The redo log record contains the change to the data block and the change to the rollback block. These changes may go to disk before a transaction is committed. The changes have been made to the database buffers of the SGA. The i nternal transaction table for the associated undo tablespace records that the transaction has committed, and the corresponding unique system change number SCN of the transaction is assigned and recorded in the table.
It also writes the transaction's SCN to the redo log file. This atomic event constitutes the commit of the transaction. Oracle Database Application Developer's Guide - Fundamentals for more information on asynchronous commit. Rolling back means undoing any changes to data that have been performed by SQL statements within an uncommitted transaction.
Oracle uses undo tablespaces or rollback segments to store old values. The redo log contains a record of changes. Oracle lets you roll back an entire uncommitted transaction.
Alternatively, you can roll back the trailing portion of an uncommitted transaction to a marker called a savepoint. In rolling back an entire transaction , without referencing any savepoints, the following occurs:. Oracle undoes all changes made by all the SQL statements in the transaction by using the corresponding undo tablespace. Oracle Database Backup and Recovery Basics for information about what happens to committed and uncommitted changes during recovery.
You can declare intermediate markers called savepoints within the context of a transaction. Savepoints divide a long transaction into smaller parts. Using savepoints, you can arbitrarily mark your work at any point within a long transaction.
You then have the option later of rolling back work performed before the current point in the transaction but after a declared savepoint within the transaction. For example, you can use savepoints throughout a long complex series of updates, so if you make an error, you do not need to resubmit every statement. Savepoints are similarly useful in application programs.
If a procedure contains several functions, then you can create a savepoint before each function begins. Then, if a function fails, it is easy to return the data to its state before the function began and re-run the function with revised parameters or perform a recovery action. After a rollback to a savepoint, Oracle releases the data locks obtained by rolled back statements. Other transactions that were waiting for the previously locked resources can proceed.
Other transactions that want to update previously locked rows can do so. When a transaction is rolled back to a savepoint, the following occurs:.
Oracle preserves the specified savepoint, but all savepoints that were established after the specified one are lost. Oracle releases all table and row locks acquired since that savepoint but retains all data locks acquired previous to the savepoint.
Whenever a session is waiting on a transaction, a rollback to savepoint does not free row locks. This refers to locks obtained before the savepoint to which has been rolled back. Row locks obtained after this savepoint are released, as the statements executed after the savepoint have been rolled back completely.
You can name a transaction, using a simple and memorable text string. This name is a reminder of what the transaction is about. Transaction names replace commit comments for distributed transactions, with the following advantages:. It is easier to monitor long-running transactions and to resolve in-doubt distributed transactions. You can view transaction names along with transaction IDs in applications. For example, a database administrator can view transaction names in Enterprise Manager when monitoring system activity.
Transaction names are written to the transaction auditing redo record, if compatibility is set to Oracle9 i or higher.
LogMiner can use transaction names to search for a specific transaction from transaction auditing records in the redo log. When you name a transaction, you associate the transaction's name with its ID.
Transaction names do not have to be unique; different transactions can have the same transaction name at the same time by the same owner. You can use any name that enables you to distinguish the transaction.
In previous releases, you could associate a comment with a transaction by using a commit comment. However, a comment can be associated with a transaction only when a transaction is being committed. Commit comments are still supported for backward compatibility. However, Oracle strongly recommends that you use transaction names. Commit comments are ignored in named transactions. An innovation release gives you the bleeding-edge functionality in the Oracle database.
Oracle call it leading-edge. The main thing here is you only get 2 years of Premier Support and no extended support. If you go this route you are committing to a quicker upgrade cycle. What I can see happening is a company will avoid innovation releases unless there is a killer feature they need now, which makes them willing to accept the regular upgrade cycle until that feature makes it into the next long term release.
That might mean most databases in their estate are on long term releases, but a couple of databases are using innovation releases. Oracle database 20c was available in preview on Oracle Cloud, but the crazy times of meant it never made it to general availability.
Instead we jumped straight to 21c, as if 20c never happened. Oracle Database releases are categorized by five numeric segments that indicate release information. Oracle Database releases are categorized by five numeric segments, which are divided by periods.
The first, second, fourth, and fifth numerals provide information about the Oracle Database release:. First numeral: Oracle Database major release number. For example: Oracle 11 g ; Oracle 12 c.
0コメント