Golden Gate Maintenance: manage GoldenGate processes

From Robs_Wiki
Jump to: navigation, search

View information about all running processes

GGSCI (rob01db01.localdomain) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     PPRD12C     00:00:00      unknown
EXTRACT     RUNNING     XPRD12C     00:00:10      unknown

Configure the Extract process

Step 1: Configure the extract parameter file

[oracle@rob01db01 ~]$ cd $GG_HOME
[oracle@rob01db01 gg_home1]$ ./ggsci

GGSCI> edit param xrob1

-- See the section about sample files for some extract parameter file examples
GGSCI> register extract x1rob1 database

2017-09-16 12:31:47  INFO    OGG-02003  Extract X1ROB1 successfully registered with database at SCN 2933427.

GGSCI> add extract x1rob1, integrated tranlog, begin now
EXTRACT (Integrated) added.

GGSCI> ADD EXTTRAIL ./dirdat/prd12c/x1, EXTRACT X1ROB1 megabytes 10
EXTTRAIL added.

GGSCI> start extract x1rob1

Sending START request to MANAGER ...
EXTRACT X1ROB1 starting

GGSCI> info extract x1rob1

EXTRACT    X1ROB1    Last Started 2017-09-16 12:34   Status RUNNING
Checkpoint Lag       00:00:02 (updated 00:00:03 ago)
Process ID           17953
Log Read Checkpoint  Oracle Integrated Redo Logs
                     2017-09-16 12:34:10
                     SCN 0.2951129 (2951129)

Manage the Extract process

-- view information about the proces
GGSCI (rob01db01.localdomain) 1> info extract xprd12c [detail]

-- view the latest report about the process
-- it is easier to view the reports with vi in $GG_HOME/dirrpt, plus you can see all the reports, also previous ones.
GGSCI (rob01db01.localdomain) 1> view report xprd12c

-- perform a rollover to the next trail file
GGSCI> alter extract XHR, ETROLLOVER
 
2017-07-31 15:15:17  INFO    OGG-01520  Rollover performed.  For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file;  it will not happen automatically.
EXTRACT altered.

-- as you can see, you have to alter the PUMP (or REPLICAT if you don't use PUMP) accordingly:
-- stop and start PUMP first
GGSCI> ALTER EXTRACT phr, EXTSEQNO 10, EXTRBA 0
EXTRACT altered.
-- delete the extract process 
GGSCI> delete extract XHR
Deleted EXTRACT XHR

GGSCI> unregister extract XHR database;

2017-08-21 08:58:59  INFO    OGG-01750  Successfully unregistered EXTRACT XHR from database.

Configure the pump process

GGSCI> dblogin userid ggadmin password ggadmin

GGSCI> edit param p1rob1

-- see sample files section for some parameter file examples

GGSCI> register extract p1rob1 database;

2017-09-16 12:42:02  INFO    OGG-02003  Extract P1ROB1 successfully registered with database at SCN 2957364.

GGSCI> add extract p1rob1, EXTTRAILSOURCE dirdat/prd12c/x1
EXTRACT added.

GGSCI> add rmttrail dirdat/trg12c/x1, extract p1rob1, megabytes 10
RMTTRAIL added.

GGSCI> start extract p1rob1

Sending START request to MANAGER ...
EXTRACT PPRD12C starting

GGSCI> info all
GGSCI (rob01db01.localdomain as ggadmin@prd12c) 32> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     P1ROB1      00:00:00      00:00:05
EXTRACT     RUNNING     X1ROB1      00:00:10      00:00:07

Manate the pump process

Configure the replicat process

GGSCI> dblogin userid ggadmin password ggadmin
Successfully logged into database.

GGSCI> edit param r1rob1
-- see section sample files for some samples

GGSCI> register replicat r1rob1 database

2017-09-16 13:03:27  INFO    OGG-02528  REPLICAT R1ROB1 successfully registered with database as inbound server OGG$R1ROB1.

GGSCI> add replicat r1rob1, integrated, exttrail ./dirdat/trg12c/x1
REPLICAT (Integrated) added.

-- start replicat normally
GGSCI> start replicat r1rob1

-- start replicat after instantiation
GGSCI> start replicat r1rob1, aftercsn 2975504

GGSCI (rob01db02.localdomain as ggadmin@trg12c) 8> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    RUNNING     R1ROB1      00:00:00      00:01:57


GGSCI (rob01db02.localdomain as ggadmin@trg12c) 9> info replicat r1rob1

REPLICAT   R1ROB1    Last Started 2017-09-16 13:06   Status RUNNING
INTEGRATED
Checkpoint Lag       00:00:00 (updated 00:00:04 ago)
Process ID           11717
Log Read Checkpoint  File ./dirdat/trg12c/x1000000000
                     2017-09-16 13:06:50.064353  RBA 1814831

Manage the replicat process

-- change the replicat trailfile start position
-- stop the process first and start it afterwards
GGSCI> ALTER REPLICAT rprd12c, EXTSEQNO 39
 
2017-08-03 15:22:01  INFO    OGG-06594  Replicat rprd12c has been altered through GGSCI. .
 
REPLICAT (Integrated) altered.

-- alter the replicat SCN start position
-- stop the process first and start it afterwards
 GGSCI> start replicat rorabup0, aftercsn 6721360258747