Presentation is loading. Please wait.

Presentation is loading. Please wait.

What is Flashback? Technology that allows you to revert the database to a point in time in the past Several versions of flashback available Different types.

Similar presentations


Presentation on theme: "What is Flashback? Technology that allows you to revert the database to a point in time in the past Several versions of flashback available Different types."— Presentation transcript:

1 What is Flashback? Technology that allows you to revert the database to a point in time in the past Several versions of flashback available Different types of flashback appropriate in different circumstances

2 Flashback Database Conceptually similar to "rewinding database in time" Changes occur at block level Similar to incomplete recovery RESETLOGS must be performed Can help recovery from user error Cannot help recovery from physical corruption Cannot help recovery from loss of media

3 Flashback Query Query Database with Previous Information Single or Multiple Select Statements Good for Tracking Data Corruption Row Changes over Time Comparison of System after Bulk Update

4 Flashback Transaction Automates repair process Used in conjunction with Flashback Versions Query Can construct reversing SQL Does NOT roll back system, so RESETLOGS not needed

5 Flashback and Table Changes FLASHBACK TABLE allows you to reverse changes made on the structure of the table without affecting its contents. FLASHBACK DROP allows you to un-drop a table if needed.

6 Many different levels of database problems from which the database or data needs to be recovered Possibly most frustrating is the user error You can probably use one of the Flashback Technologies to recover with minimal downtime and data loss Choosing Wisely

7 Different Scenarios SymptomTechnology User/Tablespace Dropped or table truncated FLASHBACK DATABASE Table DroppedFLASHBACK DROP Table Structure Changed Incorrectly FLASHBACK TABLE User Error Data Entered Incorrectly and Saved FLASHBACK TRANSACTION Just want to view what the data looked like in the past. FLASHBACK QUERY

8 Configuring Flashback Database SQL>ALTER SYSTEM SET DB_RECOVERY_FILE_DEST= '/BIG_FLASH_RECOVERY_AREA'; SQL>ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=16G; SQL>ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=2880 SQL>SHUTDOWN IMMEDIATE; SQL>STARTUP MOUNT SQL>ALTER DATABASE FLASHBACK ON; SQL>ALTER DATABASE OPEN;

9 Monitoring Basics Retention "target" is just that Check for FLASHBACK being enabled: SQL>SELECT FLASHBACK_ON FROM V$DATABASE; Unix check for Recovery Writer ( RVWR ) process $ps –ef | grep -i rvwr

10 Estimating Space Space needed for flashback logs: SQL>SELECT * FROM v$flashback_database_log Disk I/O for flashback area: SQL>SELECT * FROM v$flashback_database_stat

11 Using the Enterprise Manager Recovery Wizard to Flashback Database Log in to EM Click the Maintenance link Select the Perform Recovery option Select Datafiles to be recovered Select "Recover to current time"

12 Using the Enterprise Manager Recovery Wizard to Flashback Database Wait 3-5 minutes then click "Perform Recovery" button Provide credentials Select "Whole Database" as object to be recovered Choose "Recover to the current time or a previous point-in-time" Click "Next" button in upper-right-hand corner

13 Using the Enterprise Manager Recovery Wizard to Flashback Database Select "Recover to a prior point-in-time" Enter SCN greater than oldest flashback SCN, then click Next Click "Yes, use flashback to bring the database back to the specified point-in- time" button, then click Next Review RMAN script then click SUBMIT

14 Flash Recovery Area This area is the default location for all recovery-related files. These files can include the following: Archive logs RMAN backups Controlfile auto-backups Multiplexed controlfiles Redo log copies Flashback log files

15 Recovery Area Space Usage If it gets full what happens? Recovery area contains only RMAN files: Backups don't occur. Recovery area contains only archive logs: DML ceases until space is cleared. FLASHBACK DATABASE enabled: Target time will not be met.

16 Reclaiming Space The V$RECOVERY_FILE_DEST view gives an overall view of space utilization. You can have RMAN reclaim some of this space by executing the DELETE OBSOLETE command from within RMAN.


Download ppt "What is Flashback? Technology that allows you to revert the database to a point in time in the past Several versions of flashback available Different types."

Similar presentations


Ads by Google