Upgrade Oracle GoldenGate Microservices Using REST APIs
Learn the steps to upgrade Oracle GoldenGate Microservices using the REST APIs.
At this point, you should have a new Oracle GoldenGate 23ai MA home and any prior release homes of Oracle GoldenGate MA.
Upgrade the Service Manager
After installing the latest Oracle GoldenGate MA version, the next step is to upgrade the Service Manager.
When upgrading the Service Manager, you can use the following cURL example to update the Oracle GoldenGate home:
curl -u adminname:adminpwd -X PATCH
\ https://hostname:port/services/v2/deployments/ServiceManager
\ -H 'cache-control: no-cache'
\ -d '{"oggHome":"new OGG_HOME_absolute_path", "status":"restart"}'
In this syntax, enter the new Oracle GoldenGate home
directory absolute directory path such as
/u01/app/oracle/product/23ai/gghome_1
.
$OGG_HOME
, using the following
command:ps -ef | grep -i servicemanager
cd $NEW_OGG_HOME/bin
$ ./ServiceManager
Upgrade a Deployment
Deployments can be upgraded in the same step with the Service Manager, or they can be upgraded at a later time after the Service Manager has been upgraded.
-
Stop all Extract and Replicat processes gracefully:
-
Check for open (long running) transaction and Bounded Recovery as it may take longer to stop Extract gracefully.
-
If any unnecessary open transactions are visible, for example
SEND EXTRACT group_name SHOWTRANS
, then those transactions can be skipped or immediately forced to stop. In this case, a Bounded Recovery checkpoint can be retrieved using the following command:SEND EXTRACT group_name, BR BRCHECKPOINT immediate
-
-
(Oracle GoldenGate for Oracle Database only) The Unified Build feature requires only the
TNS_ADMIN
to be adjusted to the Oracle Database Client software within Oracle GoldenGate.curl -k -u adminname:adminpwd -X PATCH \ https://server.oracle.com:9000/services/v2/deployments/uat_01 \ -H 'cache-control: no-cache' \ -d '{"environment": [, {"name": "TNS_ADMIN" , "value": "/u01/app/oracle/network/admin"} ] }'
Note:
When upgrading from 21c to 23ai, this step is not necessary. If upgrading from Oracle GoldenGate 19c (or earlier) to 23ai, you only need theTNS_ADMIN
environment variable.The
OGG_HOME
environment variable can automatically detect theDATABASE_HOME
,LD_LIBRARY_PATH
, andJAVA_HOME
. -
(Oracle GoldenGate for SQL Server only) Oracle GoldenGate 23ai for SQL Server on Linux includes an ODBC driver for database connectivity. Although it’s not required, it is recommended to utilize the packaged driver. To use the packaged driver, two new environment variables need to be created and any previously created
odbc.ini
file needs to be updated.Add the following environment variables to the deployment:curl -k -u adminname:adminpwd -X PATCH \ https://server.oracle.com:9000/services/v2/deployments/uat_01 \ -H 'cache-control: no-cache' \ -d '{"environment": [ , {"name": "ODBCSYSINI" , "value": "${OGG_HOME}/msodbc"} , {"name": "ODBCINI" , "value": "${OGG_HOME}/msodbc/odbc.ini"}] }'
After creating the new environment variables, copy your existingodbc.ini
file to the Oracle GoldenGatemsodbc
folder and change the ODBC Driver value of any DSN entry to the following:Driver=Microsoft ODBC Driver for SQL Server
-
Run this cURL command to upgrade the Oracle GoldenGate deployment:
curl -u SM username:SM password -X PATCH http://hostname:servicemanager port/services/v2/deployments/Deployment-name -H 'cache-control: no-cache' -d '{"oggHome":"new OGG_HOME complete path","status":"restart"}'
-
Start all Extracts and Replicats.
Note:
For Oracle GoldenGate for PostgreSQL, see Post-Upgrade Steps prior to starting any Extracts.
When the Service Manager and deployment have been restarted, the upgrade is complete.