标题: 12C中测试关闭far sync,主库如何传日志到备库 [打印本页] 作者: miss_puff 时间: 2017-12-15 16:08 标题: 12C中测试关闭far sync,主库如何传日志到备库 oracle 12C中引入了FAR SYNC的概念,FAR SYNC的作用其实就是一个日志中转站,架构如下:
主库---(传输日志)--->FAR SYNC---(传输日志)--->备库
那如果关闭FAR SYNC实例,主库如何将日志传输到备库呢?测试如下:
1、关闭far sync,查看主库alter日志,可以看到log_archive_dest_3变为valid
LGWR: Destination LOG_ARCHIVE_DEST_2 not using standby redo logfiles; cannot reconnect
2017-09-01T11:22:22.934465+08:00
Errors in file /u01/app/oracle/diag/rdbms/sztech/sztech1/trace/sztech1_lgwr_4282.trc:
ORA-01089: immediate shutdown or close in progress - no operations are permitted
Error 1089 for archive log file 2 to 'sztechfs'
2017-09-01T11:22:24.828896+08:00
LGWR: Failed to archive log 2 thread 1 sequence 224 (1089)
LGWR: Error 1041 disconnecting from destination LOG_ARCHIVE_DEST_2 standby host 'sztechfs'
2017-09-01T11:22:24.872523+08:00
Thread 1 advanced to log sequence 225 (LGWR switch)
Current log# 1 seq# 225 mem# 0: +DGDATA/SZTECH/ONLINELOG/group_1.306.949664067
2017-09-01T11:22:25.331974+08:00
Archived Log entry 486 added for T-1.S-224 ID 0xc177e9bb LAD:1
2017-09-01T11:22:25.850371+08:00
ARC2: Standby redo logfile selected for thread 1 sequence 224 for destination LOG_ARCHIVE_DEST_3
2017-09-01T11:22:26.688190+08:00
ALTER SYSTEM SET log_archive_dest_state_3='ENABLE' SCOPE=MEMORY SID='*';
2017-09-01T11:22:27.880311+08:00
Thread 1 cannot allocate new log, sequence 226
Checkpoint not complete
2、查看log_archive_dest参数
SQL>select dest_name,status,error from v$archive_dest
DEST_NAME STATUS ERROR
---------------------------------------- ------------------ -----------------------------------------------------------------
LOG_ARCHIVE_DEST_1 VALID
LOG_ARCHIVE_DEST_2 ALTERNATE ORA-01089: immediate shutdown or close in progress - no
operations are permitted
3、FAR SYNC启动之后,查看主库alter日志,可以看到LOG_ARCHIVE_DEST_2变为enable
2017-09-01T11:27:34.972858+08:00
ARC1: Standby redo logfile selected for thread 1 sequence 227 for destination LOG_ARCHIVE_DEST_2
2017-09-01T11:28:35.087153+08:00
ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=MEMORY SID='*';
2017-09-01T11:28:37.464178+08:00
Thread 1 cannot allocate new log, sequence 229
Checkpoint not complete
查看log_archive_dest参数
SQL> select dest_name,status,error from v$archive_dest