[OCM 12C] Configuring and monitoring Flashback Database

Database Backup and Recovery User’s Guide -> 7 Using Flashback Database and Restore Points
Database Backup and Recovery User’s Guide -> 18 Performing Flashback and Database Point-in-Time Recovery
Database Backup and Recovery User’s Guide -> 21 Performing RMAN Tablespace Point-in-Time Recovery (TSPITR)
Database Administration -> Database 2 Day DBA -> 9.8.2 Recovering a Dropped Table Using Oracle Flashback Drop

– V$UNDOSTAT
– DBA_RECYCLEBIN

SQL> select CURRENT_SCN from v$database;

“Creating a normal restore point assigns a restore point name to an SCN or specific point in time. Thus, a restore point functions as a bookmark or alias for this SCN. Before performing any operation that you may have to reverse, you can create a normal restore point. The control file stores the name of the restore point and the SCN.”.

Creating Normal and Guaranteed Restore Points

The following example shows how to create a normal restore point in SQL*Plus:

SQL> CREATE RESTORE POINT before_upgrade;

This example shows how to create a guaranteed restore point:

SQL> CREATE RESTORE POINT before_upgrade GUARANTEE FLASHBACK DATABASE;

Enabling Flashback Database

1- Ensure the database instance is open or mounted. If the instance is mounted, then the database must be shut down cleanly unless it is a physical standby database. Other Oracle RAC instances can be in any mode.

2- Configure the recovery area as described in “Enabling the Fast Recovery Area”.

3- Optionally, set the DB_FLASHBACK_RETENTION_TARGET to the length of the desired flashback window in minutes:

ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=4320; # 3 days

4- Enable the Flashback Database feature for the whole database:

ALTER DATABASE FLASHBACK ON;

5- Optionally, disable flashback logging for specific tablespaces.

By default, flashback logs are generated for all permanent tablespaces. You can reduce overhead by disabling flashback logging for specific tablespaces as in the following example:

ALTER TABLESPACE tbs_3 FLASHBACK OFF;

You can re-enable flashback logging for a tablespace later with this command:

ALTER TABLESPACE tbs_3 FLASHBACK ON;

If you disable Flashback Database for a tablespace, then you must take its data files offline before running FLASHBACK DATABAS

Related posts

Leave a Comment