Showing posts with label GGSCI. Show all posts
Showing posts with label GGSCI. Show all posts

Wednesday 15 December 2021

GGSCI - Initial load from source to target database 19c

GGSCI - Initial load from source to target database 19c 


Source GG : srv6.example.com

Target GG Hostname : srv7.example.com

  • Add IP  address of source GG into target parameter GG  and restart or refresh mgr again 

GGSCI (srv7.example.com) 12> edit param mgr


GGSCI (srv7.example.com) 13> view param mgr


PORT 7810

ACCESSRULE, PROG *, IPADDR 192.168.1.129, ALLOW



GGSCI (srv7.example.com) 14> stop mgr

Manager process is required by other GGS processes.

Are you sure you want to stop it (y/n)?y


Sending STOP request to MANAGER ...

Request processed.

Manager stopped.



GGSCI (srv7.example.com) 15> start mgr

Manager started.



GGSCI (srv7.example.com) 16> info all


Program     Status      Group       Lag at Chkpt  Time Since Chkpt


MANAGER     RUNNING

REPLICAT    RUNNING     REPINT      00:00:00      00:00:04



GGSCI (srv7.example.com) 17>

  • Add initial load process load1 on source GG 


GGSCI (srv6.example.com) 37> ADD EXTRACT load1, SOURCEISTABLE
EXTRACT added.

GGSCI (srv6.example.com) 39> edit param load1


GGSCI (srv6.example.com) 40> view param load1

EXTRACT load1
USERID c##ggsource, PASSWORD ggsource   --connection to CDB$ROOT database
RMTHOST 192.168.1.197,MGRPORT 7810
RMTTASK replicat,GROUP load2
Table sgg1.hr.supplier;


  • Add replication for initial load on target gg parameter 

GGSCI (srv7.example.com) 18> ADD REPLICAT load2, SPECIALRUN
REPLICAT added.


GGSCI (srv7.example.com) 19>


GGSCI (srv7.example.com) 21>  EDIT PARAMS load2



GGSCI (srv7.example.com) 22> view param load2

EPLICAT load2
USERID c##ggtarget@TGG1,PASSWORD ggtarget
ASSUMETARGETDEFS
MAP sgg1.hr.supplier, TARGET tgg1.hr.supplier;
MAP sgg1.hr.supplier, TARGET tgg1.hr.supplier2;


GGSCI (srv7.example.com) 23>


  •  Check source tables before initial load 

SQL> sho pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 SGG1                           READ WRITE NO
SQL> alter session set container=SGG1;

Session altered.

SQL> select count(*) from hr.supplier;

  COUNT(*)
----------
         8

SQL>

  • Target table check before initial load on target database 

SQL> select count(*) from hr.supplier;

  COUNT(*)
----------
         0

SQL> select count(*) from hr.supplier2;

  COUNT(*)
----------
         0

SQL>


  • start initial load process load1 on source database 

GGSCI (srv6.example.com) 45> START EXTRACT load1

Sending START request to MANAGER ...
EXTRACT LOAD1 starting


GGSCI (srv6.example.com) 46> info extract load1

EXTRACT    LOAD1     Initialized   2021-12-12 18:58   Status STARTING
Checkpoint Lag       Not Available
Process ID           32313
Log Read Checkpoint  Not Available
                     First Record         Record 0
Task                 SOURCEISTABLE


GGSCI (srv6.example.com) 47> info extract load1

EXTRACT    LOAD1     Last Started 2021-12-12 19:26   Status STOPPED
Checkpoint Lag       Not Available
Log Read Checkpoint  Table SGG1.HR.SUPPLIER
                     2021-12-12 19:26:39  Record 8
Task                 SOURCEISTABLE


GGSCI (srv6.example.com) 48>


  • Source golden gate ggserr.log details below:

2021-12-12T19:26:32.955+0530  INFO    OGG-25340  Oracle GoldenGate Capture for Oracle, load1.prm:
                              Database Version:
                              Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production.
2021-12-12T19:26:32.955+0530  INFO    OGG-25341  Oracle GoldenGate Capture for Oracle, load1.prm:
                              Database Language and Character Set:
                              NLS_LANGUAGE     = "AMERICAN"
                              NLS_TERRITORY    = "AMERICA"
                              NLS_CHARACTERSET = "AL32UTF8".
2021-12-12T19:26:32.982+0530  INFO    OGG-06509  Oracle GoldenGate Capture for Oracle, load1.prm:  Using the following key columns for source table SGG1.HR.SUPPLIER: SUPPLIER_ID.
2021-12-12T19:26:32.982+0530  INFO    OGG-00993  Oracle GoldenGate Capture for Oracle, load1.prm:  EXTRACT LOAD1 started.
2021-12-12T19:26:37.346+0530  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): info extract load1.
2021-12-12T19:26:38.982+0530  INFO    OGG-02911  Oracle GoldenGate Capture for Oracle, load1.prm:  Processing table SGG1.HR.SUPPLIER.
2021-12-12T19:26:47.593+0530  INFO    OGG-00991  Oracle GoldenGate Capture for Oracle, load1.prm:  EXTRACT LOAD1 stopped normally.
2021-12-12T19:27:05.027+0530  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): info extract load1.


  • Check the table on Target database  
SQL> select count(*) from hr.supplier;

  COUNT(*)
----------
         8

SQL> select count(*) from hr.supplier2;

  COUNT(*)
----------
         8


  • Target golden gate ggserr.log details below:


