Performing Application Patches

Application patches and application upgrades typically perform DDL such as adding new objects or changing existing objects. To apply applications patches or upgrades in an Oracle GoldenGate environment, you can do one of the following:

  • If Oracle GoldenGate supports DDL replication for your database type, you can use it to replicate the DDL without stopping replication processes. To use this method, the source and target table structures must be identical.

  • You can apply the patch or upgrade manually on both source and target after taking the appropriate steps to ensure replication continuity.

To Use Oracle GoldenGate to Replicate Patch DDL

  1. If you have not already done so, dedicate some time to learn, install, and configure the Oracle GoldenGate DDL support. See the instructions for your database in this documentation. Once the DDL environment is in place, future patches and upgrades will be easier to apply.

  2. If the application patch or upgrade adds new objects that you want to include in data replication, make certain that you include them in the DDL parameter statement. To add new objects to your TABLE and MAP statements, see the procedure on Adding Tables to the Oracle GoldenGate Configuration.

  3. If the application patch or upgrade installs triggers or cascade constraints, disable those objects on the target to prevent collisions between DML that they execute on the target and the same DDL that is replicated from the source trigger or cascaded operation.

To Apply a Patch Manually on the Source and Target

  1. Stop access to the source database.

  2. Allow Extract to finish capturing the transaction data that remains in the transaction log. To determine when Extract is finished, issue the following command in GGSCI until it returns At EOF.

    SEND EXTRACT group GETLAG
    
  3. Stop Extract.

    STOP EXTRACT group
    
  4. Start applying the patch on the source.

  5. Wait until the data pump (if used) and Replicat are finished processing the data in their respective trails. To determine when they are finished, use the following commands until they return At EOF.

    SEND EXTRACT group GETLAG
    SEND REPLICAT group GETLAG
    
  6. Stop the data pump and Replicat.

    STOP EXTRACT group
    STOP REPLICAT group
    

    At this point, the data in the source and target should be identical, because all of the replicated transactional changes from the source have been applied to the target.

  7. Apply the patch on the target.

  8. If the patches changed table definitions, run DEFGEN for the source tables to generate updated source definitions, and then replace the old definitions with the new ones in the existing source definitions file on the target system.

  9. Start the Oracle GoldenGate processes whenever you are ready to begin capturing user activity again.