今天由于没有正常的先关闭源端的PUMP进程而直接关闭了备库的replicat和MGR进程。
导致PUMP进程启动不了报错如下:
OGG-01496 Oracle GoldenGate Capture for Oracle, py169.prm: Failed to open target trail file ./dirdat/tb000183, at RBA 4434691.
我对PUMP提示使用下一个trail文件
alter extract py169, ETROLLOVER
然后重新启动报错如下:
2014-07-07 14:20:05 INFO OGG-01478 Oracle GoldenGate Capture for Oracle, py169.prm: Output file ./dirdat/tb is using format RELEASE 11.2.
2014-07-07 14:20:05 INFO OGG-01026 Oracle GoldenGate Capture for Oracle, py169.prm: Rolling over remote file ./dirdat/tb000184.
2014-07-07 14:20:26 ERROR OGG-01028 Oracle GoldenGate Capture for Oracle, py169.prm: Incompatible record (101) in ./dirdat/sb000182, rba 48681981 (getting header)
同时我记录了replicat进程的最后SCN
Current Checkpoint Detail:
Read Checkpoint #1
GGS Log Trail
Startup Checkpoint (starting position in the data source):
Sequence #: 182
RBA: 48681981
Timestamp: 2014-07-07 10:33:08.815143
Extract Trail: ./dirdat/tb
Current Checkpoint (position of last record read in the data source):
Sequence #: 182
RBA: 48681981
Timestamp: Not Available
Extract Trail: ./dirdat/tb
CSN state information:
CRC: 7B-3D-9C-FA
Latest CSN: 1019744288
Latest TXN: 15.4.220038
Latest CSN of finished TXNs: 1019744288
Completed TXNs: 15.4.220038
可以发现应该是sb000182出现的问题,然后进行metalink
METALINK文档如下:
ADD EXTRACT py169, EXTTRAILSOURCE ./dirdat/sb
add rmttrail ./dirdat/tb,extract py169
ALTER EXTRACT py169, EXTSEQNO 182, EXTRBA 48681981
ALTER EXTRACT py169, EXTSEQNO 182, EXTRBA 48681710
If a trail is not corrupt, a pump or replicat can be restarted by noting the point of failure (trail number and RBA) indicated in the report and discard file. Please do not attempt this if you are not familiar with reading these reports.
This should be done on transaction boundaries or with RESTARTCOLLISIONS enabled. If you do not understand this, do not do this yourself; please have support assist you.
>logdump
logdump> log to mycase.txt
logdump> open (/ggtrail/GGODSCF/dirdat/cf000325) logdump> ghdr on
logdump> pos (RBA 19018) logdump> n
this will give you a bad header message
logdump> sfh prev
this gives you the header of the previous record start,write down the RBA value
logdump> count
if this finishes Ok and gives you a count of tables and records, the trail is OK and you can use the RBA we saved for the alter later
the trail is known to be undamaged
if this does not finish with the count, you have a bad trail and must use another recovery method, contact support.
logdump> exit
You now have a history of what you did in file mycase.txt and a written record of the RBA to use to ALTER the extract data pump or replicat
ggsci> alter
导致PUMP进程启动不了报错如下:
OGG-01496 Oracle GoldenGate Capture for Oracle, py169.prm: Failed to open target trail file ./dirdat/tb000183, at RBA 4434691.
我对PUMP提示使用下一个trail文件
alter extract py169, ETROLLOVER
然后重新启动报错如下:
2014-07-07 14:20:05 INFO OGG-01478 Oracle GoldenGate Capture for Oracle, py169.prm: Output file ./dirdat/tb is using format RELEASE 11.2.
2014-07-07 14:20:05 INFO OGG-01026 Oracle GoldenGate Capture for Oracle, py169.prm: Rolling over remote file ./dirdat/tb000184.
2014-07-07 14:20:26 ERROR OGG-01028 Oracle GoldenGate Capture for Oracle, py169.prm: Incompatible record (101) in ./dirdat/sb000182, rba 48681981 (getting header)
同时我记录了replicat进程的最后SCN
Current Checkpoint Detail:
Read Checkpoint #1
GGS Log Trail
Startup Checkpoint (starting position in the data source):
Sequence #: 182
RBA: 48681981
Timestamp: 2014-07-07 10:33:08.815143
Extract Trail: ./dirdat/tb
Current Checkpoint (position of last record read in the data source):
Sequence #: 182
RBA: 48681981
Timestamp: Not Available
Extract Trail: ./dirdat/tb
CSN state information:
CRC: 7B-3D-9C-FA
Latest CSN: 1019744288
Latest TXN: 15.4.220038
Latest CSN of finished TXNs: 1019744288
Completed TXNs: 15.4.220038
可以发现应该是sb000182出现的问题,然后进行metalink
METALINK文档如下:
ADD EXTRACT py169, EXTTRAILSOURCE ./dirdat/sb
add rmttrail ./dirdat/tb,extract py169
ALTER EXTRACT py169, EXTSEQNO 182, EXTRBA 48681981
ALTER EXTRACT py169, EXTSEQNO 182, EXTRBA 48681710
If a trail is not corrupt, a pump or replicat can be restarted by noting the point of failure (trail number and RBA) indicated in the report and discard file. Please do not attempt this if you are not familiar with reading these reports.
This should be done on transaction boundaries or with RESTARTCOLLISIONS enabled. If you do not understand this, do not do this yourself; please have support assist you.
>logdump
logdump> log to mycase.txt
logdump> open (/ggtrail/GGODSCF/dirdat/cf000325) logdump> ghdr on
logdump> pos (RBA 19018) logdump> n
this will give you a bad header message
logdump> sfh prev
this gives you the header of the previous record start,write down the RBA value
logdump> count
if this finishes Ok and gives you a count of tables and records, the trail is OK and you can use the RBA we saved for the alter later
the trail is known to be undamaged
if this does not finish with the count, you have a bad trail and must use another recovery method, contact support.
logdump> exit
You now have a history of what you did in file mycase.txt and a written record of the RBA to use to ALTER the extract data pump or replicat
ggsci> alter