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>
No comments:
Post a Comment