上文中Oracle12c_DataGuard_part_2_far_sync
提到了Far Sync Instance的配置,配置在参数中配置了max_failure=1 alternate=log_archive_dest_3 参数。当dest_2出现问题时会切到打dest_3进行传输日志。下面测试下Far Sync Instance出现问题时,dest_3是否能正常运行
关于此参数参考http://docs.oracle.com/database/121/SBYDB/log_arch_dest_param.htm#SBYDB01102
关闭Far Sync Instance
orcl_fs > shutdown abort ORACLE instance shut down. orcl_fs > alert Sun May 10 16:18:40 2015 Shutting down instance (abort) License high water mark = 8 Sun May 10 16:18:40 2015 USER (ospid: 2450): terminating the instance Sun May 10 16:18:41 2015 Instance terminated by USER, pid = 2450 Sun May 10 16:18:41 2015 Instance shutdown complete |
主库切换日志
16:18:48 primary_orcl >ALTER system switch logfile; System altered. 16:18:59 primary_orcl > |
查看主库日志
Sun May 10 16:18:40 2015 LGWR: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (3113) LGWR: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned Sun May 10 16:18:40 2015 Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_lgwr_5560.trc: ORA-03113: end-of-file on communication channel Error 3113 for archive log file 3 to 'orclfs' LGWR: Error 1041 disconnecting from destination LOG_ARCHIVE_DEST_2 standby host 'orclfs' Sun May 10 16:18:40 2015 Destination LOG_ARCHIVE_DEST_2 is UNSYNCHRONIZED --dest 2 变为未同步 LGWR: Failed to archive log 3 thread 1 sequence 96 (3113) Sun May 10 16:18:41 2015 Error 1034 received logging on to the standby Sun May 10 16:18:41 2015 Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_lgwr_5560.trc: ORA-01034: ORACLE not available Sun May 10 16:18:41 2015 Error 1034 for archive log file 1 to 'orclfs' LGWR: Failed to archive log 1 thread 1 sequence 97 (1034) Sun May 10 16:18:41 2015 ARC0: LGWR is scheduled to archive destination LOG_ARCHIVE_DEST_3 after log switch Sun May 10 16:18:41 2015 Thread 1 advanced to log sequence 97 (LGWR switch) Current log# 1 seq# 97 mem# 0: /oradata/orcl/redo01.log Sun May 10 16:18:41 2015 ARC0: Standby redo logfile selected for thread 1 sequence 96 for destination LOG_ARCHIVE_DEST_3 --dest 3生效 Sun May 10 16:18:41 2015 Archived Log entry 75 added for thread 1 sequence 96 ID 0x53634e8b dest 1: Sun May 10 16:18:56 2015 Destination LOG_ARCHIVE_DEST_3 is UNSYNCHRONIZED ****************************************************************** LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_3 --dest 3生效 ****************************************************************** Sun May 10 16:18:56 2015 Destination LOG_ARCHIVE_DEST_2 no longer supports SYNCHRONIZATION Starting background process NSS3 Sun May 10 16:18:56 2015 NSS3 started with pid=43, OS id=6925 LGWR: Standby redo logfile selected to archive thread 1 sequence 98 LGWR: Standby redo logfile selected for thread 1 sequence 98 for destination LOG_ARCHIVE_DEST_3 Sun May 10 16:18:59 2015 Thread 1 advanced to log sequence 98 (LGWR switch) Current log# 2 seq# 98 mem# 0: /oradata/orcl/redo02.log Sun May 10 16:18:59 2015 Archived Log entry 77 added for thread 1 sequence 97 ID 0x53634e8b dest 1: Sun May 10 16:18:59 2015 ARC3: Standby redo logfile selected for thread 1 sequence 97 for destination LOG_ARCHIVE_DEST_3 Sun May 10 16:19:02 2015 Thread 1 cannot allocate new log, sequence 99 Checkpoint not complete Current log# 2 seq# 98 mem# 0: /oradata/orcl/redo02.log Sun May 10 16:19:05 2015 Destination LOG_ARCHIVE_DEST_3 is SYNCHRONIZED LGWR: Standby redo logfile selected to archive thread 1 sequence 99 LGWR: Standby redo logfile selected for thread 1 sequence 99 for destination LOG_ARCHIVE_DEST_3 Sun May 10 16:19:05 2015 Thread 1 advanced to log sequence 99 (LGWR switch) Current log# 3 seq# 99 mem# 0: /oradata/orcl/redo03.log Sun May 10 16:19:05 2015 Archived Log entry 80 added for thread 1 sequence 98 ID 0x53634e8b dest 1: |
备库dg alert日志
Sun May 10 16:18:42 2015 Archived Log entry 22 added for thread 1 sequence 96 ID 0x53634e8b dest 1: Sun May 10 16:18:42 2015 Media Recovery Waiting for thread 1 sequence 97 Sun May 10 16:18:59 2015 Primary database is in MAXIMUM AVAILABILITY mode Standby controlfile consistent with primary Standby controlfile consistent with primary RFS[8]: Assigned to RFS process (PID:6114) RFS[8]: Selected log 4 for thread 1 sequence 98 dbid 1399018635 branch 871237903 Sun May 10 16:18:59 2015 RFS[9]: Assigned to RFS process (PID:6116) RFS[9]: Selected log 5 for thread 1 sequence 97 dbid 1399018635 branch 871237903 Sun May 10 16:18:59 2015 Archived Log entry 23 added for thread 1 sequence 97 ID 0x53634e8b dest 1: Sun May 10 16:19:00 2015 Media Recovery Log /oradata/archivelog/1_97_871237903.dbf Media Recovery Waiting for thread 1 sequence 98 (in transit) Sun May 10 16:19:00 2015 Recovery of Online Redo Log: Thread 1 Group 4 Seq 98 Reading mem 0 Mem# 0: /oradata/orcl/sby_redo04.log Sun May 10 16:19:05 2015 Changing standby controlfile to MAXIMUM AVAILABILITY level Sun May 10 16:19:05 2015 Archived Log entry 24 added for thread 1 sequence 98 ID 0x53634e8b dest 1: RFS[8]: Selected log 5 for thread 1 sequence 99 dbid 1399018635 branch 871237903 Sun May 10 16:19:05 2015 Media Recovery Waiting for thread 1 sequence 99 (in transit) Sun May 10 16:19:05 2015 Recovery of Online Redo Log: Thread 1 Group 5 Seq 99 Reading mem 0 Mem# 0: /oradata/orcl/sby_redo05.log |
备库显示正常。