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_HOME
directory 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_HOME
directory (21.3) and repoint the new$OGG_HOME
to the latest version.For PostgreSQL, use the same
$OGG_HOME
as current version directory for the latest Oracle GoldenGate binary. Make sure to take backup of existing$OGG_HOME
before 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 EXTRACT
command with theLOGEND
option 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 EXTRACT
groupSTATUS
for a few seconds, and observe that the LSN value for the current read position is no longer updating.GGSCI> SEND EXTRACT
group
LOGEND
-
(Source system) In GGSCI, stop Extract and data pumps.
GGSCI> STOP EXTRACT
group
-
(Target systems) In GGSCI on each target system, issue the
SEND REPLICAT
command with theSTATUS
option 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 REPLICAT
group
STATUS
-
(Target systems) In GGSCI, stop all Replicat processes.
GGSCI> STOP REPLICAT
group
-
(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_metadata
toFULL
inside the MySQL configuration file (my.cnf
for Linux andmy.ini
for 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.bat
For 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
ggos400install
without 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 { [SOURCEDB
data_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
.table
can be omitted if the checkpoint table was created with the name listed withCHECKPOINTTABLE
in theGLOBALS
file. -
(SQL Server Oracle GoldenGate classic Extract 12c (12.3.0.1) or prior, on Source system) Run the
DELETE TRANDATA
command against any tables enabled with it and delete the heartbeat tables if they exist (DELETE HEARTBEATTABLE
). Then runADD TRANDATA
again 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 TRANDATA
again on any tables previously enabled with it, including any filter table and thegg_heartbeat
andgg_heartbeat_seed
tables 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
SOURCECHARSET
parameter 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 RELEASE
parameter in the Extract, specifying the new version, or alternately, perform anETROLLOVER
of 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
NOUSEANSISQLQUOTES
to your parameter files, or that you ran theconvprm
utility 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
BATCHSQL
parameter 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 theINSERTALLRECORDS
parameter, it is recommended that you should double the value ofBYTESPEERQUEUE
option of theBATCHSQL
parameter. For example, if you are using theBYTESPEERQUEUE
option 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 theBYTESPEERQUEUE
option, 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 EXTRACT
group
GGSCI> START EXTRACTpump
GGSCI> START REPLICATgroup