Site icon IT Tutorial

OGG-01161 Bad column index (40) specified for table TABLE_NAME, max columns = n

Hi,

Your Goldengate process may be abended with this error ” OGG-01161 Bad column index (40) specified for table TABLE_NAME, max columns = n ”

 

 

Details of error are as follows.

Source Context :
SourceModule : [ggstd.conv.endian]
SourceID : [/scratch/aime/adestore/views/aime_adc2280123/oggcore/OpenSys/src/gglib/ggstd/lecnv.c]
SourceMethod : [convCompSQL]
SourceLine : [587]
ThreadBacktrace : [15] elements
: [/goldengate/ggate18c/libgglog.so(CMessageContext::AddThreadContext())]
: [/goldengate/ggate18c/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...))]
: [/goldengate/ggate18c/libgglog.so(_MSG_QualTableName_Int32_Int32(CSourceContext*, int, ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1> const&, int, int, CMessage
Factory::MessageDisposition))]
: [/goldengate/ggate18c/replicat()]
: [/goldengate/ggate18c/replicat(ggConvRecLE(char*, ObjectMetadata*, int, unsigned char, char, bool))]
: [/goldengate/ggate18c/replicat(ggs::gglib::gglcr::CommonLCR::normalize())]
: [/goldengate/ggate18c/replicat(ggs::er::ReplicatContext::processReplicatLoop())]
: [/goldengate/ggate18c/replicat(ggs::er::ReplicatContext::run())]
: [/goldengate/ggate18c/replicat()]
: [/goldengate/ggate18c/replicat(ggs::gglib::MultiThreading::MainThread::ExecMain())]
: [/goldengate/ggate18c/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*))]
: [/goldengate/ggate18c/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
: [/goldengate/ggate18c/replicat(main)]
: [/lib64/libc.so.6(__libc_start_main)]
: [/goldengate/ggate18c/replicat()]

2020-02-26 22:35:02 ERROR OGG-01161 Bad column index (40) specified for table TABLE_NAME, max columns = 40.

 

If you got this error, it means your source column count and target column count are not the same, and probably new columns are added to source database or some columns are dropped.

If you don’t use DDL Replication, you will get this error.

 

 

To solve this problem, you can use DDL Replication or you can add the missing columns to the Target database as follows.

ALTER TABLE TABLE_NAME ADD (COLUMN_NAME VARCHAR2(35 BYTE));

 

You need to equalize column count and type of source and target tables.

 

Do you want to learn Oracle Goldengate from scratch, then read the following Goldengate Tutorial articles.

https://ittutorial.org/goldengate-tutorials-oracle-for-beginners/

Exit mobile version