Below are the steps to enable flashback on
1. Set up these parameters db_recovery_file_dest and db_recovery_file_dest_size
2. Put the database in archive log mode.
3. Issue command alter database flashback on;
Steps done by me:
SQL> select FLASHBACK_ON from v$database;To put physical standby database in flashback mode we have to stop the real time apply and then do it :
FLASHBACK_ON
------------------
NO
SQL>
SQL> show parameter db_recovery
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string +FRA
db_recovery_file_dest_size big integer 12G
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 196
Next log sequence to archive 197
Current log sequence 197
SQL>
SQL> alter database flashback on;
Database altered.
SQL> select FLASHBACK_ON from v$database;
FLASHBACK_ON
------------------
YES
SQL>
SQL> select FLASHBACK_ON from v$database;
FLASHBACK_ON
------------------
NO
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ ONLY WITH APPLY
SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-01153: an incompatible media recovery is active
SQL>
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ ONLY
SQL>
SQL> alter database flashback on;
Database altered.
SQL> alter database recover managed standby database using current logfile disconnect;
Database altered.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ ONLY WITH APPLY
SQL> select FLASHBACK_ON from v$database;
FLASHBACK_ON
------------------
YES
SQL>
No comments:
Post a Comment