O'Reilly logo

Oracle GoldenGate 11g Implementer's guide by John P Jeffries

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using and defining macros

As in many programmable software products, defining a macro allows for automation of repetitive tasks. This can be very useful when configuring a GoldenGate process. For example, trapping an exception for each MAP statement in a Replicat parameter file is both necessary and repetitive. However, defining the macro at the start of the parameter file allows the code to be called by an alias multiple times in the configuration.

The following example code block defines the #exception_handler() macro in a Replicat parameter file. All macros have a hash '#' character prefix in their name.

-- This starts the macro MACRO #exception_handler BEGIN , TARGET ggs_admin.exceptions , COLMAP ( rep_name = "ROLAP01" , table_name = @GETENV ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required