Upgrading Oracle GoldenGate Microservices Using REST APIs

Learn how to upgrade Oracle GoldenGate Microservices to Oracle GoldenGate Microservices 23ai using REST APIs.

Follow these steps to obtain the Oracle GoldenGate installation software and set up the directories for upgrade.

  1. Download the latest Oracle GoldenGate Microservices 23ai software from the Oracle Technology Network or eDelivery.

  2. Move the Oracle GoldenGate 23ai MA software to a staging folder and unzip it.

    For Linux, use the following example:

    $ mv /home/user/fbo_ggs_Linux_x64_Oracle_services_shiphome.zip /tmp
    $ cd /tmp$ unzip fbo_ggs_Linux_x64_Oracle_services_shiphome.zip
  3. Upload the Oracle GoldenGate Microservices 23ai software to a staging location on the server where a previous release of Oracle GoldenGate Microservices exists.

  4. Save the changes and return to the Service Manager home page.

  5. Select the Action dropdown for the deployment and select Restart.

  6. Log in to the Administration Service and click Action button in the Replicat section.

  7. Click the Parameter File tab and change the value of the BATCHSQL parameter to double the value of BATCHESPERQUEUE. You must do this before starting Replicat. For example: BATCHSQL BATCHESPERQUEUE 40000000

  8. Log back into the Adminstration Service and start Extract and Replicat.

Upgrade a 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/21c/gghome_1.

Check if Service Manager is running from the new $OGG_HOME, using the following command:
ps -ef|grep -i servicemanager
If you don't see Service Manager in running state, then run the following command:
cd $NEW_OGG_HOME/bin
$ ./ServiceManager

Upgrade a Deployment

To upgrade a deployment:
  1. 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

  2. Change the environment variables for the deployment, as shown in the following example:
    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": "ORACLE_HOME" , "value": "/u01/app/oracle/product/21c/gghome_1/lib/instantclient"}
                                     , {"name": "LD_LIBRARY_PATH" , "value": "/u01/app/oracle/product/21c/gghome_1/lib/instantclient:/u01/app/oracle/product/21c/gghome_1/lib"}
                                     , {"name": "JAVA_HOME" , "value": "/u01/app/oracle/product/21c/gghome_1/jdk"}
                                     , {"name": "TNS_ADMIN" , "value": "/u01/app/oracle/network/admin"} ] }'
  3. 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"}'
  4. Start all Extracts and Replicats.

When the Service Manager or deployment restarts, the upgrade is complete.