Wednesday 30 September 2015

Integrated Replicat in Goldengate

Integrated Replicat or also known as Inetgrated Deliver has been introduced from 11.2.0.4 onwards that means it is also available in 12C, In integrated mode, the Replicat process leverages the apply processing functionality that is available within the Oracle database. In this mode, Replicat operates as follows:

# Reads the Oracle GoldenGate trail.

# Performs data filtering, mapping, and conversion.

# Constructs logical change records (LCR) that represent source database DML transactions (in committed order). DDL is applied directly by Replicat.

# Attaches to a background process in the target database known as a database inbound server by means of a lightweight streaming interface.

# Transmits the LCRs to the inbound server, which applies the data to the target database.


Below is an image which lists the example of an integrated apply with 2 Apply Servers






Errors in Goldengate Scenario 4

Scenario 4


ERROR   OGG-00396  Command 'MAP' not terminated by semi-colon.

ERROR   OGG-01668  PROCESS ABENDING.

## This error message clearly specifies MAP command not finished with semi- colon, so below is how we fixed it :-

## Now you will see that semicolon is clearly mentioned :-

GGSCI (node4.example.com as ogguser@euro) 61> edit params rep1

GGSCI (node4.example.com as ogguser@euro) 62> view params rep1

REPLICAT REP1
ASSUMETARGETDEFS
USERID ogguser, PASSWORD o
MAP scott.emp4, TARGET scott.emp4;


GGSCI (node4.example.com as ogguser@euro) 63> start replicat rep1

Sending START request to MANAGER ...
REPLICAT REP1 starting


GGSCI (node4.example.com as ogguser@euro) 64> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                        
REPLICAT    RUNNING     REP1        00:00:00      00:05:43


__________________

Errors in Goldengate Scenario 3

Scenario 3

Error Message :- ERROR   OGG-01044  The trail '/u01/app/oracle/product/ogg_trg/dirdat/rg' is not assigned to extract 'EXT1'. Assign the trail to the extract with the command "ADD EXTTRAIL/RMTTRAIL /u01/app/oracle/product/ogg_trg/dirdat/rg, EXTRACT EXT1".

2015-09-26 17:34:57  ERROR   OGG-01668  PROCESS ABENDING.


GGSCI (node4.example.com as ogguser@amer) 49> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                        
EXTRACT     ABENDED     EXT1        00:00:00      00:07:30

## After checking we found that remote trail file name was not correct so we fixed it solve it as per below details :-

## Let check what exact remote should the extract send to, so its the rt file not rg which was observed in the error log

GGSCI (node4.example.com as ogguser@amer) 51> info extract ext1, detail

EXTRACT    EXT1      Last Started 2015-09-26 17:34   Status ABENDED
Checkpoint Lag       00:00:00 (updated 00:09:14 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2015-09-26 17:30:07  Seqno 20, RBA 25548800
                     SCN 0.2082218 (2082218)

  Target Extract Trails:

  Trail Name                                       Seqno        RBA     Max MB Trail Type

  /u01/app/oracle/product/ogg_trg/dirdat/rt            0       1964        100 RMTTRAIL


## We can also check from below command :-


GGSCI (node4.example.com as ogguser@amer) 52> info rmttrail *

       Extract Trail: /u01/app/oracle/product/ogg_trg/dirdat/rt
             Extract: EXT1
               Seqno: 0
                 RBA: 1964
           File Size: 100M

## Below are details of how we have fixed it :-

GGSCI (node4.example.com as ogguser@amer) 54> edit params ext1



GGSCI (node4.example.com as ogguser@amer) 55> view params ext1

EXTRACT ext1
userid ogguser, password o
RMTHOST node4.example.com , mgrport 7909
rmttrail /u01/app/oracle/product/ogg_trg/dirdat/rt
TABLE SCOTT.EMP4;



GGSCI (node4.example.com as ogguser@amer) 56> start extract ext1

Sending START request to MANAGER ...
EXTRACT EXT1 starting


GGSCI (node4.example.com as ogguser@amer) 57> info all    

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                        
EXTRACT     RUNNING     EXT1        00:10:54      00:00:05

Errors in Goldengate Scenario 2

# Scenario 2

WARNING OGG-01223  TCP/IP error 111 (Connection refused), endpoint: node4.example.com:7907.

INFO    OGG-01971  The previous message, 'WARNING OGG-01223', repeated 2 times.


Whenever there is problem with extract always check whether it is able to capture the records or not, this will be done by stats extract command from GGSCI prompt

GGSCI (node4.example.com as ogguser@amer) 42> stats extract ext1

Sending STATS request to EXTRACT EXT1 ...

No active extraction maps.

## this means that extract is not able to capture the records as of now

We check the extract report file in location

/u01/app/oracle/product/ogg_src/dirrpt

and the report file name is EXT1.rpt

Below is the error details :-

2015-09-26 17:31:20  WARNING OGG-01223  TCP/IP error 111 (Connection refused), endpoint: node4.example.com:7907.

2015-09-26 17:31:50  INFO    OGG-01971  The previous message, 'WARNING OGG-01223', repeated 2 times.

## After reading the above error message, we came to know that the MGR port number was not correct in extract parameter file, so after correcting it we are able to solve it, lets check how

GGSCI (node4.example.com as ogguser@amer) 37> view params ext1


EXTRACT ext1
userid ogguser, password o
RMTHOST node4.example.com , mgrport 7907
rmttrail /u01/app/oracle/product/ogg_trg/dirdat/rt
TABLE SCOTT.EMP4;

## After correcting the port number to 7909


GGSCI (node4.example.com as ogguser@amer) 47> start extract ext1

Sending START request to MANAGER ...
EXTRACT EXT1 starting



GGSCI (node4.example.com as ogguser@amer) 44> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                        
EXTRACT     RUNNING     EXT1        00:00:00      00:02:10

Errors in Goldengate Scenario 1

 Scenario 1

ERROR   OGG-00446  Missing filename opening checkpoint file.

ERROR   OGG-01668  PROCESS ABENDING.

___

Checking the replicat status

GGSCI (node4.example.com as ogguser@euro) 45> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                        
REPLICAT    STOPPED     REP1        00:00:00      00:00:06


Below is the error :-

2015-09-26 17:26:03  ERROR   OGG-00446  Missing filename opening checkpoint file.

2015-09-26 17:26:03  ERROR   OGG-01668  PROCESS ABENDING.


## this means that in replicat file keyword REPLICAT rep_group name is not written, lets fix this :-

edit params rep1

GGSCI (node4.example.com as ogguser@euro) 49> view params rep1

REPLICAT REP1
ASSUMETARGETDEFS
USERID ogguser, PASSWORD o
MAP scott.emp4, TARGET scott.emp4;


# Now we have updated REPLICAT REP1


GGSCI (node4.example.com as ogguser@euro) 52> start replicat rep1

Sending START request to MANAGER ...
REPLICAT REP1 starting


GGSCI (node4.example.com as ogguser@euro) 53> info replicat rep1

REPLICAT   REP1      Last Started 2015-09-26 17:28   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:08 ago)
Process ID           9086
Log Read Checkpoint  File /u01/app/oracle/product/ogg_trg/dirdat/rt000000
                     2015-09-26 16:49:45.000288  RBA 1964