SQL>
2021-12-12T19:26:38.979+0530  INFO    OGG-00996  Oracle GoldenGate Delivery for Oracle:  REPLICAT load2 started.
2021-12-12T19:26:39.051+0530  WARNING OGG-02760  Oracle GoldenGate Delivery for Oracle:  ASSUMETARGETDEFS is ignored because trail file  contains table definitions.
2021-12-12T19:26:39.051+0530  INFO    OGG-06505  Oracle GoldenGate Delivery for Oracle:  MAP resolved (entry sgg1.hr.supplier): MAP "SGG1"."HR"."SUPPLIER", TARGET tgg1.hr.supplier.
2021-12-12T19:26:45.275+0530  INFO    OGG-02756  Oracle GoldenGate Delivery for Oracle:  The definition for table SGG1.HR.SUPPLIER is obtained from the trail file.
2021-12-12T19:26:45.275+0530  INFO    OGG-06511  Oracle GoldenGate Delivery for Oracle:  Using following columns in default map by name: SUPPLIER_ID, SUPPLIER_NAME, CONTACT_NAME.
2021-12-12T19:26:45.275+0530  INFO    OGG-06510  Oracle GoldenGate Delivery for Oracle:  Using the following key columns for target table TGG1.HR.SUPPLIER: SUPPLIER_ID.
2021-12-12T19:26:45.276+0530  INFO    OGG-06505  Oracle GoldenGate Delivery for Oracle:  MAP resolved (entry sgg1.hr.supplier): MAP "SGG1"."HR"."SUPPLIER", TARGET tgg1.hr.supplier2.
2021-12-12T19:26:47.524+0530  INFO    OGG-06511  Oracle GoldenGate Delivery for Oracle:  Using following columns in default map by name: SUPPLIER_ID, SUPPLIER_NAME, CONTACT_NAME.
2021-12-12T19:26:47.524+0530  INFO    OGG-06510  Oracle GoldenGate Delivery for Oracle:  Using the following key columns for target table TGG1.HR.SUPPLIER2: SUPPLIER_ID.
2021-12-12T19:26:52.583+0530  INFO    OGG-00994  Oracle GoldenGate Delivery for Oracle:  REPLICAT load2 stopped normally.


GGSCI (srv7.example.com) 31> start repint,aftercsn 3979215
REPLICAT REPINT is already running.


GGSCI (srv7.example.com) 32>

ggsci : collision delete handling example 19c

 ggsci  : Collision delete handling example  

source database : sourcegg1

Target database : targetgg1

Source GG Hostname : srv6.example.com

Target GG Hostname : srv7.example.com

Scenario : 

  •  In this scenario  we will delete value from object level and stop the  target replication . Again  insert the data on same object id  on same table.
  • Starting the  replication process at target database and we face erroras unable to map table .
  • Adding HANDLECOLLISIONS parameter on target replication process and start again to sort out error and sync again.

Error:

 ORA-00001: unique constraint (HR.SUPPLIER_PK) violated
                              ORA-00001: unique constraint (HR.SUPPLIER_PK) violated) while processing the record at SEQNO 4, RBA 2673 in Integrated mode. REPLICAT will retry in Direct mode.


SQL> sho pdbs


    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

         3 SGG1                           READ WRITE NO

SQL> select * from hr.supplier order by SUPPLIER_ID;


SUPPLIER_ID SUPPLIER_NAME                                      CONTACT_NAME

----------- -------------------------------------------------- --------------------------------------------------

          1 ABCD1                                              ABCD1

          2 ABCD2                                              ABCD2

          3 ABCD3                                              ABCD3

          4 ABCD4                                              ABCD4

          5 ABCD5                                              ABCD5

          6 ABCD6                                              ABCD6

          7 ABCD7                                              ABCD7

          8 ABCD8                                              ABCD8


8 rows selected.


SQL>

GGSCI (srv6.example.com) 42> view param extint

EXTRACT extint
USERID c##ggsource, PASSWORD ggsource   --connection to CDB$ROOT database
TRANLOGOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE 100)
EXTTRAIL /u01/app/oracle/product/sourcegg1/dirdat/lt
--GETINSERTS
--GETUPDATES
--GETDELETES
--GETTRUNCATES
IGNOREDELETES
TABLE sgg1.hr.supplier;



GGSCI (srv6.example.com) 43>


GGSCI (srv6.example.com) 43> stop extint

Sending STOP request to EXTRACT EXTINT ...
Request processed.


GGSCI (srv6.example.com) 44> start extint
EXTRACT EXTINT is already running.


GGSCI (srv6.example.com) 45>


GGSCI (srv6.example.com) 45> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     DPINT       00:00:00      00:00:07
EXTRACT     STOPPED     EXTINT      00:00:00      00:00:26


GGSCI (srv6.example.com) 46> start extint

Sending START request to MANAGER ...
EXTRACT EXTINT starting


GGSCI (srv6.example.com) 47> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     DPINT       00:00:00      00:00:05
EXTRACT     RUNNING     EXTINT      00:00:00      00:00:07


GGSCI (srv6.example.com) 48>



SQL> select * from hr.supplier order by SUPPLIER_ID;

SUPPLIER_ID SUPPLIER_NAME                                      CONTACT_NAME
----------- -------------------------------------------------- --------------------------------------------------
          1 ABCD1                                              ABCD1
          2 ABCD2                                              ABCD2
          3 ABCD3                                              ABCD3
          4 ABCD4                                              ABCD4
          5 ABCD5                                              ABCD5
          6 ABCD6                                              ABCD6
          7 ABCD7                                              ABCD7
          8 ABCD8                                              ABCD8

8 rows selected.

SQL> delete from hr.supplier where SUPPLIER_ID=1;

1 row deleted.

SQL> commit;

Commit complete.

SQL> select * from hr.supplier order by SUPPLIER_ID;

