--在Primary找到丢失归档的SCN
SQL> select first_change# from v$archived_log where sequence#=38;
FIRST_CHANGE#
-------------
783058
--Primary增量备份,将SCN大于783058的block备份出来,并且传到Standby的一个空目录中
[oracle@vzwc arch]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Mon Feb 17 00:08:38 2014
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: DBSERVER (DBID=66428446)
RMAN> backup device type disk incremental from scn 783058 database
2> format '/u01/app/oracle/arch/%U';
Starting backup at 17-FEB-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=513 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/dbserver/system01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/dbserver/sysaux01.dbf
input datafile fno=00006 name=/u01/app/oracle/oradata/dbserver/zwc.dbf
input datafile fno=00005 name=/u01/app/oracle/oradata/dbserver/example01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/dbserver/undotbs01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/dbserver/users01.dbf
channel ORA_DISK_1: starting piece 1 at 17-FEB-14
channel ORA_DISK_1: finished piece 1 at 17-FEB-14
piece handle=/u01/app/oracle/arch/0pp0q956_1_1 tag=TAG20140217T000910 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 17-FEB-14
channel ORA_DISK_1: finished piece 1 at 17-FEB-14
piece handle=/u01/app/oracle/arch/0qp0q95l_1_1 tag=TAG20140217T000910 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
RMAN>
--在Primary生成standby controlfile,并且传到Standby
RMAN> backup current controlfile for standby format '/tmp/%U';
Starting backup at 17-FEB-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=509 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including standby control file in backupset
channel ORA_DISK_1: starting piece 1 at 17-FEB-14
channel ORA_DISK_1: finished piece 1 at 17-FEB-14
piece handle=/tmp/0rp0qavt_1_1 tag=TAG20140217T004029 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 17-FEB-14
--Standby RMAN注册备份文件,Standby库要是mount状态
[oracle@dgstb arch]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Mon Feb 17 00:13:39 2014
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: DBSERVER (DBID=66428446, not open)
RMAN> catalog start with '/u01/app/oracle/arch';
using target database control file instead of recovery catalog
searching for all files that match the pattern /u01/app/oracle/arch
List of Files Unknown to the Database
=====================================
File Name: /u01/app/oracle/arch/0pp0q956_1_1
File Name: /u01/app/oracle/arch/0qp0q95l_1_1
Do you really want to catalog the above files (enter YES or NO) yes
cataloging files...
catal