Thursday, February 9, 2017

OGG-00369 Oracle GoldenGate Capture for Oracle: Error in token clause for TK_HOST.

GGSCI (sourceserver) 3>  view params

SETENV (ORACLE_SID=mydev)
userid ggadmin, password ****
TRANLOGOPTIONS INTEGRATEDPARAMS (max_sga_size 256)
TRANLOGOPTIONS EXCLUDEUSER GGADMIN
EXTTRAIL /migrate/source/GG/home/dirdat/lt
DISCARDFILE  /migrate/source/GG/home/dirrpt/TEST.dsc, PURGE
--DDL INCLUDE MAPPED OBJNAME *.*;
LOGALLSUPCOLS
UPDATERECORDFORMAT COMPACT
TABLE  MYDEV.TEST,
TOKENS ( TK_HOST = @GETENV ("GGENVIRONMENT" , "HOSTNAME"),
TK_OSUSER = @GETENV ("GGENVIRONMENT" , "OSUSERNAME"),
TK_DBNAME = @GETENV("DBENVIRONMENT" , "DBNAME" ),
TK_GROUP = @GETENV ("GGENVIRONMENT", "GROUPNAME"),
TK_COMMIT_TS = @GETENV ("GGHEADER", "COMMITTIMESTAMP"),
TK_POS = @GETENV ("GGHEADER", "LOGPOSITION"),
TK_RBA = @GETENV ("GGHEADER", "LOGRBA"),
TK_TABLE = @GETENV ("GGHEADER", "TABLENAME"),
TK_OPTYPE = @GETENV ("GGHEADER", "OPTYPE"),
TK_BA = @GETENV ("GGHEADER", "BEFOREAFTERINDICATOR"));


GGSCI (sourceserver) 23> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     ABENDED     EDEV      00:42:32      00:01:14
EXTRACT     RUNNING     PHRDEV      00:00:00      00:00:02


Error:

2017-02-09 16:48:53  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): edit params EDEV.
2017-02-09 16:51:14  INFO    OGG-06507  Oracle GoldenGate Capture for Oracle, edev.prm:  MAP (TABLE) resolved (entry MYDEV.TEST): TABLE  "MYDEV"."TEST", TOKENS ( TK_HOST = @GETENV("GGENVIRONMENT" , "HOSTNAME"), TK_OSUSER = @GETENV ("GGENVIRONMENT" , "OSUSERNAME"), TK_DBNAME = @GETENV("DBENVIRONMENT" , "DBNAME" ), TK_GROUP = @GETENV ("GGENVIRONMENT", "GROUPNAME"), TK_COMMIT_TS =@GETENV ("GGHEADER", "COMMITTIMESTAMP"), TK_POS = @GETENV ("GGHEADER", "LOGPOSITION"), TK_RBA = @GETENV ("GGHEADER", "LOGRBA"), TK_TABLE = @GETENV ("GGHEADER", "TABLENAME"), TK_OPTYPE = @GETENV ("GGHEADER", "OPTYPE"), TK_BA = @GETENV ("GGHEADER", "BEFOREAFTERINDICATOR")).
2017-02-09 16:51:14  WARNING OGG-06439  Oracle GoldenGate Capture for Oracle, edev.prm:  No unique key is defined for table TEST. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
2017-02-09 16:51:14  INFO    OGG-06509  Oracle GoldenGate Capture for Oracle, edev.prm:  Using the following key columns for source table MYDEV.TEST: ID, NAME.
2017-02-09 16:51:14  INFO    OGG-01298  Oracle GoldenGate Capture for Oracle, edev.prm:  Column function diagnostic message: could not find column "GGENVIRONMENT".
2017-02-09 16:51:14  ERROR   OGG-00369  Oracle GoldenGate Capture for Oracle, edev.prm:  Error in token clause for TK_HOST.
2017-02-09 16:51:14  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, edev.prm:  PROCESS ABENDING.


Solution:

The code in the 12c version is now changed the text enclosed within double quotes is treated as column name and the text enclosed within single quotes is treated as literal text, which used to be double quoted text pre 12c versions.

Now, change Double quotes to Single and start extract

GGSCI (sourceserver) 3> view params

SETENV (ORACLE_SID=mydev)
userid ggadmin, password ****
TRANLOGOPTIONS INTEGRATEDPARAMS (max_sga_size 256)
TRANLOGOPTIONS EXCLUDEUSER GGADMIN
EXTTRAIL /migrate/source/GG/home/dirdat/lt
DISCARDFILE  /migrate/source/GG/home/dirrpt/TEST.dsc, PURGE
--DDL INCLUDE MAPPED OBJNAME *.*;
LOGALLSUPCOLS
UPDATERECORDFORMAT COMPACT
TABLE  MYDEV.TEST,
TOKENS ( TK_HOST = @GETENV ('GGENVIRONMENT' , 'HOSTNAME'),
TK_OSUSER = @GETENV ('GGENVIRONMENT' , 'OSUSERNAME'),
TK_DBNAME = @GETENV('DBENVIRONMENT' , 'DBNAME' ),
TK_GROUP = @GETENV ('GGENVIRONMENT', 'GROUPNAME'),
TK_COMMIT_TS = @GETENV ('GGHEADER', 'COMMITTIMESTAMP'),
TK_POS = @GETENV ('GGHEADER', 'LOGPOSITION'),
TK_RBA = @GETENV ('GGHEADER', 'LOGRBA'),
TK_TABLE = @GETENV ('GGHEADER', 'TABLENAME'),
TK_OPTYPE = @GETENV ('GGHEADER', 'OPTYPE'),
TK_BA = @GETENV ('GGHEADER', 'BEFOREAFTERINDICATOR'));


Reference:
token with getenv bugs in 11.2.1 and 12.1 (Doc ID 1948440.1)


0 comments:

Post a Comment

Auto Scroll Stop Scroll