SUPPLIER_ID SUPPLIER_NAME                                      CONTACT_NAME
----------- -------------------------------------------------- --------------------------------------------------
          2 ABCD2                                              ABCD2
          3 ABCD3                                              ABCD3
          4 ABCD4                                              ABCD4
          5 ABCD5                                              ABCD5
          6 ABCD6                                              ABCD6
          7 ABCD7                                              ABCD7
          8 ABCD8                                              ABCD8

7 rows selected.

SQL>


GGSCI (srv6.example.com) 49> stats extint

Sending STATS request to EXTRACT EXTINT ...

Start of Statistics at 2021-12-02 19:24:37.

Output to /u01/app/oracle/product/sourcegg1/dirdat/lt:

Extracting from SGG1.HR.SUPPLIER to SGG1.HR.SUPPLIER:

*** Total statistics since 2021-12-02 19:24:27 ***
        Total inserts                                      0.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total ignores                                      1.00
        Total operations                                   0.00

*** Daily statistics since 2021-12-02 19:24:27 ***
        Total inserts                                      0.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total ignores                                      1.00
        Total operations                                   0.00

*** Hourly statistics since 2021-12-02 19:24:27 ***
        Total inserts                                      0.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total ignores                                      1.00
        Total operations                                   0.00

*** Latest statistics since 2021-12-02 19:24:27 ***
        Total inserts                                      0.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total ignores                                      1.00
        Total operations                                   0.00

End of Statistics.


GGSCI (srv6.example.com) 50> 

TARGET database 


SQL> select * from hr.supplier order by SUPPLIER_ID;

SUPPLIER_ID SUPPLIER_NAME                                      CONTACT_NAME
----------- -------------------------------------------------- --------------------------------------------------
          1 ABCD1                                              ABCD1
          2 ABCD2                                              ABCD2
          3 ABCD3                                              ABCD3
          4 ABCD4                                              ABCD4
          5 ABCD5                                              ABCD5
          6 ABCD6                                              ABCD6
          7 ABCD7                                              ABCD7
          8 ABCD8                                              ABCD8

8 rows selected.

SQL> select * from hr.supplier2 order by SUPPLIER_ID;

SUPPLIER_ID SUPPLIER_NAME                                      CONTACT_NAME
----------- -------------------------------------------------- --------------------------------------------------
          7 ABCD7                                              ABCD7
          8 ABCD8                                              ABCD8

SQL>


source database 

SQL> insert into hr.supplier values (1,'ABCD11','ABCD11');

1 row created.

SQL> commit;

Commit complete.

SQL> select * from hr.supplier order by SUPPLIER_ID;

SUPPLIER_ID SUPPLIER_NAME                                      CONTACT_NAME
----------- -------------------------------------------------- --------------------------------------------------
          1 ABCD11                                             ABCD11
          2 ABCD2                                              ABCD2
          3 ABCD3                                              ABCD3
          4 ABCD4                                              ABCD4
          5 ABCD5                                              ABCD5
          6 ABCD6                                              ABCD6
          7 ABCD7                                              ABCD7
          8 ABCD8                                              ABCD8

8 rows selected.

SQL>



GGSCI (srv6.example.com) 51> stats extint

Sending STATS request to EXTRACT EXTINT ...

Start of Statistics at 2021-12-02 19:32:05.

Output to /u01/app/oracle/product/sourcegg1/dirdat/lt:

Extracting from SGG1.HR.SUPPLIER to SGG1.HR.SUPPLIER:

*** Total statistics since 2021-12-02 19:24:27 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total ignores                                      1.00
        Total operations                                   1.00

*** Daily statistics since 2021-12-02 19:24:27 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total ignores                                      1.00
        Total operations                                   1.00

*** Hourly statistics since 2021-12-02 19:24:27 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total ignores                                      1.00
        Total operations                                   1.00

*** Latest statistics since 2021-12-02 19:24:27 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total ignores                                      1.00
        Total operations                                   1.00

End of Statistics.


GGSCI (srv6.example.com) 52>




target database 

SQL> select * from hr.supplier order by SUPPLIER_ID
  2  ;

SUPPLIER_ID SUPPLIER_NAME                                      CONTACT_NAME
----------- -------------------------------------------------- --------------------------------------------------
          1 ABCD1                                              ABCD1
          2 ABCD2                                              ABCD2
          3 ABCD3                                              ABCD3
          4 ABCD4                                              ABCD4
          5 ABCD5                                              ABCD5
          6 ABCD6                                              ABCD6
          7 ABCD7                                              ABCD7
          8 ABCD8                                              ABCD8

8 rows selected.

SQL> select * from hr.supplier2 order by SUPPLIER_ID;

SUPPLIER_ID SUPPLIER_NAME                                      CONTACT_NAME
----------- -------------------------------------------------- --------------------------------------------------
          7 ABCD7                                              ABCD7
          8 ABCD8                                              ABCD8

SQL>

target ggsci

GGSCI (srv7.example.com) 20> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    ABENDED     REPINT      00:00:00      00:04:09


GGSCI (srv7.example.com) 21>

Target ggserr.log 

