Thursday 9 November 2017

Frequently Used GoldenGate Commands

Below are some of the GoldenGate commands that we use frequently. We work on GoldenGate 12c version but almost all commands work in same manner in 11g and 12c.
MANAGER RELATED COMMANDS
COMMANDDESCRIPTION
INFO MANAGER
or
INFO MGR
or
STATUS MANAGER
Displays the Manager process status information.
START MANAGERStarts the Manager process.
STOP MGR
or
STOP MANAGER
or
STOP MANAGER!
Stops the Manager process.
If you put ! mark in the end then it will not ask you y/n prompt also and directly stop it.
SEND MANAGERNot used very frequently but is very useful when you are troubleshooting some issues. Checks addition status
information when used with extra options.Example to get the port information use like below:
SEND MANAGER GETPORTINFO DETAIL
EXTRACT RELATED COMMANDS
COMMANDDESCRIPTION
INFO <EXTRACT_NAME>
or
INFO EXTRACT <EXTRACT_NAME>
OR
STATUS EXTRACT
Displays the status summary for an Extract process. Use “DETAIL” keyword to get further details.
INFO EXTRACT, DETAIL
It also supports wild card, Example like below you can get details of all EXTRACT process that starts with E in single statement.
INFO E*, DETAIL
 ADD EXTRACT creates a new Extract group
Example for Integrated Extract:
ADD EXTRACT ESOURCE01, INTEGRATED TRANLOG, BEGIN NOW
 ALTER EXTRACT This command alters an existing Extract group
 STOP EXTRACTThis command stops the Extract process
Supports wildcards too:STOP EXTRACT *
 STATS EXTRACTDisplays the Extract process statistics.
 START EXTRACTThis command starts the Extract process.
Supports wildcards too:START EXTRACT *
 REGISTER EXTRACTRegisters an Extract process group with its source database
 UNREGISTER EXTRACTUnregisters an Extract process group from its source database
 KILL EXTRACTKills an Extract process. Use when the process cannot be stopped gracefully.
LAG EXTRACTDisplays the lag time between the Extract process and the data source
CLEANUP EXTRACTDeletes the run history for the specified Extract group. you must stop the Extract before cleaning it up.
DELETE EXTRACTIt will delete the Extract group. The Extract process must first be stopped.
SEND EXTRACTIt will direct Extract process to generate statistics/reports
VIEW REPORTAllows process reports generated by the SEND command to be viewed
REPLICAT RELATED COMMANDS
COMMAND DESCRIPTION
INFO REPLICAT <REPLICAT_NAME>
or
STATUS REPLICAT <REPLICAT_NAME>
Displays the status summary for the Replicat process
The DETAIL option provides more information:
INFO REPICAT, DETAIL
START REPLICAT <REPLICAT_NAME>Starts the Replicat process
STATS REPLICAT <REPLICAT_NAME>Displays the Replicat process statistics.
STOP REPLICAT <REPLICAT_NAME>Stops the Replicat process
KILL REPLICAT <REPLICAT_NAME>kills the Replicat process and is used when the process cannot be stopped gracefully.
LAG REPLICAT <REPLICAT_NAME>Displays the lag time between the Replicat process and the data source.
REGISTER REPLICAT <REPLICAT_NAME>Registers the Replicat process group with its target database
UNREGISTER REPLICAT <REPLICAT_NAME>unregisters an Replicat from its target database.
CLEANUP REPLICAT <REPLICAT_NAME>Deletes the run history for the specified Replicat group. The Replicat process
must be stopped first.
DELETE REPLICAT <REPLICAT_NAME>This command deletes an Extract group. The Replicat process must be stopped first.
SEND REPLICAT <REPLICAT_NAME>Sends ad hoc report generation or trace file generation command to Replicat
VIEW REPORT <REPLICAT_NAME>Allows process to view reports generated by the SEND command
MISCELLANEOUS COMMANDS
COMMANDDESCRIPTION
ADD EXTTRAILCreates a local trail for an Extract group.
ALTER EXTTRAILCan alter local trail example if you want to edit the trail file size
ADD RMTTRAILCreates a remote trail for an Extract or data pump group
ALTER RMTTRAILCan be used to alter the remote trail size
INFO EXTTRAILProvides information on the local trail status
INFO RMTTRAILProvides information on the remote trail status
DELETE EXTTRAILDeletes the local trail
DELETE RMTTRAILDeletes the remote trail
VIEW PARAMSAllows a process’ parameter file to be viewed
EDIT PARAMSAllows a process’ parameter file to be edited
ADD CREDENTIALSTORECreates a Credentials Store wallet to store database user/password
INFO CREDENTIALSTORELists all users defined in the Credentials Store wallet.
DBLOGINprovides access to the database with the username and password OR you can also use db login alias. Example:
DBLOGIN USERIDALIAS sourcepass
ADD SCHEMATRANDATAThis command can be run only after you have connected to database using dblogin. It adds database schema level supplemental logging
ADD TRANDATAThis command can be run only after you have connected to database using dblogin. It adds supplemental logging to a database table.
DELETE TRANDATAThis command stops the supplemental logging on a database table
INFO TRANDATAProvides the supplemental logging status on a database table
INFO SCHEMATRANDATAProvides the supplemental logging status on a database schema
HISTORYLists a history of GGSCI commands that were used.
ADD CHECKPOINTTABLEAdds a checkpoint table on the target database.
DELETE CHECKPOINTTABLEDeletes the checkpoint table from the database.
INFO CHECKPOINTTABLEShows the checkpoint table status and creation date
OBEYYou can run a set of command in chunks by putting those commands in .oby file and executing it
Example:
OBEY dirprm/conf.oby
SHELLAllows OS commands to be executed from GGSCI command prompt
SHELL df -h dirdat
Also at any time you can type “HELP” in ggsci command prompt to get help on a command
Example, for help on a specific command, type HELP [command] [object]
HELP ADD EXTRACT
REFERENCE:
https://docs.oracle.com/goldengate/1212/gg-winux/GWURF/ggsci_commands.htm#GWURF110

No comments:

Post a Comment