Use OBEY
to process a file that contains a list of Oracle GoldenGate commands. OBEY
is useful for executing commands that are frequently used in sequence.
You can call one OBEY
file from another one. This is called a nested OBEY
file. You can nest up to 16 OBEY
files. To use nested OBEY
files, you must enable the functionality by first issuing the ALLOWNESTED
command. See "ALLOWNESTED | NOALLOWNESTED".
Syntax
OBEY file_name
Examples
OBEY ./mycommands.txt
The preceding command executes a file that looks similar to the following example:
add extract fin, tranlog, begin now add exttrail dirdat/aa, extract fin add extract hr, tranlog, begin now add exttrail dirdat/bb, extract hr start extract * info extract *, detail
The following example illustrates a nested OBEY
file. Assume an OBEY
file named addcmds.txt
. Inside this file, there is another OBEY
command that calls the OBEY
file named startcmds.txt
, which executes another set of commands.
OBEY ./addcmds.txt
(This OBEY
statement executes the following:)
add extract fin, tranlog, begin now add exttrail ggs/dirdat/aa, extract fin add extract hr, tranlog, begin now add exttrail ggs/dirdat/bb, extract hr add replicat fin2, exttrail ggs/dirdat/aa, begin now add replicat hr2, exttrail ggs/dirdat/bb, begin now obey ./startcmds.txt
(The nested startcmds.txt
file executes the following:)
start extract * info extract *, detail start replicat * info replicat *, detail