Detailed use of handlecollisions parameters in Oracle goldengate

Source: Internet
Author: User

Handlecollisions parameter usage in Oracle goldengate  handlecollisions is a replicat process parameter, mainly used in initial load. When this parameter is used in the Replicat process, the REPLICAT process continues to process data in the trail, even if there are data integrity issues in the target database environment (such as update, delete operations encountering missing rows or duplicate inserts).   If the handlecollisions parameter is used, the REPLICAT process will process the data as follows: Missing updates is ignored. Missing deletes is ignored. Duplicate inserts is turned into updates.  if you want to use the Handlecollisions parameter, simply include the parameter in the Replicat process parameter file and then restart the REPLICAT process to take effect.   can use the Handlecollisions parameter for a particular table, or it can be used globally.   with the Send command, we can also dynamically enable the Handlecollisions parameter without stopping the REPLICAT process, which commands the following: ggsci> send replicat  Handlecollisions [<owner.table_name>]  perform the following send command to see if the Handlecollisions parameter is enabled: Send replicat  handlecollisions [<owner.table_name>] example 1 The following enables handlecollisions for all MAP statements In the parameter file. Handlecollisionsmap hr.emp, TARGET hr.emp; MAP hr.job_hist, TARGET hr.job_hist; MAP HR.DEP, TARGET HR.DEP; MAP Hr.country, TARGET hr.country;&nBsp Example 2 The following enables handlecollisions for some maps statements while disabling it forothers. Handlecollisionsmap hr.emp, TARGET hr.emp; MAP hr.job_hist, TARGET hr.job_hist; Nohandlecollisionsmap HR.DEP, TARGET HR.DEP; MAP hr.country, TARGET hr.country; example 3 The following shows a combination of global and map-level use. The MAP specificationoverrides the global specification for the specified tables. Handlecollisionsmap hr.emp, TARGET hr.emp; MAP hr.job_hist, TARGET hr.job_hist; MAP HR.DEP, TARGET hr.dep, nohandlecollisions; MAP Hr.country, TARGET hr.country, nohandlecollisions; oracle  is not recommended to always enable the handlecollisions parameter, This is likely to result in inconsistent data for the target database. Even when data is missing or duplicated, the REPLICAT process continues to process the data in trail. Handlecollisions is mainly used when the initial load is performed, the source database side of the application is still running and goldengate is still capturing the application's data changes when the Replicat is started. The Handlecollisions parameter is also used when we need to rollback the trail file when we are dealing with some tricky issues for a specific purpose.   in GoldenGate 8.0.2.1 and above, when the replicat process stops, we can see the number of conflicts in the duplicate insert operation again REPLICAT statistics or report file.  handlecollisionS and Keycols use   if DML operations are performed on a table that does not have a primary key or a unique index, even if the table specifies that Keycols,goldengate does not handle this type of DML in a way that differs from the table that has a primary key or unique index, because keycols The primary key cannot be replaced directly, and when a record with the same Keycols value is inserted, GoldenGate does not conflict with the records, and the handlecollisions rule does not take effect on those records.  handlecollisions and Pkupdates use   if the missing update is a primary key update, REPLICAT will attempt to insert the record instead of ignoring the action. But when Replicat tries to insert, the record to be inserted is not a complete image in the trail file, and to get the full image of that primary key update, you need to add the following parameters to the extract process and restart the extract process for it to take effect: fetchoptions Fetchpkupdatecols

Handlecollisions parameter usage in Oracle goldengate

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.