一個source table可以mapping 兩個target tables嗎?
OS version:Linux 2.6.9-42.ELlargesmp #1 SMP Wed Jul 12 23:46:39 EDT 2006 x86_64 GNU/Linux Redhat 5.4OGG version:Version 11.1.1.1.2
oracle version:10.2.0.4
EXTRACT 參數設置:
extract FMEXT
userid oggadmin,password oggadmin123
rmthost 10.178.1.68,mgrport 7810
rmttrail /PHACR_D01/oracle/ogg/dirdat/f1
dynamicresolution
discardfile /PHACW_D01/oracle/ogg/errorlog/FMEXT.dsc,append,megabytes 100m
table SMTMESPD.MES_MAT_MATERIAL_RECEIVE;
REPLICAT 參數設置:
replicat FMREP
userid oggadmin,password oggadmin123
sourcedefs /PHACR_D01/oracle/ogg/dirsql/append.sql
applynoopupdates
overridedups
reperror default,discard
discardfile /PHACR_D01/oracle/ogg/errorlog/fmrep.dsc,append,megabytes 100m
map SMTMESPD.MES_MAT_MATERIAL_RECEIVE, target FMMESPD.C_SMALLROLL,
colmap (BIGROLLID=material_lot_id,
CREATETIME=Create_date,
CREATEUSER=CREATE_USER,
FACTORYNAME=fab,
LASTEVENTTIME=MODIFY_DATE,
LASTEVENTUSER=MODIFY_USER,
MATERIALID=MATERIAL_ID,
MATERIALSTATE=state,
MATERIALSIZE=MATERIAL_SIZE,
PRODID=PRODUCT_ID,
QTY=QUANTITY,
SMALLROLLID=reel_id,
USED=@case(state,"USED","Y","N"));
map SMTMESPD.MES_MAT_MATERIAL_RECEIVE, target FMMESPD.C_CARTON,
colmap (CARTONID=reel_id,
CREATEDDATE=create_date,
DELIVERYID=material_lot_id,
FACTORYID=fab,
GLASSQTY=quantity,
PRODUCTID=product_id,
REMAINQTY=remain_quantity,
USED=@case(state,"USED","Y","N"),
USEDDATE=modify_date);
三個TABLE的主鍵:
SMTMESPD.MES_MAT_MATERIAL_RECEIVE的PK(REEL_ID,material_lot_id,FAB)
FMMESPD.C_CARTON的PK(FACTORYID,DELIVERYID,CARTONID)
FMMESPD.C_SMALLROLL的PK(SMALLROLLID,MATERIALID,FACTORYNAME)
source table的PK值有對應上target tables的PK值
problem:
我去update SMTMESPD.MES_MAT_MATERIAL_RECEIVE set FAB='B' where FAB='A'的時候,C_SMALLROLL這個表不會更新,但是C_CARTON能更新,雖然有報錯,對應刪除的情況也是一樣。
Current time: 2015-04-01 15:05:00
Operation failed at seqno 10 rba 10947
Discarding record on action DISCARD on error 0
Problem replicating SMTMESPD.MES_MAT_MATERIAL_RECEIVE to FMMESPD.C_SMALLROLL
Mapping problem with compressed key update record (target format)...
*
FACTORYNAME = A
SMALLROLLID = 53T5800009
FACTORYNAME = A
SMALLROLLID = 53T5800009
BIGROLLID = 20150326000TEST
*
Current time: 2015-04-01 15:05:00
Operation failed at seqno 10 rba 10947
Discarding record on action DISCARD on error 1403
Problem replicating SMTMESPD.MES_MAT_MATERIAL_RECEIVE to FMMESPD.C_CARTON
Record not found
Mapping problem with compressed key update record (target format)...
*
FACTORYID = A
DELIVERYID = 20150326000TEST
CARTONID = 53T5800009
FACTORYID = B
DELIVERYID = 20150326000TEST
CARTONID = 53T5800009
*
OGG是根據主鍵去replicate資料的話,按道理應該可以同時更新兩個表的。
MES_MAT_MATERIAL_RECEIVE有表級附加日誌的。
等着,,继续等着,我看有没有满意的答案 insert是沒有問題,但是update還有delete都是有問題的,看了官方文檔也沒有什麼頭緒。難道source 端的DML只能給引用一次?然後其他的表就報抓不到record的錯了,跟before image有什麼聯繫嗎? 应该可以 可以先做个测试
页:
[1]