6 Oracle GoldenGate Programs

This chapter describes the programs issued directly from the native command line of the Linux, UNIX, or Windows platforms.

Note:

Extract and Replicat typically, run from Admin Client. However, in some situations, such as initial load procedures, require running them from the command line of the operating system.

The following environment variables need to be set up from the bash prompt to be able to use command line utilities such as defgen:
  • OGG_HOME: This value is usually present after Oracle GoldenGate installation. However, you can preset this value on the bash prompt. Example:
    export OGG_HOME=/u01/ogg
  • OGG_VAR_HOME: This is the location in which the processing artifacts for logging and reporting, for each deployment are stored. Example:
    export OGG_VAR_HOME=/u02/Deployment/var
  • OGG_SERVICEMANAGER_ID: This is the value of the Service Manager deployment ID which is used for encryption. Example:

    OGG_SERVICEMANAGER_ID=e5d29c3d-3d73-48be-95e6-b04eb9a1d407

    To obtain the Service Manager deployment ID, you can use either one of the following commands:

    strings /proc/$(pgrep adminsrvr)/environ | grep -E '(OGG_VAR_HOME|OGG_SERVICEMANAGER_ID)'
    or
    curl -su ggma:P@ssW0rd http://127.0.0.1:9011/services/v2/deployments/ServiceManager | jq .response.id,.response.oggVarHome

Topics:

ggsci

Use the ggsci command to run the GGSCI command interface from the command line of the operating system. Optionally, you can provide input from an OBEY file. For more information about using an input file into GGSCI, see Storing and Calling Frequently Used Command Sequences in Administering Oracle GoldenGate.

Syntax for Windows, UNIX, and Linux

ggsci[ < input_file]  
[cd directory] 
[log | nolog]
<

Pipes the input file into the GGSCI program.

ggsci

Used without options, the command runs the program interactively.

cd directory

Changes the current working directory of the process. The process will use the specified directory for all of its operations, such as opening and writing files.

input_file

The input text file, known as an OBEY file, containing the commands that you want to issue, in the order they are to be issued, one command per line. The name can be anything supported by the operating system.

log | nolog

Enables or suppresses the logging of GGSCI commands to the report file. The default is log. The following commands are logged: ADD, ALTER, CREATE, DELETE, INFO, START, STOP, CLEANUP, SEND, KILL, EDIT, REFRESH.

Syntax for IBM i CLI

GGSCI [PARAMFILE (input_file)] [OTHERS(other_options)]
PARAMFILE(input_file)

The input text file, known as an OBEY file, containing the commands that you want to issue, in the order they are to be issued, one command per line. The name can be anything supported by the operating system.

OTHERS(other_options)

Any options that are supported in the UNIX version of the command provided as a space separated list.