2021-12-02T19:17:27.835+0530  INFO    OGG-04048  Oracle GoldenGate Delivery for Oracle, repint.prm:  Processed graceful restart record at seq 4 rba 2,415.
2021-12-02T19:28:54.740+0530  INFO    OGG-06505  Oracle GoldenGate Delivery for Oracle, repint.prm:  MAP resolved (entry sgg1.hr.supplier): MAP "SGG1"."HR"."SUPPLIER", TARGET tgg1.hr.supplier.
2021-12-02T19:28:57.383+0530  INFO    OGG-02756  Oracle GoldenGate Delivery for Oracle, repint.prm:  The definition for table SGG1.HR.SUPPLIER is obtained from the trail file.
2021-12-02T19:28:57.383+0530  INFO    OGG-06511  Oracle GoldenGate Delivery for Oracle, repint.prm:  Using following columns in default map by name: SUPPLIER_ID, SUPPLIER_NAME, CONTACT_NAME.
2021-12-02T19:28:57.383+0530  INFO    OGG-06510  Oracle GoldenGate Delivery for Oracle, repint.prm:  Using the following key columns for target table TGG1.HR.SUPPLIER: SUPPLIER_ID.
2021-12-02T19:28:57.533+0530  INFO    OGG-06505  Oracle GoldenGate Delivery for Oracle, repint.prm:  MAP resolved (entry sgg1.hr.supplier): MAP "SGG1"."HR"."SUPPLIER", TARGET tgg1.hr.supplier2.
2021-12-02T19:28:58.833+0530  INFO    OGG-06511  Oracle GoldenGate Delivery for Oracle, repint.prm:  Using following columns in default map by name: SUPPLIER_ID, SUPPLIER_NAME, CONTACT_NAME.
2021-12-02T19:28:58.833+0530  INFO    OGG-06510  Oracle GoldenGate Delivery for Oracle, repint.prm:  Using the following key columns for target table TGG1.HR.SUPPLIER2: SUPPLIER_ID.
2021-12-02T19:29:01.261+0530  WARNING OGG-02544  Oracle GoldenGate Delivery for Oracle, repint.prm:  Unhandled error (ORA-26799: unique constraint HR.SUPPLIER_PK violated for table HR.SUPPLIER with column values ("SUPPLIER_ID") = (1)
                              ORA-00001: unique constraint (HR.SUPPLIER_PK) violated
                              ORA-00001: unique constraint (HR.SUPPLIER_PK) violated) while processing the record at SEQNO 4, RBA 2673 in Integrated mode. REPLICAT will retry in Direct mode.
2021-12-02T19:29:01.335+0530  WARNING OGG-01004  Oracle GoldenGate Delivery for Oracle, repint.prm:  Aborted grouped transaction on TGG1.HR.SUPPLIER, Database error 1 (OCI Error ORA-00001: unique constraint (HR.SUPPLIER_PK) violated (status = 1), SQL <INSERT INTO "HR"."SUPPLIER" ("SUPPLIER_ID","SUPPLIER_NAME","CONTACT_NAME") VALUES (:a0,:a1,:a2)>).
2021-12-02T19:29:01.335+0530  WARNING OGG-01003  Oracle GoldenGate Delivery for Oracle, repint.prm:  Repositioning to rba 2673 in seqno 4.
2021-12-02T19:29:01.335+0530  WARNING OGG-01154  Oracle GoldenGate Delivery for Oracle, repint.prm:  SQL error 1 mapping SGG1.HR.SUPPLIER to TGG1.HR.SUPPLIER OCI Error ORA-00001: unique constraint (HR.SUPPLIER_PK) violated (status = 1), SQL <INSERT INTO "HR"."SUPPLIER" ("SUPPLIER_ID","SUPPLIER_NAME","CONTACT_NAME") VALUES (:a0,:a1,:a2)>.
2021-12-02T19:29:01.335+0530  ERROR   OGG-01296  Oracle GoldenGate Delivery for Oracle, repint.prm:  Error mapping from SGG1.HR.SUPPLIER to TGG1.HR.SUPPLIER.
2021-12-02T19:29:06.597+0530  INFO    OGG-02333  Oracle GoldenGate Delivery for Oracle, repint.prm:  Reading /u01/app/oracle/product/targetgg1/dirdat/rt000000004, current RBA 2,673, 6 records, m_file_seqno = 4, m_file_rba = 2,835.
2021-12-02T19:29:06.649+0530  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, repint.prm:  PROCESS ABENDING.
2021-12-02T19:32:55.012+0530  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): info all.

GGSCI (srv7.example.com) 22> view report REPINT

2021-12-02 19:28:58  INFO    OGG-06510  Using the following key columns for target table TGG1.HR.SUPPLIER2: SUPPLIER_ID.


2021-12-02 19:29:01  WARNING OGG-02544  Unhandled error (ORA-26799: unique constraint HR.SUPPLIER_PK violated for table HR.SUPPLIER with column values ("SUPPLIER_ID") = (1)
ORA-00001: unique constraint (HR.SUPPLIER_PK) violated
ORA-00001: unique constraint (HR.SUPPLIER_PK) violated) while processing the record at SEQNO 4, RBA 2673 in Integrated mode. REPLICAT will retry in Direct mode.

