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
-
Create and save a text file that contains the commands, one command per line. This is your
OBEYfile. The name can be anything supported by the operating system. You can nest otherOBEYfiles within anOBEYfile. -
Run the Admin Client.
-
(Optional) If using an
OBEYfile that contains nestedOBEYfiles, issue the following command. This command enables the use of nestedOBEYfiles for the current session and is required whenever using nestedOBEYfiles.ALLOWNESTED -
Call the
OBEYfile by using theOBEYcommand from the Admin Client.OBEY *file_name*Where:
file_name is the relative or fully qualified name of the
OBEYfile.
Example 9-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](/pls/topic/lookup?ctx=en/database/goldengate/core/26/coredoc&id=GWURF320) for more information in Parameters and Functions Reference for Oracle GoldenGate.