Pages

Tuesday 17 April 2012

Database FLASHBACK mode: Overview

Database FLASHBACK mode: Overview

Oracle flashback database is an extension of the "rollback" functionality, allowing the DBA to flashback a table to a specific date in history.  With Oracle flashback, the length of the flashback recovery is determined by the storage dedicated to Oracle UNDO and the settings for flashback database parameters.

Flashback Database Command

Oracle flashback database is implemented via the flashback database command.  Flashback database allows you to quickly bring your database to a prior point in time by undoing all of the changes that have taken place since that time. The Oracle database flashback process is fast, because you do not need to restore the backups.

How to check whether FLASHBACK is ON/OFF on your database?

SELECT FLASHBACK_ON FROM V$DATABASE;

How to ON flashback of your database?

ALTER DATABASE FLASHBACK ON;

How to OFF flashback of your database?

ALTER DATABASE FLASHBACK OFF;

Example

Enable database to ON the flashback mode and open the database with the following statements:

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE FLASHBACK ON;
ALTER DATABASE OPEN;

With your database open for at least a day, you can flash back the database one day with the following statements:

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
FLASHBACK DATABASE TO TIMESTAMP SYSDATE-1;

Turning ON/OFF Flashback on a particular Namespace:

ALTER TABLESPACE <tablespace_name> FLASHBACK ON;
ALTER TABLESPACE <tablespace_name> FLASHBACK OFF;

No comments:

Post a Comment

About the Author

I have more than 10 years of experience in IT industry. Linkedin Profile

I am currently messing up with neural networks in deep learning. I am learning Python, TensorFlow and Keras.

Author: I am an author of a book on deep learning.

Quiz: I run an online quiz on machine learning and deep learning.