一.问题现象
主库归档日志齐全,但是备库无法接收并应用主库归档日志。
主库:
THREAD# Last Primary Seq Generated
---------- --------------------------
1 1884
2 1874
备库应用:
THREAD# Last Standby Seq Applied
---------- ------------------------
1 1503
2 1489
SQL> select * from V$ARCHIVE_GAP;
THREAD# LOW_SEQUENCE# HIGH_SEQUENCE# CON_ID
---------- ------------- -------------- ----------
2 1490 1618 1
二.计划将缺失归档手动发送到备库进行应用
1.拷贝主库归档至备库
asmcmd -p
ASMCMD [+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24] > cp thread_2_seq_1490.318.976964987 /tmp/thread_2_seq_1490.318.976964987
scp thread_2_seq_1490.318.976964987 oracle@racdg:/tmp/thread_2_seq_1490.318.976964987
2.备库注册归档
SQL> alter database register logfile '/tmp/thread_2_seq_1490.318.976964987';
alter database register logfile '/tmp/thread_2_seq_1490.318.976964987'
*
ERROR at line 1:
ORA-00317: file type 49049 in header is not log file
ORA-00334: archived log: '/tmp/thread_2_seq_1490.318.976964987'
*初步判断为归档日志损坏
三.确认主库归档日志是否损坏
SQL> oradebug setmypid
Statement processed.
SQL> alter system dump logfile '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1490.318.976964987';
alter system dump logfile '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1490.318.976964987'
*
ERROR at line 1:
ORA-00317: file type 49049 in header is not log file
ORA-00334: archived log:
'+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1490.318.976964987'
SQL> oradebug tracefile_name
/oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_ora_118586.trc
*由此判断确实为归档日志发生损坏
四.进一步分析
查看主库alert日志,发现主库归档目录爆满,从而可能是导致归档日志损坏的原因。
五.问题解决
根据当前备库的SCN,在主库上进行增量备份,然后应用到备库上。
操作步骤,参考博客:
DG归档丢失场景下重新同步physical standby
http://blog.itpub.net/15412087/viewspace-2152589/
主库归档日志齐全,但是备库无法接收并应用主库归档日志。
主库:
THREAD# Last Primary Seq Generated
---------- --------------------------
1 1884
2 1874
备库应用:
THREAD# Last Standby Seq Applied
---------- ------------------------
1 1503
2 1489
SQL> select * from V$ARCHIVE_GAP;
THREAD# LOW_SEQUENCE# HIGH_SEQUENCE# CON_ID
---------- ------------- -------------- ----------
2 1490 1618 1
二.计划将缺失归档手动发送到备库进行应用
1.拷贝主库归档至备库
asmcmd -p
ASMCMD [+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24] > cp thread_2_seq_1490.318.976964987 /tmp/thread_2_seq_1490.318.976964987
scp thread_2_seq_1490.318.976964987 oracle@racdg:/tmp/thread_2_seq_1490.318.976964987
2.备库注册归档
SQL> alter database register logfile '/tmp/thread_2_seq_1490.318.976964987';
alter database register logfile '/tmp/thread_2_seq_1490.318.976964987'
*
ERROR at line 1:
ORA-00317: file type 49049 in header is not log file
ORA-00334: archived log: '/tmp/thread_2_seq_1490.318.976964987'
*初步判断为归档日志损坏
三.确认主库归档日志是否损坏
SQL> oradebug setmypid
Statement processed.
SQL> alter system dump logfile '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1490.318.976964987';
alter system dump logfile '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1490.318.976964987'
*
ERROR at line 1:
ORA-00317: file type 49049 in header is not log file
ORA-00334: archived log:
'+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1490.318.976964987'
SQL> oradebug tracefile_name
/oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_ora_118586.trc
*由此判断确实为归档日志发生损坏
四.进一步分析
查看主库alert日志,发现主库归档目录爆满,从而可能是导致归档日志损坏的原因。
点击(此处)折叠或打开
- 2018-05-24T13:22:03.656143+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 49049 in header is not log file《==============================
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1490.318.976964987'
- ORA-17502: ksfdcre:4 Failed to create file +DGRECOVER
- ORA-15041: diskgroup "DGRECOVER" space exhausted<=============磁盘组空间已满,看起来这个损坏的归档日志应该与ASM磁盘组空间满了有关
- ORA-17502: ksfdcre:4 Failed to create file +DGRECOVER
- ORA-15041: diskgroup "DGRECOVER" space exhausted
- 2018-05-24T13:22:25.524719+08:00
- Error ORA-235 occurred during an un-locked control file transaction. This
- error can be ignored. The control file transaction will be retried.
- 2018-05-24T13:22:27.296438+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 49049 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1490.318.976964987'
- 2018-05-24T13:22:54.905226+08:00
- Error ORA-235 occurred during an un-locked control file transaction. This
- error can be ignored. The control file transaction will be retried.
- 2018-05-24T13:22:56.888381+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 49049 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1490.318.976964987'
- 2018-05-24T13:23:19.777477+08:00
- Error ORA-235 occurred during an un-locked control file transaction. This
- error can be ignored. The control file transaction will be retried.
- 2018-05-24T13:23:24.044757+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 49049 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1490.318.976964987'
- 2018-05-24T13:24:47.608317+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 8 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1512.285.976966639'
- 2018-05-24T13:24:48.364578+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 0 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1502.300.976966159'
- 2018-05-24T13:24:48.658017+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 15 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1499.303.976965985'
- 2018-05-24T13:24:53.282869+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 192 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1495.308.976965677'
- 2018-05-24T13:24:53.492761+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 49049 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1490.318.976964987'
- 2018-05-24T13:25:05.524094+08:00
- Archived Log entry 5630 added for T-2.S-1624 ID 0xe5ac04db LAD:1
- krse_arc_driver_core: Successful archiving of previously failed ORL
- Unable to create archive log file '+DGRECOVER'
- 2018-05-24T13:25:06.255375+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_arc0_41291.trc:
- ORA-19504: failed to create file "+DGRECOVER"
- ORA-17502: ksfdcre:4 Failed to create file +DGRECOVER
- ORA-15041: diskgroup "DGRECOVER" space exhausted
- ARC0: Error 19504 Creating archive log file to '+DGRECOVER'
- 2018-05-24T13:25:10.697858+08:00
- Error ORA-235 occurred during an un-locked control file transaction. This
- error can be ignored. The control file transaction will be retried.
- 2018-05-24T13:25:11.665704+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 8 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1512.285.976966639'
- 2018-05-24T13:25:13.282221+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 0 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1502.300.976966159'
- 2018-05-24T13:25:13.426907+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 15 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1499.303.976965985'
- 2018-05-24T13:25:13.563661+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 192 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1495.308.976965677'
- 2018-05-24T13:25:14.596499+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 49049 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1490.318.976964987'
- 2018-05-24T13:25:23.604762+08:00
- Error ORA-235 occurred during an un-locked control file transaction. This
- error can be ignored. The control file transaction will be retried.
- 2018-05-24T13:25:24.220078+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 8 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1512.285.976966639'
- 2018-05-24T13:25:24.586326+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 0 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1502.300.976966159'
- 2018-05-24T13:25:24.996687+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 15 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1499.303.976965985'
- 2018-05-24T13:25:25.383332+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 192 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1495.308.976965677'
- 2018-05-24T13:25:26.017913+08:00
- Errors in file /oracle/app/oracle/diag/rdbms/racdb12c/racdb12c2/trace/racdb12c2_tt00_41289.trc:
- ORA-00317: file type 49049 in header is not log file
- ORA-00334: archived log: '+DGRECOVER/RACDB12C/ARCHIVELOG/2018_05_24/thread_2_seq_1490.318.976964987'
五.问题解决
根据当前备库的SCN,在主库上进行增量备份,然后应用到备库上。
操作步骤,参考博客:
DG归档丢失场景下重新同步physical standby
http://blog.itpub.net/15412087/viewspace-2152589/
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15412087/viewspace-2155141/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15412087/viewspace-2155141/