OraclePhysicalDataGuard使用RMAN增量备份修复GAP(四)

2014-11-24 16:55:48 · 作者: · 浏览: 7
oging done


List of Cataloged Files
=======================
File Name: /u01/app/oracle/arch/0pp0q956_1_1
File Name: /u01/app/oracle/arch/0qp0q95l_1_1

--Standby恢复数据库,注意这样并不会把Standby库recover到一致状态,因为主库备份时是在线的,但是recover完之后的状态是可以来做standby的managed recovery的,Standby库是mount状态。
RMAN> recover database noredo;


Starting recover at 17-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=513 devtype=DISK
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/standby/system01.dbf
destination for restore of datafile 00002: /u01/app/oracle/oradata/standby/undotbs01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/standby/sysaux01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/standby/users01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/standby/example01.dbf
destination for restore of datafile 00006: /u01/app/oracle/oradata/standby/zwc.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/arch/0pp0q956_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/arch/0pp0q956_1_1 tag=TAG20140217T000910
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished recover at 17-FEB-14


RMAN>

--Standby还原控制文件
RMAN> shutdown immediate


using target database control file instead of recovery catalog
database dismounted
Oracle instance shut down


RMAN> startup nomount


connected to target database (not started)
Oracle instance started


Total System Global Area 612368384 bytes


Fixed Size 2085872 bytes
Variable Size 167775248 bytes
Database Buffers 436207616 bytes
Redo Buffers 6299648 bytes


RMAN> restore standby controlfile from '/tmp/0rp0qavt_1_1';


Starting restore at 17-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=541 devtype=DISK


channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
output filename=/u01/app/oracle/standby.ctl
Finished restore at 17-FEB-14


RMAN> alter database mount
2> ;


database mounted
released channel: ORA_DISK_1


RMAN>

--Standby应用日志
SQL> alter database recover managed standby database disconnect from session;


Database altered.

--Standby alert.log

alter database recover managed standby database disconnect from session
Mon Feb 17 00:46:40 2014
Attempt to start background Managed Standby Recovery process (standby)
MRP0 started with pid=28, OS id=3968
Mon Feb 17 00:46:40 2014
MRP0: Background Managed Standby Recovery process started (standby)
Managed Standby Recovery not using Real Time Apply
parallel recovery started with 2 processes
Mon Feb 17 00:46:45 2014
Waiting for all non-current ORLs to be archived...
Media Recovery Waiting for thread 1 sequence 78
Fetching gap sequence in thread 1, gap sequence 78-88
Mon Feb 17 00:46:46 2014
Completed: alter database recover managed standby database disconnect from session
Mon Feb 17 00:46:47 2014
Using STANDBY_ARCHIVE_DEST parameter default value as /arch
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[1]: Assigned to RFS process 3974
RFS[1]: Identified database type as 'physical standby'
Mon Feb 17 00:46:47 2014
RFS LogMiner: Client disabled from further notification
Mon Feb 17 00:46:47 2014
Redo Shipping Client Connected as P