|
Read the same principle is to query the record this point in time is determined by the query, even if behind the change, but also according to the rewind held before the mirror record, to take the data that point. Oracle is how to ensure it? First, we must be aware of two situations:
1, SCN: System Change Number. This is a decrease not only increase the incremental number is present in the smallest unit block in ORACLE, but a piece of change SCN is incremented.
2, the database rollback segment track, the groove of things are used to allocate space for the rollback. If you update a block, the transaction will be written into the transaction slot. If you do not commit or rollback, the block there is an active transaction, the database blocks read times can recognize the existence of such a situation.
Therefore, Oracle is doing a consistent read, first look launch of SCN SCN is greater than the current query block if less than no doubt get the first image data from the rollback segment. If indeed greater than the current SCN SCN query block, make sure that the block is no active transactions, or otherwise to find the mirror before going.
So ORACLE rollback can either roll back the data, and can ensure the consistency of Reading. |
|
|
|