GoldenGate SEQUENCE synchronization

Source: Internet
Author: User

Recently, GoldenGate was used to migrate Windows Oracle10g to Linux Oracle11g.

Record a problem:
After the data is synchronized to Oracle11g, the test finds that the primary key conflict occurs when some applications insert data. Some tables that use sequence for primary keys are found to be faulty. The maximum value of sequence is smaller than the maximum value of the primary key. Compared with the sequence of the source database and target database, we found that some sequence values were not synchronized to the target database.

Query the official documents of GoldenGate and find that you can use the flush sequence Method to synchronize sequence:
GGSCI> flush sequence scott. seq *

Oracle GoldenGate
Windows and UNIX Reference Guide
11g Release 1 Patch Set 1 (11.1.1.1)
E21512-02
This section of description is recorded on page 82nd:

Use flush sequence immediately after you start Extract for the first time during an initia
Synchronization or a re-synchronization. This command updates an Oracle sequence so
That initial redo records are available at the time that Extract starts to capture transaction
Data. Normally, redo is not generated until the current cache is exhausted. The flush give
Replicat an initial start point with which to synchronize to the correct sequence value on
The target system. From then on, Extract can use the redo that is associated with the usua
Cache reservation of sequence values.
The following database procedures are used by this command and normally are installed
By running the sequence. SQL script when Oracle GoldenGate is installed.

Before using flush sequence, issue the DBLOGIN command as the database user that has
EXECUTE privilege on the updateSequence procedure.
To use this command, the GGSCHEMA parameter must be used in the GLOBALS file to specify
The schema in which the sequence. SQL procedure is installed. This can be the same schema
That is used for the Oracle GoldenGate DDL support and any other database objects that
Are owned by 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.