0% found this document useful (0 votes)
10 views3 pages

Enabling Flashback in oracle

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 3

hazem************************ Flashback ************************

How To Enable And Disable Flashback In Oracle Database :

By using flashback technology we can restore the database to a particular point in past. It’s
like time machine.
Here we will see , how to enable and disable flashback in oracle.
****************** Before enabling flashback ******************

Make sure the database is in archive log mode :


SQL > select name,log_mode from v$database;

SQL > archive log list

If not in the archive mode :


SQL > archive log list

---- make sure db is running in spfile

SQL > alter system set log_archive_dest_1='LOCATION=/uv1249/arch/PROD' scope=spfile;

SQL >shutdown immediate;

SQL > startup mount

SQL >alter database archivelog;

SQL >alter database open;

SQL >select name,log_mode from v$database;

SQL >archive log list


************************ ENABLE FLASHBACK: ************************
To enable flashback we need to set two parameters: DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE

SQL> alter system set db_recovery_file_dest='/u01/app/oracle/fast_recovery_area';


SQL> alter system set db_recovery_file_dest_size= 2g
SQL> show parameter db_recovery_file

*********Turn on flashback:*********

SQL> select flashback_on from v$database;


SQL> alter database flashback on;
SQL> select flashback_on from v$database;

# Repair error
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38708: not enough space for first flashback database log file
Increase FRA! Sql> alter system set db_recovery_file_dest_size=10000M;
*********Turn off flashback:*********

SQL> select flashback_on from v$database;


FLASHBACK_ON
------------------
YES
SQL> alter database flashback off;
Database altered.
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO

*************************************end*************************************

You might also like