截取了一部分日志信息:
切换时原主库现备库shdg的日志:
Sun Jun 24 19:48:03 2012
Thread 1 cannot allocate new log, sequence 71
Checkpoint not complete
Current log# 1 seq# 70 mem# 0: /home/app/oracle/oradata/shpri/redo01.log
Thread 1 closed at log sequence 71
Successful close of redo thread 1
ARCH: Noswitch archival of thread 1, sequence 71
ARCH: End-Of-Redo Branch archival of thread 1 sequence 71
Archived Log entry 231 added for thread 1 sequence 71 ID 0x47d384ac dest 1:
ARCH: Archiving is disabled due to current logfile archival
Primary will check for some target standby to have received all redo
Final check for a synchronized target standby. Check will be made once.
LOG_ARCHIVE_DEST_2 is a potential Physical Standby switchover target
Active, synchronized target has been identified
Target has also applied all redo
Backup controlfile written to trace file /home/app/oracle/diag/rdbms/shpri/shpri/trace/shpri_ora_1334.trc
Clearing standby activation ID 1205044396 (0x47d384ac)
The primary database controlfile was created using the
'MAXLOGFILES 16' clause.
There is space for up to 13 standby redo logfiles
Use the following SQL commands on the standby database to create
standby redo logfiles that match the primary database:
ALTER DATABASE ADD STANDBY LOGFILE 'srl1.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl2.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl3.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl4.f' SIZE 52428800;
Archivelog for thread 1 sequence 71 required for standby recovery
Switchover: Primary controlfile converted to standby controlfile succesfully.
Sun Jun 24 19:50:13 2012
MRP0 started with pid=17, OS id=6632
MRP0: Background Managed Standby Recovery process started (shpri)
Serial Media Recovery started
Managed Standby Recovery not using Real Time Apply
Online logfile pre-clearing operation disabled by switchover
Media Recovery Log /home/app/oracle/archive/1_71_786222847.arc
Identified End-Of-Redo for thread 1 sequence 71
Resetting standby activation ID 0 (0x0)
Media Recovery End-Of-Redo indicator encountered
Media Recovery Applied until change 1253528
MRP0: Media Recovery Complete: End-Of-REDO (shpri)
MRP0: Background Media Recovery process shutdown (shpri)
Sun Jun 24 19:50:27 2012
Waiting for MRP0 pid 6632 to terminate
Switchover: Complete - Database shutdown required (shpri)
Sun Jun 24 19:50:27 2012
idle dispatcher 'D000' terminated, pid = (17, 1)
Completed: alter database commit to switchover to physical standby with session shutdown
日志中显示检测原备库shdg已经apply全部日志了
当时原备库现主库shdg的日志:
Sun Jun 24 19:48:13 2012
Media Recovery Log /home/app/oracle/archive/1_70_786222847.arc
Media Recovery Waiting for thread 1 sequence 71
Sun Jun 24 19:49:09 2012
RFS[6]: Assigned to RFS process 14196
RFS[6]: Identified database type as 'physical standby': Client is ARCH pid 28183
Sun Jun 24 19:50:12 2012
RFS[7]: Assigned to RFS process 14227
RFS[7]: Identified database type as 'physical standby': Client is Foreground pid 1334
RFS[7]: Opened log for thread 1 sequence 71 dbid 1201613339 branch 786222847
Archived Log entry 45 added for thread 1 sequence 71 rlc 786222847 ID 0x47d384ac dest 2:
Sun Jun 24 19:50:13 2012
RFS[8]: Assigned to RFS process 14229
RFS[8]: Identified database type as 'physical standby': Client is Foreground pid 1334
Sun Jun 24 19:50:24 2012
Media Recovery Log /home/app/oracle/archive/1_71_786222847.arc
Identified End-Of-Redo for thread 1 sequence 71
Resetting standby activation ID 1205044396 (0x47d384ac)
Media Recovery End-Of-Redo indicator encountered
Media Recovery Applied until change 1253528
Sun Jun 24 19:50:24 2012
MRP0: Media Recovery Complete: End-Of-REDO (shdg)
MRP0: Background Media Recovery process shutdown (shdg)
Sun Jun 24 20:07:37 2012
alter database commit to switchover to primary
ALTER DATABASE SWITCHOVER TO PRIMARY (shdg)
Maximum wait for role transition is 15 minutes.
Backup controlfile written to trace file /home/app/oracle/diag/rdbms/shdg/shdg/trace/shdg_ora_13730.trc
SwitchOver after complete recovery through change 1253528
Online log /home/app/oracle/oradata/shdg/redo01.log: Thread 1 Group 1 was previously cleared
Online log /home/app/oracle/oradata/shdg/redo02.log: Thread 1 Group 2 was previously cleared
Online log /home/app/oracle/oradata/shdg/redo03.log: Thread 1 Group 3 was previously cleared
Standby became primary SCN: 1253526
Switchover: Complete - Database mounted as primary
原备库现主库shdg在切换时也用sequence为71的log做完recover了,并且两个库的scn是同步的。