Where are GoldenGate macros defined?
A.
Macros can be defined in the parameter file or included in a macro file
B.
Macros are defined in the GLOBALS parameter file
C.
Macros are placed in a file and referenced using an environment variable.
D.
Macros are declared, compiled and referenced via Golden Gate’s user exits.
Explanation:
Reference:
http://download.oracle.com/docs/cd/E15881_01/doc.104/gg_nsk_admin_v10.pdf
A. is the correct answer.
It can be either local to a parameter file or can be included in the parameter file.
§ We start by defining the macro named #S1E2LOGIN inside the macro library file
$ vi /u01/app/oracle/ggs/dirprm/macrosqe2.mac
MACRO #S1E2LOGIN
BEGIN
USERID ggs_admin@S1E2, PASSWORD oracle
PASSTHRU
END;
§ Next, we invoke the macro from within the secondary extract EPMP01
INCLUDE /u01/app/oracle/ggs/dirprm/macrosqe2.mac
EXTRACT epmp01
#S1E2LOGIN()
RMTHOST ggs-target, MGRPORT 7812
RMTTRAIL ./dirdat/ta
TABLE osm$repapi.customers;
TABLE osm$repapi.policies;