Flashback
Flashback database and backup scenario:
------------------------------------------------
If you flashback a database to a GRP (Guaranteed Restore Point) that has been set in the database, all backups that were taken after the GRP was created can no longer be used. You can however restore the database to a point in time prior to the GRP creation.
SQL> shutdown immediate
startup mount
flashback database to restore point TEST;
Total System Global Area 384143360 bytes
Fixed Size 2154016 bytes
Variable Size 301990368 bytes
Database Buffers 75497472 bytes
Redo Buffers 4501504 bytes
Database mounted.
SQL>
Flashback complete.
SQL> alter database open resetlogs;
Database altered.
Now you can restore and recover the database from any backup taken BEFORE the GRP was created. See below:
------------------------------------------------
If you flashback a database to a GRP (Guaranteed Restore Point) that has been set in the database, all backups that were taken after the GRP was created can no longer be used. You can however restore the database to a point in time prior to the GRP creation.
SQL> shutdown immediate
startup mount
flashback database to restore point TEST;
Total System Global Area 384143360 bytes
Fixed Size 2154016 bytes
Variable Size 301990368 bytes
Database Buffers 75497472 bytes
Redo Buffers 4501504 bytes
Database mounted.
SQL>
Flashback complete.
SQL> alter database open resetlogs;
Database altered.
Now you can restore and recover the database from any backup taken BEFORE the GRP was created. See below:
Recovery Manager: Release 11.1.0.7.0 - Production on Thu Dec 2 11:03:52 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: SBX11107 (DBID=472398487, not open)
RMAN> run {
2> restore database;
3> recover database;
4> }
Starting restore at 02-DEC-2010
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=152 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00002 to /u03/oradata/sbx11107/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u03/oradata/sbx11107/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /u02/oradata/sbx11107/xmldb_01.dbf
channel ORA_DISK_1: reading from backup piece /orabkup/sbx11107/rman/datafile_l0/df_sbx11107_02Dec10_1054_451_1_dbf.rmn
channel ORA_DISK_1: piece handle=/orabkup/sbx11107/rman/datafile_l0/df_sbx11107_02Dec10_1054_451_1_dbf.rmn tag=SBX11107_INCR. LEV 0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:36
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
.....
.....
.....
.....
.....
channel ORA_DISK_1: piece handle=/orabkup/sbx11107/rman/datafile_l0/df_sbx11107_02Dec10_1054_450_1_dbf.rmn tag=SBX11107_INCR. LEV 0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:35
Finished restore at 02-DEC-2010
Starting recover at 02-DEC-2010
using channel ORA_DISK_1
starting media recovery
archived log file name=/orabkup/temp_arch/1_1_736684842.dbf thread=1 sequence=1
archived log file name=/orabkup/temp_arch/1_2_736684842.dbf thread=1 sequence=2
archived log file name=/orabkup/temp_arch/1_3_736684842.dbf thread=1 sequence=3
media recovery complete, elapsed time: 00:00:02
Finished recover at 02-DEC-2010
RMAN> sql 'alter database open';
sql statement: alter database open
RMAN>
Comments