Skip to Main Content

Marketplace

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.

ERROR OGG-00303 Duplicate stored procedure name (SEQ_EDM)

user-iwrfaJul 14 2023

MACRO #M_APPLY_HISTR
PARAMS (#bd,#schemsourc,#schemdestn,#tablesourc,#tabledestn)
BEGIN
MAP #bd.#SCHEMSOURC.#TABLESOURC, TARGET #schemdestn.#TABLEDESTN,
SQLEXEC(ID SEQ_EDM, QUERY 'SELECT #schemdestn.OGG_TX_SCN_SOURC_SEQ.NEXTVAL FROM DUAL'),
SQLEXEC(ID TS_AGEND, QUERY 'SELECT CAST(SYSTIMESTAMP AS TIMESTAMP) AS TS FROM DUAL'),
COLMAP(USEDEFAULTS,
TS_CREAT_TX_AGEND = @GETVAL(TS_AGEND.TS),
CD_TYPE_TX_SOURC = @CASE(@GETENV('GGHEADER','OPTYPE'), &
'INSERT','I', &
'UPDATE','U', &
'DELETE','D', &
'SQL COMPUPDATE','U', &
'PK UPDATE','U', &
'TRUNCATE','D'),
SCN_TX_SOURC = @TOKEN('SCN_TX_SOURC'),
SCN_COMT_TX_SOURC = @TOKEN('SCN_COMT_TX_SOURC'),
DH_CREAT_TX_SOURC = @GETENV('ggheader','COMMITTIMESTAMP'),
NO_SEQNC_TX_SCN_SOURC = @GETVAL(SEQ_EDM.NEXTVAL));

end;

The integrated replicat that calls the macro above is as follows:

INCLUDE MACRO_HISTR_SN.prm
REPLICAT R_SN_HK
USERIDALIAS UNIA_DEST DOMAIN OracleGoldenGate
report at 00:01
reportrollover at 00:01 on Sunday
reportcount every 10 minutes, rate

--Importer la gestion des DDL
#M_APPLY_HISTR_DDL();

INSERTALLRECORDS;
#M_APPLY_HISTR(UNI0,SRC_TESTGG,REP_TESTGG,UNO01E34_UTIL_IMMBLE_SN,UNO01E34_1_001);
#M_APPLY_HISTR(UNI0,CHADEV01105,REP_TESTGG,CHADEECA_COMNC_ADRES,CHADEECA_1_001);
#M_APPLY_HISTR(UNI0,CHADEV01105,REP_TESTGG,CHADEEDE_DOSR_ELEVE_PPS,CHADEEDE_1_001);
#M_APPLY_HISTR(UNI0,CHADEV01105,REP_TESTGG,CHADOEDE_DENMB_EDM,CHADOEDE_1_001);

It (replicat) inserts the data in table 1 but when the insertion is to be made in the next table 2 we get the following error: ERROR OGG-00303 Duplicate stored procedure name (SEQ_EDM).

Thank's for your help

Comments
Post Details
Added on Jul 14 2023
0 comments
479 views