1. Determine the range of SCN and get gap log sequence via alert log
Gap-thread 1 Sequence 109631-117170
2, according to the sequence to obtain the starting point SCN
Tip The minimum gap sequence is 109631, push forward a sequence, and then obtain the SCN number
Select thread#,sequence#,first_change#,next_change# from V$archived_log where sequence#=109630;
thread# sequence# first_change# next_change#
---------- ---------- ------------- ------------
1 109630 1606624354 1606624958
3, in primary to do based on the SCN incremental backup and generate a new repository control file
# #增量备份数据库
Export Oracle_sid=xxx
CONFIGURE CHANNEL DEVICE TYPE DISK maxpiecesize-M;
Backup incremental from SCN 1606624354 database format '/oradata/dgbackup/xxx/xxx_1606624354%u.bak ';
--Create standby controlfile in primary
ALTER DATABASE create standby Controlfile as '/oradata/dgbackup/xxx/xxx01.ctl ';
4, standby database closed, replace the control file
--Close the repository and back up the current repository control file
Shutdown immediate
Mv/oradata/xxx/control01.ctl/oradata/xxx/control01.ctl.bak
Replace the current repository control file
Cp/oradata/dgbackup/xxx/xxx01.ctl/oradata/xxx/control01.ctl
5. Start the standby repository for incremental recovery
-----Start the database to Nomount
Startup Nomount;
----Start the database to mount
ALTER DATABASE mount standby database;
# #rman增量恢复
Catalog start with '/oradata/dgbackup/inscndbkf ';
Recover database Noredo;
6. Start the standby copy application
-----Start Recovery
Sqlplus/as SYSDBA
ALTER database RECOVER MANAGED STANDBY database USING current LOGFILE DISCONNECT from SESSION;
Processing Oracle DG replication gap with incremental backup recovery