Skip to Main Content

GoldenGate

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Goldengate replication using TOKEN fails

1045340Jun 3 2016 — edited Jun 15 2016

I have an Unidirectional Goldengate Replication configured between 2 Linux servers [ GG Version : 11.2.1.0.1, Oracle Database Version : 11.2.0.4.0].

I am facing errors on replicat when using TOKEN function with COLMAP clause.Below is the problem description

---- Created Table mytest exists on source and target databases

----On source

SQL> desc mytest

Name                                      Null?    Type

----------------------------------------- -------- ----------------------------

SAL                                                NUMBER(10)

COMM                                               NUMBER(10)

---On target

SQL> desc mytest

Name                                      Null?    Type

----------------------------------------- -------- ----------------------------

SAL                                                NUMBER(10)

COMM                                               NUMBER(10)

HOSTNAME                                           VARCHAR2(20)

OSUSER                                             VARCHAR2(10)

DBNAME                                             VARCHAR2(10)

TRAN_DATE                                          DATE

I want to populate other columns on target database table by using tokens when inserting records on source database table.

----------------------------On source  following extracts are configured

1) extdm     ( This is primary extract process)

EXTRACT extdm

userid ggs_admin, password qwerty

EXTTRAIL ./dirdat/sa

TRANLOGOPTIONS DBLOGREADER, DBLOGREADERBUFSIZE  2097152

ddl include all;

table sender.mytest;

2) extdpmp  ( This is datapump / secondary extract process)

EXTRACT extdpmp

userid ggs_admin, password qwerty

RMTHOST  <REMOTEIP>, MGRPORT <PORT>

RMTTRAIL /home/goldengate/dirdat/lt

TABLE sender.mytest, TOKENS ( TK_HOST = @GETENV("GGENVIRONMENT" , "HOSTNAME"), TK_OSUSER = @GETENV ("GGENVIRONMENT" , "OSUSERNAME"), TK_DBNAME = @GETENV("DBENVIRONMENT" , "DBNAME" ));

------------------------On target following replicat is configured

3) rep1    ( Replicat process)

replicat rep1

ASSUMETARGETDEFS

userid ggs_admin, password qwerty

discardfile /home/goldengate/discard.txt, append, megabytes 10

ddl include all

DDLERROR DEFAULT IGNORE RETRYOP

MAP sender.mytest, TARGET receiver.mytest, COLMAP (USEDEFAULTS, hostname = @token ("tk_host"), osuser= @token ("tk_osuser"), dbname= @token ("tk_dbname"), tran_date = @DATENOW());

---------------------status of extract process on source

4) info extdm

EXTRACT    EXTDM     Last Started 2016-06-03 03:14   Status RUNNING

Checkpoint Lag       00:00:00 (updated 00:00:02 ago)

Log Read Checkpoint  Oracle Redo Logs

                     2016-06-03 05:51:50  Seqno 203, RBA 27083264

                     SCN 0.11652199 (11652199)

5) info extdpmp

EXTRACT    EXTDPMP   Last Started 2016-06-03 03:12   Status RUNNING

Checkpoint Lag       00:00:00 (updated 00:00:04 ago)

Log Read Checkpoint  File ./dirdat/sa000025

                     2016-06-03 03:14:06.941890  RBA 1078

---------------Replicat process is not starting on target , the status shows ABENDED

6) info replicat rep1

REPLICAT   REP1      Last Started 2016-06-03 03:35   Status ABENDED

Checkpoint Lag       00:00:00 (updated 02:52:31 ago)

Log Read Checkpoint  File /home/goldengate/dirdat/lt000024

                     2016-06-03 03:00:15.085301  RBA 2215

-------------Through the command "view report rep1" I see following warnings and errors ( marked in bold)  on target database

2016-06-03 03:35:56  WARNING OGG-00869  No unique key is defined for table 'MYTEST'. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to

define the key.

Using the following default columns with matching names:

  SAL=SAL, COMM=COMM, HOSTNAME=HOSTNAME, OSUSER=OSUSER, DBNAME=DBNAME, TRAN_DATE=TRAN_DATE

Using the following key columns for target table RECEIVER.MYTEST: SAL, COMM, HOSTNAME, OSUSER, DBNAME, TRAN_DATE.

2016-06-03 03:35:56  WARNING OGG-01431  Aborted grouped transaction on 'RECEIVER.MYTEST', Mapping error.

2016-06-03 03:35:56  WARNING OGG-01003  Repositioning to rba 2215 in seqno 24.

2016-06-03 03:35:56  WARNING OGG-01151  Error mapping from SENDER.MYTEST to RECEIVER.MYTEST.

2016-06-03 03:35:56  WARNING OGG-01003  Repositioning to rba 2215 in seqno 24.

Source Context :

  SourceModule            : [er.errors]

  SourceID                : [/scratch/aime1/adestore/views/aime1_adc4150256/oggcore/OpenSys/src/app/er/errors.cpp]

  SourceFunction          : [take_rep_err_action]

  SourceLine              : [623]

  ThreadBacktrace         : [8] elements

                          : [/home/goldengate/libgglog.so(CMessageContext::AddThreadContext()+0x1e) [0x7f8808c3206e]]

                          : [/home/goldengate/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x2cc) [0x7f8808c2e44c]]

                          : [/home/goldengate/libgglog.so(_MSG_ERR_MAP_TO_TANDEM_FAILED(CSourceContext*, ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1> const&, ggs::gglib::ggapp::CQualDBObjName<(D

BObjType)1> const&, CMessageFactory::MessageDisposition)+0x53) [0x7f8808c26f19]]

                          : [/home/goldengate/replicat(take_rep_err_action(short, int, char const*, extr_ptr_def*, __std_rec_hdr*, char*, file_def*, bool)+0xdac) [0x51daa0]]

                          : [/home/goldengate/replicat(process_extract_loop()+0x2240) [0x536ab0]]

                          : [/home/goldengate/replicat(main+0x732) [0x548752]]

                          : [/lib64/libc.so.6(__libc_start_main+0xfd) [0x392881ed5d]]

                          : [/home/goldengate/replicat(__gxx_personality_v0+0x322) [0x4be48a]]

2016-06-03 03:35:56  ERROR   OGG-01296  Error mapping from SENDER.MYTEST to RECEIVER.MYTEST.

Is there anything wrong with configuration parameters for extract or replicat process?

Please  suggest how the above errors can be fixed.

Thanks,

Mukul

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 13 2016
Added on Jun 3 2016
8 comments
1,725 views