1

I am planning to configure a simple GoldenGate configuration and want to implement an exception table that will store all the exceptions. I followed two links, neither of which work for me:

My Extract Parameter File

extract ext9
userid ogg_user, password oracle
rmthost targetGG, mgrport 7809
rmttrail /u01/app/oracle/product/gg_trg/dirdat/np
table scott.emp;

Replicat File

replicat rep9
ASSUMETARGETDEFS
userid ogg_user, password oracle
include ./dirprm/EXCEPTION_HANDLER.mac
REPERROR (DEFAULT, EXCEPTION)
REPERROR (DEFAULT2, ABEND)
REPERROR (-1, EXCEPTION)
MAP scott.emp, TARGET scott.emp;
MAP scott.emp #exception_handler();

Exception Handler Macro

Created in ./dirprm/EXCEPTION_HANDLER.mac:

MACRO #EXCEPTION_HANDLER
BEGIN
, TARGET GGATE_ADMIN.ALLEXCEPTIONS
, COLMAP ( REPLICAT_NAME = @GETENV("GGENVIRONMENT", "GROUPNAME"))
, TABLE_NAME = @GETENV ("GGHEADER", "TABLENAME")
, ERRNO = @GETENV ("LASTERR", "DBERRNUM")
, DBERRMSG = @GETENV ("LASTERR", "DBERRMSG")
, OPTYPE = @GETENV ("LASTERR", "OPTYPE")
, ERRTYPE = @GETENV ("LASTERR", "ERRTYPE")
, LOGRBA = @GETENV ("GGHEADER", "LOGRBA")
, LOGPOSITION = @GETENV ("GGHEADER", "LOGPOSITION")
, COMMITTIMESTAMP = @GETENV ("GGHEADER", "COMMITTIMESTAMP"))
, INSERTALLRECORDS
, EXCEPTIONSONLY;
END;

This is the error I have been getting. I have tried/Googled a lot to get rid of this, finally posting it here for help:

2016-06-09 17:18:12 ERROR OGG-00212 Invalid option for MAP: TABLE_NAME.

I don't know what is causing the problem. I have tried all space issues found on Google and with other bloggers but no success.

  • Have you put include ./dirprm/EXCEPTION_HANDLER.mac at the top of the replicat file? – Philᵀᴹ Jun 9 '16 at 13:27
  • After you specified I tried putting that entry on the top of the file, however same error. What else can be done? Thanks ! – Gaurav Bhaskar Jun 9 '16 at 16:02
  • Please help me in this regard. – Gaurav Bhaskar Jun 10 '16 at 11:39
  • I fixed it myself. – Gaurav Bhaskar Jun 17 '16 at 9:06
1

There is an error in the code:

, COLMAP ( REPLICAT_NAME = @GETENV("GGENVIRONMENT", "GROUPNAME"))

There is double bracket at the end of the line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.