Friday, June 21, 2019

How To Enable And Disable Flashback In Oracle Database

How To Enable And Disable Flashback In Oracle Database

ENABLE FLASHBACK:

 Make sure the database is in archive log mode :
SQL> alter system set db_recovery_file_dest='/u01/app/oracle';
System altered.
SQL> alter system set db_recovery_file_dest_size=50G;
System altered.
SQL> show parameter db_recovery_file
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /u01/app/oracle
db_recovery_file_dest_size big integer 50G

SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO

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


DISABLE 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

No comments: