当前位置:   article > 正文

OGG-00918 映射中缺少键列 id.

OGG-00918 映射中缺少键列 id.

2024-02-23 14:54:49  INFO    OGG-02756  从线索文件获取了表 GISTAR.PXPH_PON_ROUTE 的定义。.
The following columns did not default because of type mismatches:
  id

OGG-00918  映射中缺少键列 id.

目标端有字段ID,由于mysql自增,所以只能是bigint类型,而源端是生产id字段为varchar2类型,无法修改。

  1. 2024-02-23 14:54:49 INFO OGG-02756 从线索文件获取了表 GISTAR.PXPH_PON_ROUTE 的定义。.
  2. The following columns did not default because of type mismatches:
  3. id
  4. 2024-02-23 14:54:49 INFO OGG-06511 在默认映射中按名称使用以下列: SPECLINENO, INNER_ORDER, A_RESOURCE_TYPE, A_RESOURCE_TYPE_ID, A_RESOURCE_CODE, A_RESOURCE_ID, A_MOD
  5. ULE_CODE, A_MODULE_ID, A_SERIAL, A_SERIAL_ID, B_RESOURCE_TYPE, B_RESOURCE_TYPE_ID, B_RESOURCE_CODE, B_RESOURCE_ID, B_MODULE_CODE, B_MODULE_ID, B_SERIAL, B_SERIAL_ID, PHY_
  6. CONNECT_TYPE, STATUS, IS_VIRTUAL_ROUTE, USE_STATUS, ENABLED_DATE, REMARK, SAP, AREACODE, BUREAUNO, BUSINESSAREAID, PHYSICALACCESSNBR, LOGICALACCESSNBR, IPADDRESS, EQUIPRO
  7. OMID, MANAGEMENTIP.
  8. Source Context :
  9. SourceModule : [er.mapping]
  10. SourceID : [er/mapping.cpp]
  11. SourceMethod : [get_map_entry]
  12. SourceLine : [3446]
  13. ThreadBacktrace : [16] elements
  14. : [/db/ogg/mysql/libgglog.so(CMessageContext::AddThreadContext())]
  15. : [/db/ogg/mysql/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...))]
  16. : [/db/ogg/mysql/libgglog.so(_MSG_ColumnName(CSourceContext*, int, ggs::gglib::ggapp::CDBObjName<(DBObjType)13> const&, CMessageFactory::Message
  17. Disposition))]
  18. : [/db/ogg/mysql/replicat(get_map_entry(ggs::gglib::ggunicode::UString const&, int, wc_def*, ObjectMetadataRequest const&, unsigned int, unsigne
  19. d int, ggs::gglib::ggmetadata::MetadataContext&, ggs::gglib::ggmetadata::TableManager&, unsigned int, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggmetadata::CMeta
  20. dataReader*, bool, bool, bool))]
  21. : [/db/ogg/mysql/replicat(wc_def::resolve_wc_entry(ObjectMetadataRequest const&, int, ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1>*, ggs::ggl
  22. ib::ggmetadata::MetadataContext&, ggs::gglib::ggmetadata::TableManager&, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggmetadata::CMetadataReader*))]
  23. : [/db/ogg/mysql/replicat(WILDCARD_check_table(ObjectMetadataRequest const&, bool, bool, unsigned int, ggs::gglib::ggapp::CQualDBObjName<(DBObjT
  24. ype)1>*, ggs::gglib::ggmetadata::TableManager&, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggmetadata::CMetadataReader*, bool, ggs::gglib::gglcr::CommonLCR*, bool
  25. ))]
  26. : [/db/ogg/mysql/replicat(ggs::er::ERContext::findSourceMetadata(ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1> const&, int, ggs::gglib::ggmeta
  27. data::CTblMetadata*, ggs::gglib::ggmetadata::CMetadataReader*, bool))]
  28. : [/db/ogg/mysql/replicat(ggs::gglib::ggapp::ReplicationContext::sourceMetadataLookup(ggs::gglib::gglcr::CommonLCR const*))]
  29. : [/db/ogg/mysql/replicat(ggs::er::ReplicatContext::processReplicatLoop())]
  30. : [/db/ogg/mysql/replicat()]
  31. : [/db/ogg/mysql/replicat(ggs::gglib::MultiThreading::MainThread::ExecMain())]
  32. : [/db/ogg/mysql/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*))]
  33. : [/db/ogg/mysql/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
  34. : [/db/ogg/mysql/replicat(main)]
  35. : [/lib64/libc.so.6(__libc_start_main)]
  36. : [/db/ogg/mysql/replicat()]
  37. 2024-02-23 14:54:49 ERROR OGG-00918 映射中缺少键列 id.

原因是源端为varchar2,目标端是bigint,目标端复制进程增加函数转换处理即可:

  1. GGSCI (lnpg) 34> view param ir1
  2. replicat ir1
  3. targetdb resdb@192.168.207.143, userid ogg, password xxx@
  4. discardfile ./dirrpt/ir1.dsc,append,megabytes 1000
  5. MAXTRANSOPS 5000
  6. REPLACEBADCHAR ESCAPE
  7. --map gistar.*, target resdb.*, colmap (id=@NUMSTR(id), usedefaults);
  8. map gistar.pxph_pon_route , target resdb.pxph_pon_route , colmap (id=@NUMSTR(id), usedefaults) ;

源端抽取进程如下:

  1. GGSCI (lnpg) 123> view param i1
  2. extract i1
  3. USERIDALIAS oracle11g
  4. RMTHOST 192.168.207.143,MGRPORT 17809
  5. RMTTASK REPLICAT,GROUP ir1
  6. table gistar.pxph_pon_route;

相关参考:Oracle GoldenGate实现实时数据过滤和数据转换详解-CSDN博客

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/138871
推荐阅读
相关标签
  

闽ICP备14008679号