Upgrading Oracle GoldenGate Classic Architecture for Non-Oracle Databases
Even though you may only be upgrading Extract or Replicat, rather than both, all processes are involved in the upgrade. All processes must be stopped in the correct order for the upgrade, regardless of which component you upgrade, and the trails must be processed until empty.
-
(Source and target systems) Back up the current Oracle GoldenGate installation directory on the source and target systems, and any working directories that you have installed on a shared drive in a cluster (if applicable).
-
(Source and target systems, as applicable) Expand the Oracle GoldenGate upgrade build into a new directory on each system (not the current Oracle GoldenGate directory). Do not create the sub-directories; just complete the steps to the point where the installation files are expanded.
However, this step doesn't apply to PostgreSQL.
Oracle GoldenGate for PostgreSQL upgrade only works if you install the latest version (version to be upgraded) in the same
$OGG_HOMEdirectory as the current Oracle GoldenGate version.For PostgreSQL, Oracle GoldenGate upgrade doesn't work if you install the latest version (version to be upgraded) in a different
$OGG_HOMEdirectory (21.3) and repoint the new$OGG_HOMEto the latest version.For PostgreSQL, use the same
$OGG_HOMEas current version directory for the latest Oracle GoldenGate binary. Make sure to take backup of existing$OGG_HOMEbefore beginning the upgrade. -
Stop all user activity that generates DML and DDL on objects in your Oracle GoldenGate configuration and ensure that there are no outstanding open transactions against the database.
For SQL Server CDC Extract on a Source system, manually stop the CDC Capture job for the database.
-
(Source system) In GGSCI on the source system, issue the
SEND EXTRACTcommand with theLOGENDoption until it showsYES, indicating that there is no more data in the transaction log to process.For SQL Server CDC Extract on Source system, monitor that the current read position of the Extract is no longer updating, by repeatedly running
SEND EXTRACTgroupSTATUSfor a few seconds, and observe that the LSN value for the current read position is no longer updating.GGSCI> SEND EXTRACTgroupLOGEND -
(Source system) In GGSCI, stop Extract and data pumps.
GGSCI> STOP EXTRACTgroup -
(Target systems) In GGSCI on each target system, issue the
SEND REPLICATcommand with theSTATUSoption until it shows a status of "At EOF" to indicate that it finished processing all of the data in the trail. This must be done on all target systems until all Replicat processes return "At EOF."GGSCI> SEND REPLICATgroupSTATUS -
(Target systems) In GGSCI, stop all Replicat processes.
GGSCI> STOP REPLICATgroup -
(Source and target systems) In GGSCI, stop Manager on the source and target systems and close GGSCI.
GGSCI> STOP MANAGER -
If you want to upgrade the source or target database, or both, do so at this time according to the upgrade instructions provided for that database. Ensure that you start the databases after the upgrade, but do not permit transactions on the objects in the Oracle GoldenGate configuration.
For MySQL, if you upgrade from Oracle GoldenGate 19c (19.1.0) and the database is MySQL 5.7, then no change is required. However, if you upgrade from Oracle GoldenGate 19c (19.1.0) and the database is MySQL 8.0, then you need to perform the following steps:-
Enable logging of full metadata because it's mandatory for MySQL 8.0 and higher, regardless of DDL or DML replication. Logging of full metadata can be enabled by setting the value of MySQL server variable
binlog_row_metadatatoFULLinside the MySQL configuration file (my.cnffor Linux andmy.inifor Windows). You need to restart the database service after changing the configuration file for the settings to take effect. -
Run the DDL uninstall scripts to disable old DDL solutions if DDL replication was enabled previously.
The script name:
For Windows:
ddl_install.batFor Linux:
ddl_install.sh -
To uninstall, run the following script:
bash$ ./ddl_install.sh uninstall mysql userid password port
-
-
(Source and target systems) Move the expanded Oracle GoldenGate files from the new directory to your existing Oracle GoldenGate directory on the source and target systems overwriting the existing files.
-
(DB2 for i) Run
ggos400installwithout arguments. For an upgrade, no arguments are necessary. However, if you change the library, the old library is left on the system until you remove it. -
(Source and target systems) Start GGSCI.
-
(Target systems, if upgrading Replicat from version 11.2.1.0.0 or earlier only) In GGSCI on each target system, issue the following commands to upgrade the Replicat checkpoint tables on those systems. This step updates the table definition.
GGSCI> DBLOGIN { [SOURCEDBdata_source] | [,database@host:port] |USERID {/ |userid} [, PASSWORD password] [algorithm ENCRYPTKEY {keyname | DEFAULT}] |USERIDALIAS alias [DOMAIN domain] | [SYSDBA | SQLID sqlid] [SESSIONCHARSET character_set]}GGSCI> UPGRADE CHECKPOINTTABLE [owner.table]Note:
owner.tablecan be omitted if the checkpoint table was created with the name listed withCHECKPOINTTABLEin theGLOBALSfile. -
(SQL Server Oracle GoldenGate classic Extract 12c (12.3.0.1) or prior, on Source system) Run the
DELETE TRANDATAcommand against any tables enabled with it and delete the heartbeat tables if they exist (DELETE HEARTBEATTABLE). Then runADD TRANDATAagain for the tables andADD HEARTBEATTABLE, if previously used.GGSCI> DBLOGIN {[SOURCEDB data_source] | |USERID {/ | userid}[, PASSWORD password] |USERIDALIAS alias [DOMAIN domain] GGSCI> DELETE TRANDATA schema.tablename GGSCI> DELETE HEARTBEATTABLE GGSCI> ADD HEARTBEATTABLE GGSCI> ADD TRANDATA schema.tablename -
(SQL Server CDC Extract on Source system) Run
ADD TRANDATAagain on any tables previously enabled with it, including any filter table and thegg_heartbeatandgg_heartbeat_seedtables if using the Oracle GoldenGate heartbeat implementation.GGSCI> DBLOGIN {[SOURCEDB data_source] | |USERID {/ | userid}[, PASSWORD password] |USERIDALIAS alias [DOMAIN domain] GGSCI> ADD TRANDATA schema.tablename -
(Target system) If upgrading the target Oracle GoldenGate installation that is the recipient of trails from a source system running Oracle GoldenGate prior to version 11.2.1, then add the
SOURCECHARSETparameter to the Replicat and specify the character set of the source database. -
(Source system) By default, after upgrading, the Extract will continue to write trail files in the version of Oracle GoldenGate prior to the upgrade. To force the Extract to write in the upgraded trail version, use the
FORMAT RELEASEparameter in the Extract, specifying the new version, or alternately, perform anETROLLOVERof the Extract and manually reposition the downstream processes to start reading at the new trail sequence.{EXTTRAIL | RMTTRAIL} file_name FORMAT RELEASE major.minor -
If you made copies of the parameter files to make parameter changes, move the new parameter files into the Oracle GoldenGate directory where the old parameter files were stored, and give them the same names as the old parameter files. If using case-sensitivity support, make certain that you either added
NOUSEANSISQLQUOTESto your parameter files, or that you ran theconvprmutility to convert the quotes as required. -
Upgrade the heartbeat table configuration if it was previously implemented, before restarting all the processes.
GGSCI> DBLOGIN {[SOURCEDB data_source] | |USERID {/ | userid}[, PASSWORD password] |USERIDALIAS alias [DOMAIN domain] GGSCI> UPGRADE HEARTBEATTABLE -
You also need to modify the
BATCHSQLparameter to double the value ofBATCHESPERQUEUE. You must do this before starting Replicat.Note:
If you are upgrading from Oracle GoldenGate version 12.1 to any later version and using theINSERTALLRECORDSparameter, it is recommended that you should double the value ofBYTESPEERQUEUEoption of theBATCHSQLparameter. For example, if you are using theBYTESPEERQUEUEoption with its default value, which is 20 MB, then increase the value to 40 MB. However, if you are not using the default value for theBYTESPEERQUEUEoption, then double the value specified during the Oracle GoldenGate version 12.1 installation.For example:BATCHSQL BATCHESPERQUEUE 40000000 -
For SQL Server CDC Extract on a Source system, manually restart the CDC Capture job for the database.
-
In GGSCI, start the Oracle GoldenGate processes on the source and target systems in the following order.
GGSCI> START MANAGER GGSCI> START EXTRACTgroupGGSCI> START EXTRACTpumpGGSCI> START REPLICATgroup