Showing posts with label Oracle Golden Gate 21.3 Microservice Architecture. Show all posts
Showing posts with label Oracle Golden Gate 21.3 Microservice Architecture. Show all posts

Sunday, June 25, 2023

Oracle GoldenGate Microservice Architecture - adminclient usage - control and view extract & replicat process

In this blog, we will try to get the status & perform stop, start of the extract and replicat process of the OGG 21.3 microservice architecture






Connect to OGG Deployment using CLI (adminclient):

Environment variables:
export OGG_HOME=/u01/app/oracle/product/21.3.0/ogg_home_1
export PATH=$PATH:$OGG_HOME/bin

If you use certificates, then use OGG_CLIENT_TLS_CAPATH  in the path.

enter the below command to start adminclient:
adminclient

once started:

[oracle@vcentos79-oracle-sa1 ~]$ adminclient
Oracle GoldenGate Administration Client for Oracle
Version 21.3.0.0.0 OGGCORE_21.3.0.0.0_PLATFORMS_210728.1047

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

Oracle Linux 7, x64, 64bit (optimized) on Jul 28 2021 12:32:46
Operating system character set identified as UTF-8.

OGG (not connected) 1>

Connect to the deployment: Remember the name of our deployment is oggdep01

If you want to how to retrieve the deployment list:

Command in OGG prompt to connect to a deployment:
connect <url for the admin service of the deployment> deployment <deployment name> user <deployment admin user> password <deployment admin password>

Actual command: 
connect http://127.0.0.1:9011 deployment oggdep01 user ggsca password ggsca

Actual Output:

OGG (not connected) 1> connect http://127.0.0.1:9011 deployment oggdep01 user ggsca password ggsca

