Wednesday, April 17, 2013

11gR2 Flashback Guaranteed Restore Point without enabling Flashback logging

First of all let’s turn OFF Archive log mode and ensure NO flashback logging.
SQL> startup mount
ORACLE instance started.
Total System Global Area 456146944 bytes
Fixed Size 1344840 bytes
Variable Size 398461624 bytes
Database Buffers 50331648 bytes
Redo Buffers 6008832 bytes
Database mounted.

SQL> alter system archive log stop;
System altered.

SQL> alter database noarchivelog;
Database altered.

SQL> select * from v$restore_point;
no rows selected

SQL> alter database open;
Database altered.

SQL> archive log list
Database log mode
No Archive Mode
Automatic archival Disabled
Archive destination /RMAN/ARCHIVE_DIR
Oldest online log sequence 1162
Current log sequence 1164

SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO
Without flashback logging being ON let’s put archive log mode back enabled and create the restore point.
SQL> alter system archive log start;
System altered.

SQL> alter database archivelog;
Database altered.

SQL> alter database open;
Database altered.

SQL> select * from v$restore_point;
no rows selected

SQL> create restore point test2 guarantee flashback database;
Restore point created.

SQL> select NAME, GUARANTEE_FLASHBACK_DATABASE from v$restore_point;
NAME       GUA        
---------- ---------------------
TEST2      YES        

SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
RESTORE POINT ONLY
So with flashback logging off but archive log mode enabled we were able to create the restore point even with the database open. In previous versions the first restore point had to be created in mounted mode. This is no longer the case in 11gR2. Even though the request is to backup and delete the archive logs (backup archivelog all delete input;), RMAN will backup all the archive logs but will NOT remove any archive log required to maintain a guaranteed restore point. The warning is shown: RMAN-08139: WARNING: archived redo log not deleted, needed for guaranteed restore point

From: https://blogs.oracle.com/Bakers_Byte/entry/11gr2_flashback_guaranteed_restore_point

No comments:

Post a Comment