Database Reference
In-Depth Information
Flashback technologies is that they do not require DBA-level privileges. Users and
developers can utilize them to recover from their own errors without DBA intervention
(except for Flashback Database).
Managing Undo Automatically
Before we can delve too deeply into Flashback technologies, it is important to understand
that all of the Flashback options covered in this chapter, except for Flashback Database
and Flashback Drop, work in conjunction with Oracle's undo functionality. Without undo,
there would be no Flashback. In fact, without undo, transaction processing as we know it
would not exist.
The topics of undo and undo management should not be new to you and will not be cov-
ered in depth here. However, we believe that a brief overview of the subject will be helpful in
better understanding Flashback technologies and how they work.
In the following sections, you will take a look at undo and Automatic Undo
Management (AUM) . First, we will define undo and its purpose. You will discover how
Oracle can automatically manage undo on your behalf. Then you will learn how undo
sizing and undo record retention play a key role in Flashback technologies.
Uncovering Undo
So what exactly is “undo” and why does it need to be managed? Undo is a key component of
the Oracle database that stores a record of every change made to data in the database. This
record contains the data necessary to undo the change (in other words, roll back the trans-
action) and restore the data to its previous condition. For example, when a row in a table is
updated, Oracle will create an undo record that stores the data that was changed. If a new row
is inserted into a table, an undo record will be created that will effectively delete the row.
Maintaining undo records serves multiple purposes in the database:
Transaction processing
Failed-transaction recovery
Read consistency
Flashback functionality
Let's look at each of these individually.
Processing Transactions
Transaction processing allows SQL statements to be grouped into discrete units of work
that can be committed or rolled back as one. The classic example is that of woman walking
into a bank and asking to transfer $500 from her checking account to her savings account.
Behind the scenes, two SQL statements are executed: one that subtracts $500 from her
checking-account balance and one that adds $500 to her savings-account balance.
Search WWH ::




Custom Search