OGG (http://127.0.0.1:9011 oggdep01) 2>

Now let us try to check the extract and replicat group names:

Findout extract group name:

Command in OGG prompt:
INFO EXTRACT *

Actual output:
OGG (http://127.0.0.1:9011 oggdep01) 3> INFO EXTRACT *

Extract    EXTS      Last Started 2023-06-21 07:21   Status ABENDED
Description          src
Checkpoint Lag       00:00:00 (updated 103:52:15 ago)
Log Read Checkpoint  Oracle Integrated Redo Logs
                     2023-06-21 09:07:19
                     SCN 0.3047276 (3047276)
Encryption Profile   LocalWallet

OGG (http://127.0.0.1:9011 oggdep01) 4>

If more detailed output is needed:

Command in OGG prompt: INFO EXTRACT * DETAIL

Actual output:

OGG (http://127.0.0.1:9011 oggdep01) 4> INFO EXTRACT * DETAIL

Extract    EXTS      Last Started 2023-06-21 07:21   Status ABENDED <<< EXTS is the extract group name
Description          src
Checkpoint Lag       00:00:00 (updated 103:52:43 ago)
Log Read Checkpoint  Oracle Integrated Redo Logs
                     2023-06-21 09:07:19
                     SCN 0.3047276 (3047276)
Encryption Profile   LocalWallet

  Target Extract Trails:

  Trail Name                                       Seqno        RBA     Max MB Trail Type

  src/es                                               2       7202        500 EXTTRAIL


Integrated Extract outbound server first scn: Unavailable.Need DBLOGIN.

Integrated Extract outbound server filtering start scn: Unavailable.Need DBLOGIN.

  Extract Source                          Begin             End

  Not Available                           2023-06-18 20:21  2023-06-21 09:07
  Not Available                           2023-06-18 20:21  2023-06-18 21:42
  Not Available                           2023-06-18 20:21  2023-06-18 21:42
  Not Available                           2023-06-18 20:21  2023-06-18 21:42
  Not Available                           2023-06-18 20:21  2023-06-18 20:53
  Not Available                           2023-06-18 20:21  2023-06-18 20:53
  Not Available                           2023-06-18 20:21  2023-06-18 20:53
  Not Available                           * Initialized *   2023-06-18 20:21
  Not Available                           * Initialized *   2023-06-18 20:21
  Not Available                           * Initialized *   2023-06-18 20:21


Current directory    /

Report file          /oggdata/oggdep01/var/lib/report/EXTS.rpt
Parameter file       /oggdata/oggdep01/etc/conf/ogg/EXTS.prm
Checkpoint file      /oggdata/oggdep01/var/lib/checkpt/EXTS.cpe
Process file         /oggdata/oggdep01/var/run/EXTS.pce
Error log            /oggdata/oggdep01/var/log/ggserr.log

OGG (http://127.0.0.1:9011 oggdep01) 5>

To start the abended EXTRACT:
Ensure the candidate DB and listener are up and running, otherwise extract will keep abending.

Command in OGG prompt:
check status:  status extract exts
start extract:  start extract exts
check status:  status extract exts

Actual output:

OGG (http://127.0.0.1:9011 oggdep01) 13> status extract exts
EXTRACT EXTS: ABENDED

OGG (http://127.0.0.1:9011 oggdep01) 14> start extract exts
2023-06-25T16:06:30Z  INFO    OGG-00975  Extract group EXTS starting.
2023-06-25T16:06:30Z  INFO    OGG-15426  Extract group EXTS started.

OGG (http://127.0.0.1:9011 oggdep01) 15> status extract exts
EXTRACT EXTS: RUNNING

OGG (http://127.0.0.1:9011 oggdep01) 16>

To start the replicat process:

Findout the replicate group name:
command in OGG prompt: 
info replicate *
info replicate * detail

Actual output:

OGG (http://127.0.0.1:9011 oggdep01) 16> info replicat *

Replicat   REPT      Last Started 2023-06-21 07:24   Status ABENDED <<< REPT is the replication group name
Description          tgt
Parallel
Checkpoint Lag       00:00:00 (updated 103:59:21 ago)
Log Read Checkpoint  File src/es000000002
                     2023-06-21 09:08:48.625516  RBA 7202
Settings Profile     Default
Encryption Profile   LocalWallet

OGG (http://127.0.0.1:9011 oggdep01) 17>

Detailed output:

OGG (http://127.0.0.1:9011 oggdep01) 17> info replicat * detail

Replicat   REPT      Last Started 2023-06-21 07:24   Status ABENDED
Description          tgt
Parallel
Checkpoint Lag       00:00:00 (updated 103:59:26 ago)
Log Read Checkpoint  File src/es000000002
                     2023-06-21 09:08:48.625516  RBA 7202
Settings Profile     Default
Encryption Profile   LocalWallet

Current Log BSN value: 2992415


Low Watermark CSN value: 3034995


High Watermark CSN value: 3034995



Current directory    /

Report file          /oggdata/oggdep01/var/lib/report/REPT.rpt
Parameter file       /oggdata/oggdep01/etc/conf/ogg/REPT.prm
Checkpoint file      /oggdata/oggdep01/var/lib/checkpt/REPT.cpr
Checkpoint table     GGADMIN.GG_CHECKPOINT
Process file         /oggdata/oggdep01/var/run/REPT.pcr
Error log            /oggdata/oggdep01/var/log/ggserr.log

OGG (http://127.0.0.1:9011 oggdep01) 18>

Now to start the replicat process:

Ensure the target db and listener are up.

OGG (http://127.0.0.1:9011 oggdep01) 18> status replicat REPT
REPLICAT REPT: ABENDED

OGG (http://127.0.0.1:9011 oggdep01) 19> start replicat REPT
2023-06-25T16:11:12Z  INFO    OGG-00975  Replicat group REPT starting.
2023-06-25T16:11:12Z  INFO    OGG-15445  Replicat group REPT started.

OGG (http://127.0.0.1:9011 oggdep01) 20> status replicat REPT << Wait for few secs
REPLICAT REPT: ABENDED

OGG (http://127.0.0.1:9011 oggdep01) 21> status replicat REPT << Wait for few secs, see now the replicat is alive.
REPLICAT REPT: RUNNING

OGG (http://127.0.0.1:9011 oggdep01) 22>

Simillarly to stop the extract and replicat just replace start with stop.

Command for extract:
stop extract exts
status extract exts

Actual output:
OGG (http://127.0.0.1:9011 oggdep01) 22> stop extract exts
2023-06-25T16:13:35Z  INFO    OGG-08100  Sending STOP request to Extract group EXTS.
2023-06-25T16:13:35Z  INFO    OGG-02964  Extract group EXTS is down (gracefully).

OGG (http://127.0.0.1:9011 oggdep01) 23> status extract exts
EXTRACT EXTS: STOPPED

OGG (http://127.0.0.1:9011 oggdep01) 24>

Command for replicat:
stop replicat REPT
status replicat REPT

Actual output:
OGG (http://127.0.0.1:9011 oggdep01) 24> stop replicat REPT
2023-06-25T16:14:26Z  INFO    OGG-08100  Sending STOP request to Replicat group REPT.
2023-06-25T16:14:26Z  INFO    OGG-02965  Replicat group REPT is down (gracefully).

OGG (http://127.0.0.1:9011 oggdep01) 25> status replicat REPT
REPLICAT REPT: STOPPED

OGG (http://127.0.0.1:9011 oggdep01) 26>

Notice the image below post extract and replicat are gracefully stopped:



To view the parameters of the extract and replicat:

View params:

Command on OGG: view params <group name>

group name can be of extract's or replicat's.

Extract param: view params exts

Actual command output:

OGG (http://127.0.0.1:9011 oggdep01 as cggadmin@ORA19C/CDB$ROOT) 28> view params exts
EXTRACT exts
USERIDALIAS cggadmin DOMAIN OracleGoldenGate
EXTTRAIL src/es
SOURCECATALOG OPDB1
DDL INCLUDE MAPPED
TABLE OPDB1_PUBLIC_USER.*;

OGG (http://127.0.0.1:9011 oggdep01 as cggadmin@ORA19C/CDB$ROOT) 29>

Replicat param: view params rept

Actual command output:

OGG (http://127.0.0.1:9011 oggdep01 as cggadmin@ORA19C/CDB$ROOT) 29> view params rept
REPLICAT rept
USERIDALIAS ggadmin_DBCASLNT DOMAIN OracleGoldenGate
--DDL EXCLUDE ALL
DDLERROR default discard
REPERROR (default,discard)
DDLOPTIONS REPORT
SOURCECATALOG OPDB1
MAP OPDB1_PUBLIC_USER.*, TARGET OPDB1_PUBLIC_USER.*;

OGG (http://127.0.0.1:9011 oggdep01 as cggadmin@ORA19C/CDB$ROOT) 30>

Here we close this blog page.
Thank you!