GoldenGatedml target table of the synchronization process and field processing test

Source: Internet
Author: User
For goldengate processes that only have dml synchronization, if the source end performs the ddl plus field operation, how to deal with the corresponding process

For goldengate processes that only have dml synchronization, if the source end performs the ddl plus field operation, how to deal with the corresponding process

-- Experiment: For goldengate processes that only have dml synchronization, if the source end performs the ddl plus field operation, how to deal with the corresponding process

-- Source orcl
-- First check the Process status, running status:
[Oracle @ localhost ogg] $./ggsci
GGSCI (localhost. localdomain) 1> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
Extract running DPUMP1 00:00:00 00:00:08
Extract running EXT1 00:00:00 00:00:06

-- Stop the extraction process and transmission process:
GGSCI (localhost. localdomain) 2> stop *

Sending STOP request to EXTRACT DPUMP1...
Request processed.

Sending STOP request to EXTRACT EXT1...
Request processed.

GGSCI (localhost. localdomain) 3> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
Extract stopped DPUMP1 00:00:00 00:00:11
Extract stopped EXT1 00:00:00 00:00:09

-- Target orcltest
-- Check that the replication process is running and stops the process:
GGSCI (localhost. localdomain) 8> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
Replicat running REP1 00:00:00

GGSCI (localhost. localdomain) 9> stop *

Sending STOP request to REPLICAT REP1...
Request processed.

-- Source orcl
-- Add a field to the synchronized table
[Oracle @ localhost ogg] $ sqlplus/as sysdba
SQL> alter table ggs. test add new_col varchar2 (10 );

Table altered.

SQL> exit

-- Target orcltest
-- Add fields as well:
[Oracle @ localhost ogg] $ sqlplus/as sysdba
SQL> alter table ggs. test add new_col varchar2 (10 );

Table altered.

SQL> exit


-- Source orcl
-- Start extraction and transmission process
[Oracle @ localhost ogg] $./ggsci
GGSCI (localhost. localdomain) 2> start *

Sending START request to MANAGER...
EXTRACT DPUMP1 starting

Sending START request to MANAGER...
EXTRACT EXT1 starting

GGSCI (localhost. localdomain) 4> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
Extract running DPUMP1 00:40:12 00:00:04
Extract running EXT1 00:02:55 00:00:08


-- Target orcltest
-- Start the replication process
[Oracle @ localhost ogg] $./ggsci
GGSCI (localhost. localdomain) 2> start *

Sending START request to MANAGER...
REPLICAT REP1 starting

GGSCI (localhost. localdomain) 5> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
Replicat running REP1 00:00:00


-- Source orcl
-- Test data modification
[Oracle @ localhost ~] $ Sqlplus/as sysdba
SQL> select count (*) from ggs. test;

COUNT (*)
----------
33

SQL> delete from ggs. test where rownum <5;

4 rows deleted.

SQL> commit;

Commit complete.

SQL> insert into ggs. test (username, user_id, account_status, default_tablespace, temporary_tablespace, created, profile, new_col)
Values ('A', '7', 'open', 'one', 'temp ', sysdate, 'default', 'test'); 2

1 row created.

SQL> commit;

Commit complete.

SQL>


-- Target orcltest
-- Test Result: The result is correct, indicating that the synchronization process is normal.
SQL> select count (1) from ggs. test;

COUNT (1)
----------
29

SQL> select count (*) from ggs. test;

COUNT (*)
----------
30

SQL> exit

Experiment conclusion: For a normal dml replication process, if the target table needs to be added with a field, stop the process and perform ddl operations on the source end at the same time,
Then restart the process. The replication process is normal.

This article permanently updates the link address:

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.