When reconciling to SCN (System Change Number) in the hot backup resync for RAC, how do you determine which SCN number to reconcile to:
sp_ctrl (sysB)> reconcile queue SysA for o.oraA-o.oraB SCN xxx
USING RMAN:
You can use RMAN to recover the target database to a specific SCN.
recover ...UNTIL SCN = integer
Specifies an SCN as an upper limit. RMAN selects only files that can be used to recover up to but not including the specified SCN.
For example, RESTORE DATABASE UNTIL SCN 1000 chooses only backups that could be used to recover to SCN 1000.
RUN
{
ALLOCATE CHANNEL ch1 TYPE sbt;
RESTORE DATABASE;
RECOVER DATABASE UNTIL SCN 1000; # recovers through SCN 999
ALTER DATABASE OPEN RESETLOGS;
}
Shareplex internal code will reconcile to the specified SCN -1.
In this case, the SCN# you specify in the reconcile command is 1000. Transactions committed up to and including SCN 999 will be removed from shareplex queues.
sp_ctrl> reconcile queue SysA for o.oraA-o.oraB SCN 1000
USING STANDBY DATABASE METHOD:
IMPORTANT NOTE:
In a RAC systems one SCN is in the logs from instance1 and instance2. After a log switch on both instances this SCN is completely in the archive logs. With this archive logs I recover my standby database.
Forgetting to do logswitch on one of the instances may cause out of syncs on the target as the standby database recovers only the log from the other threads but no the one from the instance where the log switch was not done. Opening a standby database on read only mode will not generate an error.
RAC only, you need to reconcile to the same SCN# you specified when using RMAN recovered ..UNTIL SCN