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.

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.
  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.
    ALLOWNESTED
  4. Call the OBEY file by using the OBEY command from the Admin Client.
    OBEY file_name

    Where:

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

Example 11-36 OBEY command file

ALTER CREDENTIALSTORE ADD USER c##ggadmin@cdb1 ALIAS cggwest DOMAIN OracleGoldenGate PASSWORD ggadmin
DBLOGIN USERIDALIAS cggwest
ALTER CREDENTIALSTORE ADD USER ggadmin@pdbwest ALIAS ggwest DOMAIN OracleGoldenGate PASSWORD Welcome2OGG

ADD SCHEMATRANDATA hr
ADD TRANDATA hr.employees
ADD HEARTBEATTABLE

ADD EXTRACT exte, INTEGRATED TRANLOG, BEGIN NOW
ADD EXTTRAIL east/ea, EXTRACT exte
START EXTRACT exte

INFO EXTRACT exte, DETAIL

See OBEY for more information in Parameters and Functions Reference for Oracle GoldenGate.