Oraclue

Oracle internals, debugging and undocumented features

EVAL – Oracle Golden Gate internal command

I had a chance to take a quick look at Golden Gate  executable GGSCI.

If you run HELP command you will get a list of all ( or not ) options that you can use:
-bash-3.2$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.0.0 Build 078
Linux, x64, 64bit (optimized), Oracle 11 on Jul 28 2010 13:13:42

Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved.

GGSCI (demo) 1> help

GGSCI Command Summary:

Object:          Command:
SUBDIRS          CREATE
ER               INFO, KILL, LAG, SEND, STATUS, START, STATS, STOP
EXTRACT          ADD, ALTER, CLEANUP, DELETE, INFO, KILL,
LAG, SEND, START, STATS, STATUS, STOP
EXTTRAIL         ADD, ALTER, DELETE, INFO
GGSEVT           VIEW
MANAGER          INFO, SEND, START, STOP, STATUS
MARKER           INFO
PARAMS           EDIT, VIEW
REPLICAT         ADD, ALTER, CLEANUP, DELETE, INFO, KILL, LAG, SEND,
START, STATS, STATUS, STOP
REPORT           VIEW
RMTTRAIL         ADD, ALTER, DELETE, INFO
TRACETABLE       ADD, DELETE, INFO
TRANDATA         ADD, DELETE, INFO
CHECKPOINTTABLE  ADD, DELETE, CLEANUP, INFO

Commands without an object:
(Database)       DBLOGIN, LIST TABLES, ENCRYPT PASSWORD
(DDL)            DUMPDDL
(Miscellaneous)  FC, HELP, HISTORY, INFO ALL, OBEY, SET EDITOR, SHELL,
SHOW, VERSIONS, ! (note: you must type the word
COMMAND after the ! to display the ! help topic.)
i.e.: GGSCI (sys1)> help ! command

For help on a specific command, type HELP <command> <object>.

Example: HELP ADD REPLICAT

However , like any other Oracle executable development team will reserve few “hidden” commands for internal use.

So here is one that I just discovered:  EVAL

GGSCI (demo) 2> EVAL

Note: EVAL command is for internal GoldenGate use and is not supported

EVAL [EXISTING | EXITIF] FILE fileName [NOREPORT] {EXISTS ANY|occurancesExpected}|NOTEXISTS searchString

EVAL STOP | NOSTOP

EVAL RETRY | NORETRY

EVAL RETRYDELAY retrySeconds | MAXRETRIES numOfRetries

EVAL PRINT string

fileName will be searched for searchString. Note that EVAL doesn’t count number of occurances, but rather number of lines in which searchString occurs. If EXISTING is used, file must already exist.
If EXITIF is used, successful evaluation will cause OBEY script to end. Failure means simply continue – test will not stop.
If EXISTS ANY is used, then EVAL will report OK if there is 1 or more lines in the file fileName containing searchString
If EXISTS number is used (for example EXISTS 4), then EVAL will report OK if there is exactly 4 lines in the file fileName containing string searchString
If NOTEXISTS is used, then EVAL will report OK if there is no occurances of searchString in file fileName

If NOREPORT is used, then ggeval file is not written to. This is useful when you evaluating  ggeval file itself. In this case, due to recursive nature of evaluation, it would always fail.

If STOP is used, EVAL will stop on failure. If NOSTOP is used, EVAL will not stop on failure.

Multiple EVALs can be issued one after the other for multiple verifications (different EXISTS or NOTEXISTS).
RETRYDELAY/MAXRETRIES sets retry strategy for checking EVALs from last encountered EVAL RETRY to current point of failure. If NORETRY is used, EVALs will not attempt retries until next RETRY.
File ggeval is written with results from EVALS. These results are always appended to ggeval file.
PRINT will print string into ggeval file.
NOTE: searchString must always be the last parameter, all parameters after searchString are ingored.

Note:  This command is for Golden Gate support internal use and not supported.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: