Oracle goldengate的觸發器錯誤 OGG-00869

mengzhaoliang發表於2011-06-24

Goldengate在複製程式replicat報錯:

如下日誌:

2011-06-24 16:25:21  WARNING OGG-00869  OCI Error ORA-04098: trigger 'T_MLOG_LOG_DTL_SUBMIT_STATE' is invalid and failed re-validation (status = 4098), SQL .

 

2011-06-24 16:25:21  WARNING OGG-01004  Aborted grouped transaction on 'MLOG_ADM_DAILY_LOG_ORG_DTL', Database error 4098 (ORA-04098: trigger 'T_MLOG_LOG_DTL_SUBMIT_STATE' is invalid and failed re-validation).

 

2011-06-24 16:25:21  WARNING OGG-01003  Repositioning to rba 34721235 in seqno 25.

 

2011-06-24 16:25:21  WARNING OGG-01003  Repositioning to rba 34721235 in seqno 25.

 

Source Context :

  SourceModule            : [er.main]

  SourceID                : [/mnt/ecloud/workspace/Build_OpenSys_r11.1.1.0.15_001_[41784]/perforce/src/app/er/rep.c]

  SourceFunction          : [take_rep_err_action]

  SourceLine              : [15809]

 

2011-06-24 16:25:21  ERROR   OGG-01296  Error mapping from MLOG_ADM_DAILY_LOG_ORG_DTL to MLOG_ADM_DAILY_LOG_ORG_DTL.

 

可以在目標端資料庫disable該觸發器。

查詢需要disable的觸發器

select 'alter trigger '||owner||'.'||trigger_name||' disable;' from dba_triggers t where wner='UserTest'
and t.status!=
'DISABLED'

 

執行查詢的指令碼:

alter trigger UserTest.T_MLOG_LOG_DTL_SUBMIT_STATE disable;

 

 

在源庫修改觸發器,或傳輸到目標端的資料庫,並且把目標端的觸發器修改成enable

所在需要在目標端資料庫的replicat程式限制觸發器:

DDL INCLUDE OBJNAME "UserTest.*", &

EXCLUDE OBJNAME "TRIGGER",&

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

相關文章