You can use the FLASHBACK DATABASE command to rewind the database to a target time, SCN, or log sequence number. This command works by undoing changes made by Oracle Database to the data files that exist when you run the command.
FLASHBACK DATABASE is usually much faster than a RESTORE operation followed by point-in-time recovery, because the time needed to perform FLASHBACK DATABASE depends on the number of changes made to the database since the desired flashback time. On the other hand, the time needed to do a traditional point-in-time recovery from restored backups depends on the size of the database.
The limitation of FLASHBACK is, it can not fix the physical failures; In a day to day scenario, this is unlikely. But, DBAs should be aware of it.
FLASHBACK DATABASE is usually much faster than a RESTORE operation followed by point-in-time recovery, because the time needed to perform FLASHBACK DATABASE depends on the number of changes made to the database since the desired flashback time. On the other hand, the time needed to do a traditional point-in-time recovery from restored backups depends on the size of the database.
The limitation of FLASHBACK is, it can not fix the physical failures; In a day to day scenario, this is unlikely. But, DBAs should be aware of it.
Is Flashback Enabled?
Use the below query to find out whether the FLASHBACK is enabled or not.
select flashback_on from v$database;
How to Enable FLASHBACK?
ALTER DATABASE FLASHBACK ON;
ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=5760;
CREATE RESTORE POINT Mil_ref_point GUARANTEE FLASHBACK DATABASE;
DB_FLASHBACK_RETENTION_TARGET --> The Parameter (in minutes) defines the upper limit how far the database can be flashed back.
How do we FLASHBACK?
Please make sure the point of time, you need to restore.
- shutdown immediate;
- startup mount
- FLASHBACK DATABASE TO RESTORE POINT Mil_ref_point;
- alter database open resetlogs;
How to Disable the FLASHBACK?
ALTER DATABASE FLASHBACK OFF;
How to know the Oldest Snapshot the database can be flashback to?
SELECT oldest_flashback_time FROM v$flashback_database_log;
No comments:
Post a Comment