- 最后登录
- 2015-4-23
- 在线时间
- 3 小时
- 威望
- 0
- 金钱
- 19
- 注册时间
- 2015-4-1
- 阅读权限
- 10
- 帖子
- 2
- 精华
- 0
- 积分
- 0
- UID
- 2397
|
1#
发表于 2015-4-1 15:31:47
|
查看: 4831 |
回复: 4
OS version:Linux 2.6.9-42.ELlargesmp #1 SMP Wed Jul 12 23:46:39 EDT 2006 x86_64 GNU/Linux Redhat 5.4
OGG 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有表級附加日誌的。 |
|