gototopgototop
User Rating: / 0
PoorBest 
Article Index
1. Flashback Database
2. Flashback Database Window
3. Flashback logs:
4. Restore points
5. Oracle Flashback Query
6. Oracle Flashback Version Query
7. Oracle Flashback Transaction Query
8. Oracle Flashback Table
9. Oracle Flashback Drop

Oracle Flashback Technology provides a set of new features to view and rewind data back and forth in time. The Flashback features offer the capability to query historical data, perform change analysis, and perform self-service repair to recover from logical corruptions while the database is online. With Oracle Flashback Technology, you can indeed undo the past!

Alternatives and fater then to Point-in-Time Recovery.

Typical user-errors may include accidental deletion of valuable data, deleting the wrong data, and dropping the wrong table.

Oracle 10g Flashback Technologies includes

  • Flashback Database
  • Flashback Table
  • Flashback Drop
  • Flashback Versions Query
  • Flashback Transaction Query

1. Flashback Database

  • Enables you to wind your entire database backward in time, reversing the effects of unwanted database changes within a given time window.
  • Current datafiles revert to their contents at a past time. it does not require you to restore datafiles from backup.
  • Dropping a tablespace or shrinking a datafile cannot be reversed with Flashback Database. After such an operation, the flashback database window begins at the time immediately following that operation.
  • Flashback Database uses its own logging mechanism, creating flashback logs which are stored in the flash recovery area
  • To enable Flashback Database, you set up a flash recovery area, and set a flashback retention target, to specify how far back into the past you want to be able to restore your database with Flashback Database

  • Flashback Database (FLASHBACK DATABASE command), accessible from RMAN and SQL*Plus

Limitations:

  • Flashback Database can only undo changes to a datafile made by an Oracle database. It cannot be used to repair media failures, or to recover from accidential deletion of datafiles.
  • You cannot use Flashback Database to undo a shrink datafile operation.
  • If the database control file is restored from backup or re-created, all accumulated flashback log information is discarded. You cannot use FLASHBACK DATABASE to return to a point in time before the restore or re-creation of a control file.

Requirements

  • Database must be running in ARCHIVELOG mode
  • You must have a flash recovery area enabled, because flashback logs can only be stored in the flash recovery area.
  • For Real Application Clusters databases, the flash recovery area must be stored in a clustered file system or in ASM.

2. Flashback Database Window

  • The range of SCNs for which there is currently enough flashback log data to support the FLASHBACK DATABASE command is called the flashback database window.
  • The flashback database window cannot extend further back than the earliest SCN in the available flashback logs.

3. Flashback logs:

  • Flashback Database uses flashback logs to access past versions of data blocks, as well as some information from the archived redo log. You can configure to generate flashback logs to repair your database.
  • Flashback logs cannot be backed up outside the flash recovery area • The logging for Flashback Database and guaranteed restore points is based upon capturing images of datafile blocks before changes are applied, so that these images can be used to return the datafiles to their previous state when a FLASHBACK DATABASE command is executed.

4. Restore points

Provides capabilities related to Flashback Database there are two types of restore points.

Normal Restore Points

  • Normal restore points are the aliases for SCNs in recovery operations. You can refer to the target time using the name of the restore point instead of a time expression or SCN
  • The name of the restore point and the SCN are recorded in the control file.
  • Used with Flashback Database, Flashback Table, or point-in-time recovery.
  • Normal restore points are very lightweight. Normal restore points eventually age out of the control file if not manually deleted, so they require no ongoing maintenance.
  • Followings Commands Supports the Use of Restore Points
1
2
RECOVER DATABASE AND FLASHBACK DATABASE commands IN RMAN
FLASHBACK TABLE statement IN SQL*Plus

 

Guaranteed Restore Points

  • Like normal restore points, guaranteed restore points can be used as aliases for SCNs in recovery operations. However, they also provide specific functionality related to the use of the Flashback Database feature.
  • A guaranteed restore point can be used to revert a whole database to a known good state days or weeks ago.
  • Shrinking a datafile or dropping a tablespace can prevent flashing back the affected datafiles to the guaranteed restore point.
  • Guaranteed restore points provide a useful alternative to storage snapshots, which are often used to protect a database before risky operations like large-scale database updates, or application patching or upgrading.
  • You can create a guaranteed restore point on a primary or standby database, and then perform the risky operation, with the certainty that the required flashback logs are retained.
  • Guaranteed restore points never age out of the control file. They remain until they are explicitly dropped.

5. Oracle Flashback Query

lets you specify a target time and then run queries against your database. A user could choose a target time before the error and run a query to retrieve the contents of the lost rows.

6. Oracle Flashback Version Query

lets you view all the versions of all the rows that ever existed in one or more tables in a specified time interval. You can also retrieve metadata about the differing versions of the rows. This feature can be used both to recover lost data values and to audit changes to the tables queried.

7. Oracle Flashback Transaction Query

lets you view changes made by a single transaction, or by all the transactions during a period of time.

8. Oracle Flashback Table

returns a table to its state at a previous point in time. You can restore table data while the database is online, undoing changes only to the specified table.

Note: Flashback Table, Flashback Query, Flashback Transaction Query and Flashback Version Query all rely on undo data.

9. Oracle Flashback Drop

Reverses the effects of a DROP TABLE statement. Flashback Drop is built around a mechanism called the Recycle Bin, which Oracle uses to manage dropped database objects until the space they occupied is needed to store new data.

Flashback Drop is faster than other recovery mechanisms, such as point-in-time recovery, and does not lead to any loss of recent transactions or downtime.

When you drop a table, the database does not immediately remove the space associated with the table. Instead, the table is renamed and, along with any associated objects, it is placed in the Recycle Bin of the database. The Flashback Drop operation recovers the table from the recycle bin.

 What is the Recycle Bin?
The recycle bin is a logical container for all dropped tables and their dependent objects. When a table is dropped, the database will store the table, along with its dependent objects in the recycle bin so that they can be recovered later. Dependent objects which are stored in the recycle bin include indexes, constraints, triggers, nested tables, LOB segments and LOB index segments.

Limitations on Flashback Drop

  • The recycle bin functionality is only available for non-system, locally managed tablespaces.
  • There is no fixed amount of space allocated to the recycle bin, and no guarantee as to how long dropped objects remain in the recycle bin.
  • You can perform Flashback Query on tables in the recycle bin, but only by using the recycle bin name. You cannot use the original name of the table.
  • Due to security concerns, tables which have Fine-Grained Auditing (FGA) and Virtual Private Database (VPD) policies defined over them are not protected by the recycle bin.
  • Partitioned index-organized tables are not protected by the recycle bin.
    The recycle bin does not preserve referential constraints on a table. If a table had referential
  • Constraints before it was dropped , then re-create any referential constraints after you retrieve the table from the recycle bin.

 

Related Articles

  1. FlashBack Database Technology [Part-1] [Introduction]
  2. FlashBack Database Technology [Part-2] [Set up and Maintain flashback database]
  3. FlashBack Database Technology [Part-3] [Set up and Maintain Restore points]
  4. FlashBack Database Technology [Part-4] [Flashback Database]
  5. FlashBack Database Technology [Part-5] [Flashback and Database Point-in-Time Recovery (Coming Soon)] 

Last Updated (Tuesday, 24 November 2009 11:35)