Hello Everyone,
This article will teach you how to change remote trail file location in Oracle GoldenGate.
Current location : /u01/GG_AWS_P1/GG_trails/aws_trails/
New Location : /dbbackup/GG_trails/aws_trails
GG Process Details :
Source :
1 2 3 4 5 |
GGSCI (gg.oracle.com) 2> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING DPAWSP1 00:00:00 00:00:06 EXTRACT RUNNING EXAWSP1 00:00:03 00:00:05 |
Target :
1 2 3 |
GGSCI (gg2.oracle.com) 6> info all Program Status Group Lag at Chkpt Time Since Chkpt REPLICAT RUNNING REPAWSP1 00:00:08 00:00:04 |
Check Replicat trail file location
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
GGSCI (gg2.oracle.com) 2> info REPAWSP1 detail REPLICAT REPAWSP1 Last Started 2021-12-10 01:01 Status RUNNING INTEGRATED Checkpoint Lag 00:00:00 (updated 00:00:07 ago) Process ID 45824 Log Read Checkpoint File /u01/GG_AWS_P1/GG_trails/aws_trails/R1000004321 2022-01-22 06:44:24.997155 RBA 202887709 INTEGRATED Replicat No DBLOGIN Provided, constructed inbound server name is OGG$REPAWSP1 Current Log BSN value: (requires database login) Low Watermark CSN value: (requires database login) High Watermark CSN value: (requires database login) Extract Source Begin End /u01/GG_AWS_P1/GG_trails/aws_trails/R1000004321 2021-12-10 00:38 2022-01-22 06:44 /u01/GG_AWS_P1/GG_trails/aws_trails/R1000003658 2021-12-10 00:14 2021-12-10 00:38 /u01/GG_AWS_P1/GG_trails/aws_trails/R1000003658 2021-11-12 04:02 2021-12-10 00:14 /u01/GG_AWS_P1/GG_trails/aws_trails/R1000000000 * Initialized * First Record /u01/GG_AWS_P1/GG_trails/aws_trails/R1000000000 * Initialized * First Record Current directory /u01/app/oracle/product/ogg_src Report file /u01/app/oracle/product/ogg_src/dirrpt/REPAWSP1.rpt Parameter file /u01/app/oracle/product/ogg_src/dirprm/REPAWSP1.prm Checkpoint file /u01/app/oracle/product/ogg_src/dirchk/REPAWSP1.cpr Process file Error log /u01/app/oracle/product/ogg_src/ggserr.log |
Remote trail file location : /u01/GG_AWS_P1/GG_trails/aws_trails/
On Source :
Create new directory :
1 |
[oracle@gg2 ~]$ mkdir -p /dbbackup/GG_trails/aws_trails |
Check path for the pump process and param file
1 2 3 4 5 6 |
GGSCI (gg.oracle.com) 2> info DPAWSP1 EXTRACT DPAWSP1 Last Started 2021-07-29 00:20 Status RUNNING Checkpoint Lag 00:00:00 (updated 00:00:09 ago) Process ID 10445 Log Read Checkpoint File /dbbackup/GG_PROD_SRC/19c12/dirdat/EXAWSP1/E1000004320 2022-01-22 06:56:47.000000 RBA 197622396 |
1 2 3 4 5 6 7 |
GGSCI (gg.oracle.com) 4> view params DPAWSP1 extract DPAWSP1 PASSTHRU REPORTCOUNT EVERY 1000 RECORDS, RATE rmthost 10.156.222.111, mgrport 7809 rmttrail /u01/GG_AWS_P1/GG_trails/aws_trails/R1 TABLE AWS_APP.*; |
Stop Pump process
1 |
GGSCI (gg.orcl.com) 38> stop DPAWSP1 |
Now pump process will be down and will not read & write any trail file
After stopping take info pump process for RBA and SEQNO
1 2 3 4 5 6 |
GGSCI (gg.oracle.com) 10> info DPAWSP1 EXTRACT DPAWSP1 Last Started 2021-07-29 00:20 Status STOPPED Checkpoint Lag 00:00:00 (updated 00:00:29 ago) Log Read Checkpoint File /dbbackup/GG_PROD_SRC/19c12/dirdat/EXAWSP1/E1000004320 2022-01-22 06:58:47.000000 RBA 197624578 |
On Target :
Check Replicate info
1 2 3 4 5 6 7 |
GGSCI (gg2.oracle.com) 4> info REPAWSP1 REPLICAT REPAWSP1 Last Started 2021-12-10 01:01 Status RUNNING INTEGRATED Checkpoint Lag 00:00:00 (updated 00:00:00 ago) Process ID 45824 Log Read Checkpoint File /u01/GG_AWS_P1/GG_trails/aws_trails/R1000004321 2022-01-22 06:48:55.293547 RBA 202891042 |
Do LOGEND for replicat process until output as YES
With LOGEND command Replicat will read and apply all the process data from trail files received from pump process
1 2 3 4 |
GGSCI (gg2.oracle.com) 6> send REPAWSP1 logend Sending LOGEND request to REPLICAT REPAWSP1 ... YES |
Stop Replicat process
1 2 3 |
GGSCI (gg2.oracle.com) 8> stop REPAWSP1 Sending STOP request to REPLICAT REPAWSP1 ... Request processed. |
1 2 3 4 |
GGSCI (gg2.oracle.com) 10> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING REPLICAT STOPPED REPAWSP1 00:00:00 00:00:15 |
On Source :
Delete pump process
1 2 |
GGSCI (gg.oracle.com) 13> delete DPAWSP1 Deleted EXTRACT DPAWSP1. |
Add new location for Param file of Pump process
1 2 3 4 5 6 7 |
GGSCI (gg.orcl.com) 42> edit param DPAWSP1 extract DPAWSP1 PASSTHRU REPORTCOUNT EVERY 1000 RECORDS, RATE rmthost 10.156.222.111, mgrport 7809 rmttrail /dbbackup/GG_trails/aws_trails/R1 TABLE AWS_APP.*; |
Add pump process using latest EXTSEQ and RBA
1 2 |
GGSCI (gg.orcl.com) 44> add extract DPAWSP1,exttrailsource /dbbackup/GG_PROD_SRC/19c12/dirdat/EXAWSP1/E1 extseqno 4320 extrba 197624578 EXTRACT added. |
Add remote trail file location for pump process
1 2 |
GGSCI (gg.orcl.com) 45> add rmttrail /dbbackup/GG_trails/aws_trails/R1,extract DPAWSP1 megabytes 500 RMTTRAIL added. |
Now start the pump process and check target location for new trail file creations
1 |
GGSCI (gg.orcl.com) 47> start DPAWSP1 |
1 2 3 4 |
[oracle@gg2 ~]$ cd /dbbackup/GG_trails/aws_trails/ [oracle@gg2 aws_trails ]$ ls -ltr total 0 -rw-r-----. 1 oracle dba 0 Jan 12 20:58 R1000000000 |
On Target :
Login with DB credentials and delete pump
1 2 3 4 5 6 7 8 9 |
GGSCI (gg2.oracle.com) 10> view param REPAWSP1 REPLICAT REPAWSP1 REPORTCOUNT EVERY 1000 RECORDS, RATE SETENV(ORACLE_HOME='/u01/app/oracle/product/12.1.0.2/dbhome_1') SETENV(ORACLE_SID='AWSPROD1') SETENV(TNS_ADMIN='/u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin') userid ggadmin@oracle,password ggadmin MAP AWS_APP.E2AWSDA_Table ,TARGET AWS_APP.E2AWSDA_Table; |
1 2 |
GGSCI (gg2.orcl.com) 11> dblogin userid ggadmin@oracle,password ggadmin Successfully logged into database. |
Delete the Replicat process
1 2 3 4 |
GGSCI (gg2.oracle.com as ggadmin@awsrwp1) 17> delete REPAWSP1 2022-01-22 07:20:49 INFO OGG-02529 Successfully unregistered REPLICAT REPAWSP1 inbound server OGG$REPAWSP1 from database. Deleted REPLICAT REPAWSP1. |
Add Replicat process
1 2 |
GGSCI (gg2.oracle.com as ggadmin@awsrwp1) 19> add replicat REPAWSP1 integrated, exttrail /dbbackup/GG_trails/aws_trails/R1 REPLICAT (Integrated) added. |
Info Replicat process
1 2 3 4 5 6 |
GGSCI (gg2.oracle.com as ggadmin@awsrwp1) 21> info REPAWSP1 REPLICAT REPAWSP1 Initialized 2022-01-22 07:21 Status STOPPED INTEGRATED Checkpoint Lag 00:00:00 (updated 00:00:24 ago) Log Read Checkpoint File /dbbackup/GG_trails/aws_trails/R1000000000 First Record RBA 0 |
Start Replicat process
1 2 |
Start replicat GGSCI (gg2.orcl.com as ggadmin@orcl) 22> start REPAWSP1 |
1 2 3 |
GGSCI (gg2.oracle.com) 23> info all Program Status Group Lag at Chkpt Time Since Chkpt REPLICAT RUNNING REPAWSP1 00:00:08 00:00:04 |
On Source :
Do some transactions on Source table and crosscheck on target DB tables and GG STATS
Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates
KTEXPERTS is always active on below social media platforms.
Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts
Instagram : https://www.instagram.com/knowledgesharingplatform