Subscribe to Posts by Email

Subscriber Count

    701

Disclaimer

All information is offered in good faith and in the hope that it may be of use for educational purpose and for Database community purpose, but is not guaranteed to be correct, up to date or suitable for any particular purpose. db.geeksinsight.com accepts no liability in respect of this information or its use. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content and if notify any such I am happy to remove. Product and company names mentioned in this website may be the trademarks of their respective owners and published here for informational purpose only. This is my personal blog. The views expressed on these pages are mine and learnt from other blogs and bloggers and to enhance and support the DBA community and this web blog does not represent the thoughts, intentions, plans or strategies of my current employer nor the Oracle and its affiliates or any other companies. And this website does not offer or take profit for providing these content and this is purely non-profit and for educational purpose only. If you see any issues with Content and copy write issues, I am happy to remove if you notify me. Contact Geek DBA Team, via geeksinsights@gmail.com

Pages

12c Database : RMAN Enhancement : Rollfoward standby using network service without incremental backups

As discussed, earlier, Another important nice feature in RMAN from 12c is using network based recovery or incremental backup strategy from the servics. This eliminates taking incremental backups or copy those backup to standby and saves lot of time. Lets check, On Primary, check the latest log

Check on Primary

	SQL> archive log list
	Database log mode              Archive Mode
	Automatic archival             Enabled
	Archive destination            USE_DB_RECOVERY_FILE_DEST
	Oldest online log sequence     93
	Next log sequence to archive   95
	Current log sequence           95

On Primary Check the current_scn

	SQL> select current_scn from v$database;

	CURRENT_SCN
	-----------
	    2205519

	SQL>

On standby , cancel the media recovery just to get a gap for our test.

	RMAN> alter database recover managed standby database cancel;

	Statement processed

On Standby check the mrp process and the recover done until sequence 94

	SQL> select process,status,sequence# from v$managed_standby;

	PROCESS   STATUS        SEQUENCE#
	--------- ------------ ----------
	ARCH      CLOSING              88
	ARCH      CLOSING              93
	ARCH      CONNECTED             0
	ARCH      CLOSING              94
	ARCH      CLOSING              91
	RFS       IDLE                  0
	RFS       IDLE                 95
	RFS       IDLE                  0

	8 rows selected.

	SQL>

On standby database , connect to rman and give following command

	RMAN> recover database from service db12c using compressed backupset;

	Starting recover at 15-SEP-13
	using channel ORA_DISK_1
	using channel ORA_DISK_2
	using channel ORA_DISK_3
	using channel ORA_DISK_4
	using channel ORA_DISK_5
	skipping datafile 5; already restored to SCN 1733202
	skipping datafile 7; already restored to SCN 1733202
	channel ORA_DISK_1: starting incremental datafile backup set restore
	channel ORA_DISK_1: using compressed network backup set from service db12c
	destination for restore of datafile 00001: /u01/app/oracle/oradata/STBY12C/system01.dbf
	channel ORA_DISK_2: starting incremental datafile backup set restore
	channel ORA_DISK_2: using compressed network backup set from service db12c
	destination for restore of datafile 00003: /u01/app/oracle/oradata/STBY12C/sysaux01.dbf
	channel ORA_DISK_3: starting incremental datafile backup set restore
	channel ORA_DISK_3: using compressed network backup set from service db12c
	destination for restore of datafile 00004: /u01/app/oracle/oradata/STBY12C/undotbs01.dbf
	channel ORA_DISK_4: starting incremental datafile backup set restore
	channel ORA_DISK_4: using compressed network backup set from service db12c
	destination for restore of datafile 00006: /u01/app/oracle/oradata/STBY12C/new/users01.dbf
	channel ORA_DISK_5: starting incremental datafile backup set restore
	channel ORA_DISK_5: using compressed network backup set from service db12c
	destination for restore of datafile 00008: /u01/app/oracle/oradata/STBY12C/pdb12c/system01.dbf
	channel ORA_DISK_3: restore complete, elapsed time: 00:00:15
	channel ORA_DISK_3: starting incremental datafile backup set restore
	channel ORA_DISK_3: using compressed network backup set from service db12c
	destination for restore of datafile 00009: /u01/app/oracle/oradata/STBY12C/pdb12c/sysaux01.dbf
	channel ORA_DISK_5: restore complete, elapsed time: 00:00:30
	channel ORA_DISK_5: starting incremental datafile backup set restore
	channel ORA_DISK_5: using compressed network backup set from service db12c
	destination for restore of datafile 00010: /u01/app/oracle/oradata/STBY12C/pdb12c/pdb12c_users01.dbf
	channel ORA_DISK_5: restore complete, elapsed time: 00:00:03
	channel ORA_DISK_5: starting incremental datafile backup set restore
	channel ORA_DISK_5: using compressed network backup set from service db12c
	destination for restore of datafile 00011: /u01/app/oracle/oradata/STBY12C/pdb12c/testtbs.dbf
	channel ORA_DISK_5: restore complete, elapsed time: 00:00:03
	channel ORA_DISK_2: restore complete, elapsed time: 00:01:08
	channel ORA_DISK_3: restore complete, elapsed time: 00:00:53
	channel ORA_DISK_1: restore complete, elapsed time: 00:01:38

	channel ORA_DISK_4: restore complete, elapsed time: 00:03:28

	starting media recovery

	archived log for thread 1 with sequence 95 is already on disk as file /u01/app/oracle/fast_recovery_area/STBY12C/archivelog/2013_09_15/o1_mf_1_95_93cctlpl_.arc
	archived log file name=/u01/app/oracle/fast_recovery_area/STBY12C/archivelog/2013_09_15/o1_mf_1_95_93cctlpl_.arc thread=1 sequence=95
	media recovery complete, elapsed time: 00:00:01
	Finished recover at 15-SEP-13
Note the lines using compressed network backup, yes the backup is from network not the local.
As you observed, without taking a incremental backup in production and copying that backup in standby and initiate recovery, 
with single command the network recover and standby rollfoward has been performed. This nice feature definetely saves lot of time 
in preparing the environments and reduce manual intervention.
 
Just check the Sync


	On Primary
	SQL> select current_scn from v$database;

	CURRENT_SCN
	-----------
	    2209958

	SQL>


	On Standby, Almost near
	RMAN> select current_scn from v$database;

	CURRENT_SCN
	-----------

2209938

-Thanks
Geek DBA

Comments are closed.