Frequently Used GoldenGate Commands
·
GGSCI
is the command interface that executes GoldenGate commands.
•
Start
GGSCI from the GoldenGate install directory:
Shell> cd <GoldenGate
install location>
Shell> GGSCI
For Help on
a specific command:
GGSCI> HELP <command>
<object>
GGSCI> HELP ADD EXTRACT
• [oracle@ggtest12c1 dirprm]$ $OGG_HOME/ggsci
Oracle
GoldenGate Command Interpreter for Oracle
Version
12.1.2.1.0 OGGCORE_12.1.2.1.0_PLATFORMS_140727.2135.1_FBO
Linux, x64,
64bit (optimized), Oracle 12c on Aug 7 2014 10:21:34
Operating
system character set identified as UTF-8.
Copyright
(C) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
GGSCI
(ggtest12c1.acme.com) 1>
Log in as the GoldenGate database user.
GGSCI 1> dblogin userid ggate password ggate
Successfully
logged into database.
GGSCI (@src12c)
2>
Run the desired TRANDATA option. In
our case we will use SCHEMATRANDATA because this an Oracle-to-Oracle setup.
GGSCI (@src12c)
4> add schematrandata scott
2015-07-25
14:06:26 INFO OGG-01788 SCHEMATRANDATA has been added on schema scott.
2015-07-25
14:06:26 INFO OGG-01976 SCHEMATRANDATA for scheduling columns has been added on
schema scott.
GGSCI (@src12c)
5>
• History:
Lists the most recent GGSCI commands issued
• Info All: Displays the status and lag
for all Oracle GoldenGate online processes on a system (Info All AllProcesses also displays tasks.)
• Obey: Runs a file containing a list of
GGSCI commands
• Shell:
Runs shell commands from within GGSCI
• Show:
Displays the Oracle GoldenGate environment
• Versions:
Displays OS and database versions
• View GGSEvt:
Displays the Oracle GoldenGate event/error log
ggserr.log -- known as error
log
• View Report:
Displays a process report for Extract or Replicat health check
• To start and monitor golden Gate ,Go
to golden Gate home folder and run GGSCI
Server1:TestDB:/ogg/TestDB/ggs
$ls –ltr
drwxr-xr-x
26 oracle dba 4096 May 05 15:35 gghome
drwxr-xr-x
2 oracle dba 16384 Jun 09 12:48 backup_arch
Server1:TestDB:/ogg/TestDB/ggs $cd gghome
Server1:TestDB:/ogg/TestDB/ggs/gghome $./ggsci
for windows
C:\GG> ggsci.exe
TO CHECK PROCESS
GGSCI
(Server1) 2> info all
Program Status
Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT ABENDED
CAM_CAP 00:00:03 03:48:38
EXTRACT RUNNING
CAM_PUMP 00:00:00 00:00:08
GGSCI
(Server1) 3> info mgr
Manager is
running (IP port Server1.7809, Process ID 47317384).
• GGSCI (Server1) 3> SHOW ALL
Parameter settings:
SET
SUBDIRS ON
SET
DEBUG OFF
Current
directory: /ogg/TestDB/ggs/gghome
Using
subdirectories for all process files
Editor: vi
Reports
(.rpt)
/ogg/TestDB/ggs/gghome/dirrpt
Parameters
(.prm)
/ogg/TestDB/ggs/gghome/dirprm
Replicat
Checkpoints (.cpr)
/ogg/TestDB/ggs/gghome/dirchk
Extract Checkpoints
(.cpe) /ogg/TestDB/ggs/gghome/dirchk
Process
Status (.pcs)
/ogg/TestDB/ggs/gghome/dirpcs
SQL Scripts
(.sql)
/ogg/TestDB/ggs/gghome/dirsql
Database
Definitions (.def)
/ogg/TestDB/ggs/gghome/dirdef
Dump files
(.dmp) /ogg/TestDB/ggs/gghome/dirdmp
Masterkey
wallet files (.wlt)
/ogg/TestDB/ggs/gghome/dirwlt
Credential
store files (.crd)
/ogg/TestDB/ggs/gghome/dircrd
GGSCI
(Server1) 6> info extract CAM_CAP
EXTRACT CAM_CAP
Last Started 2017-06-13 10:43
Status RUNNING
Checkpoint
Lag 00:00:08 (updated 00:00:03 ago)
Process
ID 49480138
Log Read
Checkpoint Oracle Integrated Redo Logs
2017-06-14 15:44:30
SCN 2355.4077014034
(10118724996114)
GGSCI
(Server1) 7> info extract CAM_PUMP
EXTRACT CAM_PUMP
Last Started 2017-06-13 10:46
Status RUNNING
Checkpoint
Lag 00:00:00 (updated 00:00:00 ago)
Process
ID 32440748
Log Read
Checkpoint File
/ogg/TestDB/ggs/gghome/dirdat/cc000000013
2017-06-14
15:44:17.000000 RBA 3570596
• GGSCI
(TARGET) > Lag Replicat rep_2a
Sending GETLAG
request to REPLICAT REP_2A ... Last record lag: 34 seconds.
At EOF, no more
records to process.
• GGSCI
(TARGET) >
GGSCI (SOURCE) > Info RmtTrail *
Extract Trail: ./dirdat/vv Extract: EXT_2A
Seqno: 2
RBA: 2399277
File Size: 5M
Extract Trail: ./dirdat/rt Extract: PUMP_2A
Seqno: 2
RBA: 2399565
File Size: 5M
GGSCI (SOURCE) >
GGSCI (SOURCE) > Info All, AllProcesses
Program Status Group Lag
at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT_2A 00:00:00 00:00:08
EXTRACT STOPPED INITLOAD
EXTRACT RUNNING PUMP_2A 00:00:00 00:00:07
ggsci>
INFO EXTRACT group_name [, SHOWCH [n]] [, DETAIL] [, TASKS | ALLPROCESSES] -- To display Status of Extract, Approximate
Extract lag, Checkpoint information, Process run history
ggsci>
info extract emp_ext
ggsci>
info extract cust_ext, detail
ggsci>
info extract ext*, showch
ggsci>
info extract *, detail
ggsci>
info extract hr, tasks
ggsci> INFO
REPLICAT group_name [, SHOWCH [n]] [, DETAIL] [, TASKS | ALLPROCESSES] -- To
display status of Replicat, Approximate replication lag, the trail from which
Replicat is reading, Replicat run history, including checkpoints in the trail,
Information about the Replicat environment.
ggsci>
info replicat emp_rep
ggsci>
info replicat emp_rep, detail
ggsci>
info replicat prd*, detail, allprocesses
ggsci>
info replicat *, tasks
ggsci>
info replicat fin, showch
ggsci>
INFO EXTTRAIL trail_name -- To retrieve
configuration information for a local trail
ggsci>
info exttrail *
ggsci>
info exttrail e:\ogg\dirdat\ex
ggsci>
INFO RMTTRAIL trail_name -- To retrieve
configuration information for a remote trail
ggsci>
info rmttrail *
ggsci>
info rmttrail d:\ogg\dirdat\e
No comments:
Post a Comment