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类型,无法修改。

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

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
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_
CONNECT_TYPE, STATUS, IS_VIRTUAL_ROUTE, USE_STATUS, ENABLED_DATE, REMARK, SAP, AREACODE, BUREAUNO, BUSINESSAREAID, PHYSICALACCESSNBR, LOGICALACCESSNBR, IPADDRESS, EQUIPRO
OMID, MANAGEMENTIP.

Source Context :
  SourceModule            : [er.mapping]
  SourceID                : [er/mapping.cpp]
  SourceMethod            : [get_map_entry]
  SourceLine              : [3446]
  ThreadBacktrace         : [16] elements
                          : [/db/ogg/mysql/libgglog.so(CMessageContext::AddThreadContext())]
                          : [/db/ogg/mysql/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...))]
                          : [/db/ogg/mysql/libgglog.so(_MSG_ColumnName(CSourceContext*, int, ggs::gglib::ggapp::CDBObjName<(DBObjType)13> const&, CMessageFactory::Message
Disposition))]
                          : [/db/ogg/mysql/replicat(get_map_entry(ggs::gglib::ggunicode::UString const&, int, wc_def*, ObjectMetadataRequest const&, unsigned int, unsigne
d int, ggs::gglib::ggmetadata::MetadataContext&, ggs::gglib::ggmetadata::TableManager&, unsigned int, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggmetadata::CMeta
dataReader*, bool, bool, bool))]
                          : [/db/ogg/mysql/replicat(wc_def::resolve_wc_entry(ObjectMetadataRequest const&, int, ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1>*, ggs::ggl
ib::ggmetadata::MetadataContext&, ggs::gglib::ggmetadata::TableManager&, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggmetadata::CMetadataReader*))]
                          : [/db/ogg/mysql/replicat(WILDCARD_check_table(ObjectMetadataRequest const&, bool, bool, unsigned int, ggs::gglib::ggapp::CQualDBObjName<(DBObjT
ype)1>*, ggs::gglib::ggmetadata::TableManager&, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggmetadata::CMetadataReader*, bool, ggs::gglib::gglcr::CommonLCR*, bool
))]
                          : [/db/ogg/mysql/replicat(ggs::er::ERContext::findSourceMetadata(ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1> const&, int, ggs::gglib::ggmeta
data::CTblMetadata*, ggs::gglib::ggmetadata::CMetadataReader*, bool))]
                          : [/db/ogg/mysql/replicat(ggs::gglib::ggapp::ReplicationContext::sourceMetadataLookup(ggs::gglib::gglcr::CommonLCR const*))]
                          : [/db/ogg/mysql/replicat(ggs::er::ReplicatContext::processReplicatLoop())]
                          : [/db/ogg/mysql/replicat()]
                          : [/db/ogg/mysql/replicat(ggs::gglib::MultiThreading::MainThread::ExecMain())]
                          : [/db/ogg/mysql/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*))]
                          : [/db/ogg/mysql/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
                          : [/db/ogg/mysql/replicat(main)]
                          : [/lib64/libc.so.6(__libc_start_main)]
                          : [/db/ogg/mysql/replicat()]

2024-02-23 14:54:49  ERROR   OGG-00918  映射中缺少键列 id.

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

GGSCI (lnpg) 34> view param ir1

replicat ir1
targetdb resdb@192.168.207.143, userid ogg, password xxx@
discardfile ./dirrpt/ir1.dsc,append,megabytes 1000
MAXTRANSOPS 5000
REPLACEBADCHAR ESCAPE
--map gistar.*, target resdb.*, colmap (id=@NUMSTR(id), usedefaults);
map gistar.pxph_pon_route       , target resdb.pxph_pon_route   , colmap (id=@NUMSTR(id), usedefaults)  ;

源端抽取进程如下:

GGSCI (lnpg) 123> view param i1

extract i1
USERIDALIAS oracle11g
RMTHOST 192.168.207.143,MGRPORT 17809
RMTTASK REPLICAT,GROUP ir1

table gistar.pxph_pon_route;

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

相关推荐
ch_s_t33 分钟前
电子商务网站之首页设计
android
豆 腐3 小时前
MySQL【四】
android·数据库·笔记·mysql
想取一个与众不同的名字好难5 小时前
android studio导入OpenCv并改造成.kts版本
android·ide·android studio
Jewel1056 小时前
Flutter代码混淆
android·flutter·ios
Yawesh_best7 小时前
MySQL(5)【数据类型 —— 字符串类型】
android·mysql·adb
曾经的三心草9 小时前
Mysql之约束与事件
android·数据库·mysql·事件·约束
guoruijun_2012_413 小时前
fastadmin多个表crud连表操作步骤
android·java·开发语言
Winston Wood13 小时前
一文了解Android中的AudioFlinger
android·音频
B.-15 小时前
Flutter 应用在真机上调试的流程
android·flutter·ios·xcode·android-studio
有趣的杰克15 小时前
Flutter【04】高性能表单架构设计
android·flutter·dart