Usage of HandleCollisions and No HandleCollisions in Oracle GoldenGate 12c

Share via:

Usage of HandleCollisions and No HandleCollisions in Oracle GoldenGate 12c

In the article, we will see HandleCollisions and NoHandleCollisions in Oracle GoldenGate 12c

To install Oracle GoldenGate use below link

Installation of Oracle GoldenGate

Note :

HandleCollisions and NoHandleCollisions only valid for Replicat Process

 

We use handlecollisons in replicat process on the following situations

1.Duplicate data exists on Source table

2.No data found in target table to update or delete

3.If any errors in Configuration of Extract and Replicat process

 

You can use HANDLECOLLISIONS and NOHANDLECOLLISIONS in the following ways:

  • You can enable HANDLECOLLISIONS and NOHANDLECOLLISIONS in a global manner by specifying them at the root level of the parameter file. One parameter remains enabled for all subsequent MAP statements in the parameter file, until the opposing parameter is encountered.
  • You can enable HANDLECOLLISIONS or NOHANDLECOLLISIONS within a specific MAP parameter to enable or disable error handling only for that source-target mapping.

 

Case 1 :

If we have duplicates in Source table automatically the replicat process has been abended.

Then below errors will occur in Replicat Trail file

 

To avoid above error we can keep HANDLECOLLISIONS parameter in replicat file

Edit the replicat parameter file

In above replicat param file HANDLECOLLISIONS  assigned to EMP table.

NOHANDLECOLLISIONS  assigned globally to EMP and SALGRADE table.

Stop and start the replicat process

Check replicat process is running or not

Now replicat process is running fine

Check stats to know redirected records

we can see in above image that delete collisions have 1 records.

The duplicate record will be redirected from replicat process. and there will be no issue for replicat process.

 

Case 2 :

No data found in target table to update or delete.

we get below error Replicat trail file

To avoid the above error we HANDLECOLLISIONS parameter in REPLICAT trail file .

Edit the replicat parameter file

In above we enable global HANDLECOLLISIONS but disable for specific tables

Stop and start the replicat process

Check replicat process is running or not

Now replicat process is running fine

Check stats to know redirected records

we can see in above image that delete collisions have 1 records.

The duplicate record will be redirected from replicat process. and there will be no issue for replicat process.

 

I hope above information was very helpful.

Thank you for giving your valuable time to read the above information.If you want to be updated with all our articles send us the Invitation or Follow us :

Facebook Page: KTexperts

Ajay Kumar’s Linkedin : https://www.linkedin.com/in/ajay-kumar90/

Ajay kumar’s Facebook : https://www.facebook.com/www.ajaykumar.binnary

 

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

Add Comment