Storing and Calling Frequently Used Command Sequences

You can automate a frequently-used series of commands by using an OBEY file and the OBEY command. The OBEY file takes the character set of the local operating system. To specify a character that is not compatible with that character set, use the Unicode notation.

See Support for Escape Sequences for more information about using Unicode notation.

To use OBEY

  1. Create and save a text file that contains the commands, one command per line. This is your OBEY file. The name can be anything supported by the operating system. You can nest other OBEY files within an OBEY file.
  2. Run the Admin Client or GGSCI.
  3. (Optional) If using an OBEY file that contains nested OBEY files, issue the following command. This command enables the use of nested OBEY files for the current session and is required whenever using nested OBEY files. See Parameters and Functions Reference for Oracle GoldenGate for more information.
    ALLOWNESTED
    
  4. Call the OBEY file by using the OBEY command from the command line interface (Admin Client or GGSCI).
    OBEY file_name
    

    Where:

    file_name is the relative or fully qualified name of the OBEY file.

Example 8-26 OBEY command file

ADD EXTRACT myext, TRANLOG, BEGIN now
START EXTRACT myext

ADD REPLICAT myrep, EXTTRAIL /ggs/dirdat/aa
START REPLICAT myrep

INFO EXTRACT myext, DETAIL
INFO REPLICAT myrep, DETAIL

The following example illustrates an OBEY command file for use with the OBEY command. It creates and starts Extract and Replicat groups and retrieves processing information.

See Parameters and Functions Reference for Oracle GoldenGate for more information about the OBEY command.