Automating Commands
Oracle GoldenGate supports the issuing of commands through scripts or jobs. This section describes these options for UNIX- or Linux-based platforms and the IBMi platform.
On a UNIX or Linux system, or within a runtime environment that supports UNIX or Linux applications, you can issue Oracle GoldenGate commands from a script such as a startup script, shutdown script, or failover script by running GGSCI and calling an input file. The script file must be encoded in the operating system character set. Unicode notation can be used for characters that are not supported by the operating system character set. Before creating a script, see Globalization Support for the Command Interface.
To Input a Script
Use the following syntax from the command line of the operating system.
ggsci < input_file
Where:
-
The angle bracket (<) character pipes the file into the GGSCI program.
-
input_file
is a text file, known as anOBEY
file, containing the commands that you want to issue, in the order they are to be issued.
Note:
To stop the Manager process from a batch file, make certain to add the
!
argument to the end of the STOP MANAGER
command. Otherwise, GGSCI issues a prompt that requires a response and causes
the process to enter into a loop.