Purpose
OGG has added support for replication of cyclic sequences in the 11.1.1.1.x builds.
Backport: Any code prior to v11.1.1.x must contain patch 9428942 to reliably replicate cyclic sequences.
Documentation for versions 10.0, 10.4 and 11.1 states that extract supports sequences. In fact, sequences were not intended to be supported
@ were never tested – hide, customer does not need to know this
and did not work seamlessly.
This note describes the proper implementation of replication of cyclic sequences.
Scope and Application
This covers the replication of cyclic sequences in the 11.1.1.1.x and subsequent builds.
Backport: Any code prior to v11.1.1.x must contain patch 9428942 to reliably replicate cyclic sequences.
Failure to use the right code version or to follow the implementation and installation procedures might result in a replicat abend with messages similar to this:
2011-04-20 17:35:53 ERROR OGG-01444 Oracle GoldenGate Delivery for Oracle, rora01.prm: Error in replicating sequence value [ORA-06550: line 1, column 8: PLS-00201: identifier 'GGS.REPLICATESEQUENCE' must be declared ORA-06550: line 1, column 8: PL/SQL: Statement ignored, SQL BEGIN "GGS" .replicateSequence (TO_NUMBER(1386506), TO_NUMBER(0), TO_NUMBER(1), 'XSUP', TO_NUMBER(0), 'SEQ_SR_ACCESSNO', 'GGS', TO_NUMBER(2), TO_NUMBER (0), ''); END;].
2011-04-20 17:35:53 ERROR OGG-01668 Oracle GoldenGate Delivery for Oracle, rora01.prm: PROCESS ABENDING.
implementing replication of cyclic sequences in GoldenGate
Implementing cyclic sequences:
NOTE: You must be logged in as SYSDBA to install sequence.sql
Note that steps 1-3 are required on BOTH source and target.
1. If an OGG User for DDL replication has been created, proceed to Step 2. Otherwise, create OGG user (say OGGADMIN). This should be the same Oracle user used for DDL replication. Connect as SYSDBA to the Oracle databaseSQL> CREATE USER OGGADMIN IDENTIFIED BY ;
SQL> GRANT CONNECT,RESOURCE,DBA TO OGGADMIN; SQL> sequence.sqlSQL> GRANT EXECUTE on OGGADMIN.updateSequence TO ggsciUser; (user used to
login to GGSCI)SQL> GRANT EXECUTE on OGGADMIN.replicateSequence TO replicateUser;GGSCI> DBLOGIN userid Password: GGSCI> STOP EXTRACT EXT01GGSCI> START EXTRACT EXT01GGSCI> FLUSH SEQUENCE HR.*
GGSCI> FLUSH SEQUENCE FINANCE.*GGSCI> FLUSH SEQUENCE HR.SEQ1
GGSCI> FLUSH SEQUENCE HR.SEQ2[@more@]