2021-12-02 19:29:01  WARNING OGG-01004  Aborted grouped transaction on TGG1.HR.SUPPLIER, Database error 1 (OCI Error ORA-00001: unique constraint (HR.SUPPLIER_PK) violated (status = 1), SQL <INSERT INTO "HR"."SUPPLIER" ("SUPPLIER_ID","SU
PPLIER_NAME","CONTACT_NAME") VALUES (:a0,:a1,:a2)>).

GGSCI (srv7.example.com) 23> edit param REPINT

REPLICAT repint
USERID c##ggtarget@TGG1,PASSWORD ggtarget
DBOPTIONS INTEGRATEDPARAMS(parallelism 4)
ASSUMETARGETDEFS
HANDLECOLLISIONS
MAP sgg1.hr.supplier, TARGET tgg1.hr.supplier;
MAP sgg1.hr.supplier, TARGET tgg1.hr.supplier2;

:wq!


GGSCI (srv7.example.com) 25> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    RUNNING     REPINT      00:00:00      00:00:08


GGSCI (srv7.example.com) 26>


GGSCI (srv7.example.com) 26> view report repint


2021-12-02 19:39:20  INFO    OGG-06604  Database TGG1 CPU info: CPU Count 1, CPU Core Count 1, CPU Socket Count 1.

2021-12-02 19:39:20  WARNING OGG-05673  CSN-based duplicate suppression is disabled because there is no checkpoint table for this Replicat.

2021-12-02 19:39:21  INFO    OGG-02545  Parameter GROUPTRANSOPS is ignored by Integrated Replicat when parallelism is greater than 1.

2021-12-02 19:39:21  INFO    OGG-02527  Integrated Replicat does not populate a trace table.

2021-12-02 19:39:21  INFO    OGG-06627  Replicat sets the key columns for each table replicated by inbound server OGG$REPINT.

2021-12-02 19:39:22  INFO    OGG-02530  Integrated replicat successfully attached to inbound server OGG$REPINT.

Target database table  after update collisions parameter 

SQL> select * from hr.supplier order by SUPPLIER_ID;

SUPPLIER_ID SUPPLIER_NAME                                      CONTACT_NAME
----------- -------------------------------------------------- --------------------------------------------------
          1 ABCD11                                             ABCD11
          2 ABCD2                                              ABCD2
          3 ABCD3                                              ABCD3
          4 ABCD4                                              ABCD4
          5 ABCD5                                              ABCD5
          6 ABCD6                                              ABCD6
          7 ABCD7                                              ABCD7
          8 ABCD8                                              ABCD8

8 rows selected.

SQL> select * from hr.supplier2 order by SUPPLIER_ID;

SUPPLIER_ID SUPPLIER_NAME                                      CONTACT_NAME
----------- -------------------------------------------------- --------------------------------------------------
          1 ABCD11                                             ABCD11
          7 ABCD7                                              ABCD7
          8 ABCD8                                              ABCD8

SQL>



GGSCI (srv7.example.com) 27> stats repint

Sending STATS request to REPLICAT REPINT ...

Start of Statistics at 2021-12-02 19:43:14.


Integrated Replicat Statistics:

        Total transactions                                 0.00
        Redirected                                         1.00
        Replicated procedures                              0.00
        DDL operations                                     0.00
        Stored procedures                                  0.00
        Datatype functionality                             0.00
        Operation type functionality                       0.00
        Event actions                                      0.00
        Direct transactions ratio                          0.00%

Replicating from SGG1.HR.SUPPLIER to TGG1.HR.SUPPLIER:

*** Total statistics since 2021-12-02 19:39:22 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00
        Total insert collisions                            1.00

*** Daily statistics since 2021-12-02 19:39:22 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00
        Total insert collisions                            1.00

*** Hourly statistics since 2021-12-02 19:39:22 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00
        Total insert collisions                            1.00

*** Latest statistics since 2021-12-02 19:39:22 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00
        Total insert collisions                            1.00

Replicating from SGG1.HR.SUPPLIER to TGG1.HR.SUPPLIER2:

*** Total statistics since 2021-12-02 19:39:22 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

*** Daily statistics since 2021-12-02 19:39:22 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

*** Hourly statistics since 2021-12-02 19:39:22 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

*** Latest statistics since 2021-12-02 19:39:22 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

End of Statistics.


GGSCI (srv7.example.com) 28>






ggsci: handle update collision on target database 19c

ggsci:  handle update collision on target database  19c 

source database : sourcegg1

Target database : targetgg1

Source GG Hostname : srv6.example.com

Target GG Hostname : srv7.example.com


Scenario

  • We disable update collision from replication process and delete object id  from target database table
  • updating the same object id on source database table and we will find  error on target replicat as unable to map object id with target table.
  • Adding updating collision on target database and now it will insert and update object data on target table. 

Target Database  


SQL> alter session set container=TGG1;


Session altered.


SQL> sho pdbs


    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

         3 TGG1                           READ WRITE NO



  • Delete object values on target database for example  so while updating values of same id we will get error.


SQL> delete from hr.supplier where SUPPLIER_ID=1;


1 row deleted.


SQL> delete from hr.supplier2 where SUPPLIER_ID=1;


1 row deleted.


SQL> commit;


Commit complete.

  • Stop Replication process from target GG and disable to handle collisions 

GGSCI (srv7.example.com) 28> stop repint

Sending STOP request to REPLICAT REPINT ...
Request processed.


GGSCI (srv7.example.com) 29> edit param repint



REPLICAT repint
USERID c##ggtarget@TGG1,PASSWORD ggtarget
DBOPTIONS INTEGRATEDPARAMS(parallelism 4)
ASSUMETARGETDEFS
--HANDLECOLLISIONS
MAP sgg1.hr.supplier, TARGET tgg1.hr.supplier;
MAP sgg1.hr.supplier, TARGET tgg1.hr.supplier2;


GGSCI (srv7.example.com) 30> start repint

Sending START request to MANAGER ...
REPLICAT REPINT starting




GGSCI (srv7.example.com) 32> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    RUNNING     REPINT      00:00:00      00:00:06


GGSCI (srv7.example.com) 33>


  • Update the value on source database  which was deleted by target database above steps 


SQL> sho pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         3 SGG1                           READ WRITE NO
SQL>


SQL> update hr.supplier set SUPPLIER_NAME='ABCD1111' where SUPPLIER_ID=1;

1 row updated.

SQL> commit;

Commit complete.


SQL> select * from hr.supplier order by SUPPLIER_ID;

SUPPLIER_ID SUPPLIER_NAME                                      CONTACT_NAME
----------- -------------------------------------------------- --------------------------------------------------
          1 ABCD1111                                           ABCD11
          2 ABCD2                                              ABCD2
          3 ABCD3                                              ABCD3
          4 ABCD4                                              ABCD4
          5 ABCD5                                              ABCD5
          6 ABCD6                                              ABCD6
          7 ABCD7                                              ABCD7
          8 ABCD8                                              ABCD8

8 rows selected.

SQL>

  • View Target GG  replication process, repint is replication process name.
GGSCI (srv7.example.com) 33> view report repint

2021-12-02 19:56:43  INFO    OGG-06604  Database TGG1 CPU info: CPU Count 1, CPU Core Count 1, CPU Socket Count 1.

2021-12-02 19:56:43  WARNING OGG-05673  CSN-based duplicate suppression is disabled because there is no checkpoint table for this Replicat.

2021-12-02 19:56:44  INFO    OGG-02545  Parameter GROUPTRANSOPS is ignored by Integrated Replicat when parallelism is greater than 1.

2021-12-02 19:56:44  INFO    OGG-02527  Integrated Replicat does not populate a trace table.

2021-12-02 19:56:44  INFO    OGG-06627  Replicat sets the key columns for each table replicated by inbound server OGG$REPINT.

2021-12-02 19:56:45  INFO    OGG-02530  Integrated replicat successfully attached to inbound server OGG$REPINT.


2021-12-02 19:58:48  WARNING OGG-02544  Unhandled error (ORA-26787: The row with key ("SUPPLIER_ID") = (1) does not exist in table HR.SUPPLIER
ORA-01403: no data found) while processing the record at SEQNO 4, RBA 2835 in Integrated mode. REPLICAT will retry in Direct mode.

2021-12-02 19:58:48  WARNING OGG-01004  Aborted grouped transaction on TGG1.HR.SUPPLIER, Database error 1403 (No data found).

2021-12-02 19:58:48  WARNING OGG-01003  Repositioning to rba 2835 in seqno 4.

2021-12-02 19:58:48  WARNING OGG-01154  SQL error 1403 mapping SGG1.HR.SUPPLIER to TGG1.HR.SUPPLIER No data found.


  • We can view there is No Change in target database object as it will throuh error on taget GG log above as well.

SQL> select * from hr.supplier order by SUPPLIER_ID;

SUPPLIER_ID SUPPLIER_NAME                                      CONTACT_NAME
----------- -------------------------------------------------- --------------------------------------------------
          2 ABCD2                                              ABCD2
          3 ABCD3                                              ABCD3
          4 ABCD4                                              ABCD4
          5 ABCD5                                              ABCD5
          6 ABCD6                                              ABCD6
          7 ABCD7                                              ABCD7
          8 ABCD8                                              ABCD8

7 rows selected.

SQL> select * from hr.supplier2 order by SUPPLIER_ID;

SUPPLIER_ID SUPPLIER_NAME                                      CONTACT_NAME
----------- -------------------------------------------------- --------------------------------------------------
          7 ABCD7                                              ABCD7
          8 ABCD8                                              ABCD8

SQL>



GGSCI (srv7.example.com) 35> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    ABENDED     REPINT      00:00:00      00:07:32


  • Add HANDLECOLLISIONS  process on repint process of target GG 

GGSCI (srv7.example.com) 36> edit param repint



GGSCI (srv7.example.com) 37> view param repint

REPLICAT repint
USERID c##ggtarget@TGG1,PASSWORD ggtarget
DBOPTIONS INTEGRATEDPARAMS(parallelism 4)
ASSUMETARGETDEFS
HANDLECOLLISIONS
MAP sgg1.hr.supplier, TARGET tgg1.hr.supplier;
MAP sgg1.hr.supplier, TARGET tgg1.hr.supplier2;



GGSCI (srv7.example.com) 38>



GGSCI (srv7.example.com) 38> start repint

Sending START request to MANAGER ...
REPLICAT REPINT starting


GGSCI (srv7.example.com) 39> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    RUNNING     REPINT      07:26:04      00:00:02


GGSCI (srv7.example.com) 40> stats repint

Sending STATS request to REPLICAT REPINT ...

Start of Statistics at 2021-12-02 20:08:13.


Integrated Replicat Statistics:

        Total transactions                                 0.00
        Redirected                                         1.00
        Replicated procedures                              0.00
        DDL operations                                     0.00
        Stored procedures                                  0.00
        Datatype functionality                             0.00
        Operation type functionality                       0.00
        Event actions                                      0.00
        Direct transactions ratio                          0.00%

Replicating from SGG1.HR.SUPPLIER to TGG1.HR.SUPPLIER:

*** Total statistics since 2021-12-02 20:07:26 ***
        Total inserts                                      0.00
        Total updates                                      1.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00
        Total update collisions                            1.00

*** Daily statistics since 2021-12-02 20:07:26 ***
        Total inserts                                      0.00
        Total updates                                      1.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00
        Total update collisions                            1.00

*** Hourly statistics since 2021-12-02 20:07:26 ***
        Total inserts                                      0.00
        Total updates                                      1.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00
        Total update collisions                            1.00

*** Latest statistics since 2021-12-02 20:07:26 ***
        Total inserts                                      0.00
        Total updates                                      1.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00
        Total update collisions                            1.00

Replicating from SGG1.HR.SUPPLIER to TGG1.HR.SUPPLIER2:

*** Total statistics since 2021-12-02 20:07:26 ***
        Total inserts                                      0.00
        Total updates                                      1.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00
        Total update collisions                            1.00

*** Daily statistics since 2021-12-02 20:07:26 ***
        Total inserts                                      0.00
        Total updates                                      1.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00
        Total update collisions                            1.00

*** Hourly statistics since 2021-12-02 20:07:26 ***
        Total inserts                                      0.00
        Total updates                                      1.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00
        Total update collisions                            1.00

*** Latest statistics since 2021-12-02 20:07:26 ***
        Total inserts                                      0.00
        Total updates                                      1.00
        Total deletes                                      0.00
        Total upserts                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00
        Total update collisions                            1.00

End of Statistics.


GGSCI (srv7.example.com) 41>



Saturday 20 November 2021

ggsci - DML replication from source GG to Target GG on pluggable database 19c

 DML replication from source GG to Target GG on pluggable database 19c

Container source database : sourcegg1
source pdb name : sgg1

Container Target database : targetgg1 
target pdb name : tgg1 

Golden gate version : 19c linux on both source and target 

oracle database version : 19c on both source and target 

source container schema name : c##ggsource

target container schema name : c##ggtarget

Source ggci scapture process exint and datapump process is dpint 

Target ggsci replicate process repint


Source hostname: srv6.example.com 

Target hostname : srv7.example.com


  •  Enable replication parameter on source database sourcegg1

SQL> alter system set enable_goldengate_replication=TRUE;

  • Create common user on source contianer database 

System altered.

SQL> create user c##ggsource identified by ggsource default tablespace users;


User created.

  • Add supplemental log data columns to capture information from redo log 

SQL> alter database add supplemental log data (all) columns;

  • Grant dba privilege to all pdb or we can provide to specific pdb as well

Database altered.

SQL> grant dba to c##ggsource container=all;

Grant succeeded.
  • Enable archive log on both source and target database in our case it is enabled
SQL> select log_mode from v$database;

LOG_MODE
------------
ARCHIVELOG
  • Connect PDB database 

SQL> alter session set container=SGG1;

Session altered.

SQL> sho pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         3 SGG1                           READ WRITE NO

  • Create table supplier for dml replication as an example and insert value later we will do further insert that will reflect on target database
SQL> CREATE TABLE hr.supplier(supplier_id numeric(10) not null,supplier_name varchar2(50) not null,contact_name varchar2(50),CONSTRAINT supplier_pk PRIMARY KEY (supplier_id));

SQL> INSERT INTO hr.supplier values (1,'ABCD1','ABCD1');

1 row created.


SQL> INSERT INTO hr.supplier values (2,'ABCD2','ABCD2');

1 row created.

SQL> commit;

Commit complete.


SQL>  select * from hr.supplier;

SUPPLIER_ID SUPPLIER_NAME
----------- --------------------------------------------------
CONTACT_NAME
--------------------------------------------------
          1 ABCD1
ABCD1

          2 ABCD2
ABCD2



  • Target container database which is targetgg1 and pdb is TGG1


SQL> sho pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 TGG1                           MOUNTED


SQL> alter pluggable database all open;

Pluggable database altered.

SQL> ALTER PLUGGABLE DATABASE ALL SAVE STATE;

Pluggable database altered.
  • Enable golden gate replication parameter true on container database 
SQL> alter system set enable_goldengate_replication=TRUE;

System altered.
  • Create common user and grant dba privilege to all pdb or we can give privilege to specific pdb as well

SQL> grant dba to c##ggtarget container=all;

Grant succeeded.


  • Connect to source GG and create extract and datapump values for replication 
[oracle@srv6 ~]$ cd $GG_HOME
[oracle@srv6 sourcegg1]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:29
Operating system character set identified as UTF-8.

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



GGSCI (srv6.example.com) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED

  • Start manager  process
GGSCI (srv6.example.com) 2> start mgr
Manager started.
  • Connect pdb with common user 
GGSCI (srv6.example.com) 1> dblogin userid c##ggsource@sgg1,password ggsource
Successfully logged into database SGG1.

  • Add trandata for table replication or mention schema * in terms of al table  

GGSCI (srv6.example.com as c##ggsource@sourcegg1/SGG1) 3> add trandata sgg1.hr.supplier

2021-11-19 22:29:01  INFO    OGG-15132  Logging of supplemental redo data enabled for table SGG1.HR.SUPPLIER.

2021-11-19 22:29:01  INFO    OGG-15133  TRANDATA for scheduling columns has been added on table SGG1.HR.SUPPLIER.

2021-11-19 22:29:01  INFO    OGG-15135  TRANDATA for instantiation CSN has been added on table SGG1.HR.SUPPLIER.

2021-11-19 22:29:02  INFO    OGG-10471  ***** Oracle Goldengate support information on table HR.SUPPLIER *****
Oracle Goldengate support native capture on table HR.SUPPLIER.
Oracle Goldengate marked following column as key columns on table HR.SUPPLIER: SUPPLIER_ID.
  • Login with container db common user 
GGSCI (srv6.example.com as c##ggsource@sourcegg1/SGG1) 4> dblogin userid c##ggsource,password ggsource
Successfully logged into database CDB$ROOT.
  • edit  manager with port values 7810 information 
GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 5> edit param mgr

  • Add extract details for capturing commit dml details

GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 6> ADD EXTRACT extint, INTEGRATED TRANLOG, BEGIN NOW
EXTRACT (Integrated) added.
  • Register capture extract with pdb ssg1

GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 7> REGISTER EXTRACT EXTINT DATABASE CONTAINER (sgg1);

2021-11-19 22:33:35  INFO    OGG-02003  Extract EXTINT successfully registered with database at SCN 2313961.


GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 10> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     STOPPED     EXTINT      00:00:00      00:03:23


  • Connect  contianer db add trail  location connecting with  capture extint process

[oracle@srv6 sourcegg1]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:29
Operating system character set identified as UTF-8.

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


GGSCI (srv6.example.com) 1> dblogin userid c##ggsource,password ggsource
Successfully logged into database CDB$ROOT.


GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 2> ADD EXTTRAIL  /u01/app/oracle/product/sourcegg1/dirdat/lt, EXTRACT extint
EXTTRAIL added.
  • Add datapump process to transfer trail file to remote trail file location 
GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 3> ADD EXTRACT dpint, EXTTRAILSOURCE /u01/app/oracle/product/sourcegg1/dirdat/lt
EXTRACT added.

  • Add and view extint parameter process 
GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 4> EDIT PARAMS extint


GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 9> view param extint

EXTRACT extint
USERID c##ggsource, PASSWORD ggsource   --connection to CDB$ROOT database
TRANLOGOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE 100)
EXTTRAIL /u01/app/oracle/product/sourcegg1/dirdat/lt
TABLE sgg1.hr.supplier;


  • Add and view dpint parameter process

GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 6> EDIT PARAMS dpint


GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 8> view param dpint

EXTRACT dpint
USERID c##ggsource, PASSWORD ggsource
RMTHOST 192.168.1.130, MGRPORT 7810
RMTTRAIL /u01/app/oracle/product/targetgg1/dirdat/rt
PASSTHRU
TABLE sgg1.hr.supplier;
  • Add remote trail location using container db login 
GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 5> ADD RMTTRAIL /u01/app/oracle/product/targetgg1/dirdat/rt, EXTRACT dpint
RMTTRAIL added.

  • Start capture and datapump process extint and dpint 
GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 11> start EXTINT

Sending START request to MANAGER ...
EXTRACT EXTINT starting


GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 12> start DPINT

Sending START request to MANAGER ...
EXTRACT DPINT starting

  • View status of process in ggsci console
GGSCI (srv6.example.com as c##ggsource@sourcegg1/CDB$ROOT) 13> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     DPINT       00:00:00      00:12:27
EXTRACT     RUNNING     EXTINT      00:00:00      00:23:07


  • Connect to target ggsci console 

[oracle@srv7 targetgg1]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:29
Operating system character set identified as UTF-8.

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



GGSCI (srv7.example.com) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED


GGSCI (srv7.example.com) 2> start mgr
Manager started.


GGSCI (srv7.example.com) 3> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
  • Add port on manager process 
GGSCI (srv7.example.com) 24> view param mgr

PORT 7810


GGSCI (srv7.example.com) 25>
  • Add replication process on target ggsci console

GGSCI (srv7.example.com) 4> ADD REPLICAT repint,integrated EXTTRAIL /u01/app/oracle/product/targetgg1/dirdat/rt
REPLICAT (Integrated) added.
  • Edit and view replicate parameters 

GGSCI (srv7.example.com) 5> EDIT PARAMS repint


GGSCI (srv7.example.com) 8> view param repint

REPLICAT repint
USERID c##ggtarget@TGG1, PASSWORD ggtarget –Connection to pluggable
DBOPTIONS INTEGRATEDPARAMS(parallelism 4)
ASSUMETARGETDEFS
MAP sgg1.hr.supplier, TARGET tgg1.hr.supplier;

  • Connect to source pluggable  database SGG1  and insert the values , It should reflect on target database TGG1
SQL> sho pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         3 SGG1                           READ WRITE NO
SQL>


SQL> INSERT INTO hr.supplier values (5,'ABCD5','ABCD5');

1 row created.

SQL> commit;

Commit complete.

ggserr.log

2021-11-20T12:32:32.763+0530  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): info all.
2021-11-20T13:50:24.420+0530  INFO    OGG-06507  Oracle GoldenGate Capture for Oracle, extint.prm:  MAP (TABLE) resolved (entry sgg1.hr.supplier): TABLE "SGG1"."HR"."SUPPLIER".
2021-11-20T13:50:24.574+0530  INFO    OGG-06509  Oracle GoldenGate Capture for Oracle, extint.prm:  Using the following key columns for source table SGG1.HR.SUPPLIER: SUPPLIER_ID.
2021-11-20T13:50:24.708+0530  INFO    OGG-06507  Oracle GoldenGate Capture for Oracle, extint.prm:  MAP (TABLE) resolved (entry sgg1.hr.supplier): TABLE "SGG1"."HR"."SUPPLIER".
2021-11-20T13:50:24.708+0530  INFO    OGG-06509  Oracle GoldenGate Capture for Oracle, extint.prm:  Using the following key columns for source table SGG1.HR.SUPPLIER: SUPPLIER_ID.
2021-11-20T13:50:26.217+0530  INFO    OGG-02263  Oracle GoldenGate Capture for Oracle, dpint.prm:  Passthru MAP (TABLE) resolved (entry sgg1.hr.supplier): TABLE "SGG1"."HR"."SUPPLIER".


  • After inserting table values reflected on target pluggable database TGG1 


SQL> sho pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         3 TGG1                           READ WRITE NO


SQL> select * from hr.supplier order by SUPPLIER_ID asc;

SUPPLIER_ID SUPPLIER_NAME                            CONTACT_NAME
----------- ---------------------------------------- --------------------------------------------------
          1 ABCD1                                    ABCD1
          2 ABCD2                                    ABCD2
          3 ABCD3                                    ABCD3
          4 ABCD4                                    ABCD4
          5 ABCD5                                    ABCD5


ggserr.log 

2021-11-20T12:32:46.523+0530  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): info all.
2021-11-20T13:50:29.073+0530  INFO    OGG-06505  Oracle GoldenGate Delivery for Oracle, repint.prm:  MAP resolved (entry sgg1.hr.supplier): MAP "SGG1"."HR"."SUPPLIER", TARGET tgg1.hr.supplier.
2021-11-20T13:50:35.176+0530  INFO    OGG-02756  Oracle GoldenGate Delivery for Oracle, repint.prm:  The definition for table SGG1.HR.SUPPLIER is obtained from the trail file.
2021-11-20T13:50:35.176+0530  INFO    OGG-06511  Oracle GoldenGate Delivery for Oracle, repint.prm:  Using following columns in default map by name: SUPPLIER_ID, SUPPLIER_NAME, CONTACT_NAME.
2021-11-20T13:50:35.177+0530  INFO    OGG-06510  Oracle GoldenGate Delivery for Oracle, repint.prm:  Using the following key columns for target table TGG1.HR.SUPPLIER: SUPPLIER_ID.