Simplifying the Creation of Parameter Files
You can reduce the number of times that a parameter must be specified by using the following time-saving tools.
Using Wildcards
For parameters that accept object names, you can use asterisk (*) and question mark (?) wildcards. The use of wildcards reduces the work of specifying numerous object names or all objects within a given schema. For more information about using wildcards, see Using Wildcards in Database Object Names.
Using OBEY
You can create a library of text files that contain frequently used parameter settings, and then you can call any of those files from the active parameter file by means of the OBEY
parameter. The syntax for OBEY
is:
OBEY file_name
Where:
file_name
is the relative or full path name of the file.
Upon encountering an OBEY
parameter in the active parameter file, Oracle GoldenGate processes the parameters from the referenced file and then returns to the active file to process any remaining parameters. OBEY
is not supported for the GLOBALS
parameter file.
If using the CHARSET
parameter in a parameter file that includes an OBEY
parameter, the referenced parameter file does not inherit the CHARSET
character set. The CHARSET
character set is used to read wildcarded object names in the referenced file, but you must use an escape sequence (\uX
) for all other multibyte specifications in the referenced file.
See Parameters and Functions Reference
for Oracle GoldenGate for more information about OBEY
.
See Parameters and Functions Reference
for Oracle GoldenGate for more information about CHARSET
.
Using Macros
You can use macros to automate multiple uses of a parameter statement. See Simplify and Automate Work with Oracle GoldenGate Macros.
Using Parameter Substitution
You can use parameter substitution to assign values to Oracle GoldenGate parameters automatically at run time, instead of assigning static values when you create the parameter file. That way, if values change from run to run, you can avoid having to edit the parameter file or maintain multiple files with different settings. You can simply export the required value at runtime. Parameter substitution can be used for any Oracle GoldenGate process.
To Use Parameter Substitution
Example 9-37 Parameter substitution on Windows
C:\> set EXTFILE=C:\ggs\extfile
C:\> set TABNAME=PROD.ACCOUNTS
C:\> replicat paramfile c:\ggs\dirprm\parmfl
Example 9-38 Parameter substitution on UNIX (korn shell)
$ EXTFILE=/ggs/extfile $ export EXTFILE $ TABNAME=PROD.ACCOUNTS $ export TABNAME $ replicat paramfile ggs/dirprm/parmfl