ogg找不到归档日志。
描述:由于长时间没启动ogg进程,源库的归档日志已经被清除,ogg的源库抽取进程卡住abend状态;查看ggserr.log,分析故障原因:
2017-09-26 13:43:59 INFO OGG-01513 Oracle GoldenGate Capture for Oracle, E_LISDB.prm: Positioning to Sequence 1341, RBA 27043856, SCN 0.17271992.
2017-09-26 13:45:20 ERROR OGG-00446 Oracle GoldenGate Capture for Oracle, E_LISDB.prm: Could not find archived log for sequence 1341 thread 1 under default destinations SQL
跟据显示信息得知。抽取进程找不到指定的归档日志。所以abend。
查找归档日志信息:
select * from v$log_history order by recid ;
RECID | STAMP | THREAD# | SEQUENCE# | FIRST_CHANGE# | FIRST_TIME | NEXT_CHANGE# | RESETLOGS_CHANGE# | RESETLOGS_TIME | |
1 | 1491 | 953856025 | 1 | 1491 | 18977573 | 2017/9/4 22:00:20 | 18984561 | 1 | 2016/11/4 13:59:35 |
2 | 1492 | 953856039 | 1 | 1492 | 18984561 | 2017/9/5 0:00:25 | 18984671 | 1 | 2016/11/4 13:59:35 |
3 | 1493 | 953856115 | 1 | 1493 | 18984671 | 2017/9/5 0:00:39 | 18992033 | 1 | 2016/11/4 13:59:35 |
4 | 1494 | 953857774 | 1 | 1494 | 18992033 | 2017/9/5 0:01:55 | 18995132 | 1 | 2016/11/4 13:59:35 |
5 | 1495 | 953887937 | 1 | 1495 | 18995132 | 2017/9/5 0:29:34 | 19017578 | 1 | 2016/11/4 13:59:35 |
6 | 1496 | 953914742 | 1 | 1496 | 19017578 | 2017/9/5 8:52:17 | 19039984 | 1 | 2016/11/4 13:59:35 |
7 | 1497 | 953935208 | 1 | 1497 | 19039984 | 2017/9/5 16:19:02 | 19057775 | 1 | 2016/11/4 13:59:35 |
系统中已经没有该日志了。
于是只能重新同步;
具体操作过程如下:
清理进程:
alter ext e_lisdb ,begin now
alter ext p_lisdb,begin now
alter ext t_lisdb ,begin now
1、expdp备份源库
select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
22198317
expdp system/oracle@lis directory=dmpdir dumpfile=expdp%date:~,4%%date:~5,2%%date:~8,2%.dmp logfile=expdp%date:~,4%%date:~5,2%%date:~8,2%.log full=y flashback_scn=22198317
2、impdp导入目标库
2.1 清理原有数据
drop user user123 cascade;
2.2 impdp
impdp system/oracle@lisogg directory=DATA_PUMP_DIR dumpfile=EXPDPLIS20170926.DMP logfile=0926.log schemas='user123'
4、启动ogg进程
start r_lisdb,aftercsn 22198317