goldengate命令輸入錯誤導致的血案2

msdnchina發表於2011-04-16

環境介紹:

源頭:rhel5 32bit,oracle10.2.0.4 32bit ,goldengate v11.1.1 for oracle 10g 32bit

目的地:rhel5 32bit,oracle10.2.0.4 32bit ,goldengate v11.1.1 for oracle 10g 32bit

源頭的goldengate 配置沒有問題,info all 命令都是running

目的地的goldengate 配置看似沒有問題,雖然info all 命令都是running

從源頭做了幾個dml操作後,檢視源頭extract程式和datapump程式的統計資訊:

stats extract ext 和 stats extract datapump,都反饋如下的結果


*** Daily statistics since 2011-04-15 21:12:07 ***
Total inserts 1.00
Total updates 0.00
Total deletes 1.00
Total discards 0.00
Total operations 2.00

檢視目的地的replicat程式的統計資訊 stats replicat rep

GGSCI (host1) 1> stats replicat rep

Sending STATS request to REPLICAT REP ...

No active replication maps
DDL replication statistics:

*** Total statistics since replicat started ***
Operations 0.00
Mapped operations 0.00
Unmapped operations 0.00
Other operations 0.00
Excluded operations 0.00
Errors 0.00
Retried errors 0.00
Discarded errors 0.00
Ignored errors 0.00

後來發現居然是目的端add replicat 命令寫錯了:

錯誤的:add replicat rep, exttrail /u01/dirdat/bj , CHECKPOINTTABLE goldengate.ckpttable

正確的:add replicat rep, exttrail /u01/ggs/dirdat/bj , CHECKPOINTTABLE goldengate.ckpttable

此問題是透過檢視原始的部署指令碼看出來的(部署指令碼就寫錯了)

此問題也可以透過如下命令檢視rep程式和trail檔案的對應關係:

GGSCI (host1) 11> info replicat rep, detail

REPLICAT REP Last Started 2011-04-15 21:12 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:08 ago)
Log Read Checkpoint File /u01/dirdat/bj000000
First Record RBA 0[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/161195/viewspace-1048758/,如需轉載,請註明出處,否則將追究法律責任。

相關文章