Goldengate-added datadump Data Synchronization

Source: Internet
Author: User

1. InGolddengateIn this article, if the network is disconnected, the trail file cannot be generated on the target machine, so an error occurs.

17:44:16 error OGG-01033 there is a problem in network communication, a remote file problem, encryption keys F
Or target and source do not match (if using encrypt) or an unknown error. (remote file used is./dirdat/ma000001, reply recei
Ved is unable to lock file "./dirdat/ma000001" (error 11, resource temporarily unavailable). Lock currently held by Process
ID (PID) 9556 .).

 

2. In order to solve the above problem, a datadump process is added to store the trail file locally. After the network is unblocked, It is uploaded to the response folder of the target machine.

 

3. Add a Data Extraction Process

Add extract load1, translog, begin now

 

4. Configure the local data extraction file location and Extraction Process

Add exttrail./dirdat/ex, extract load1, megabytes 10

 

5. Edit load1

Extract load1
-- Setenv (nls_lang = american_america.zhs16gbk)
Userid system, password Oracle
Exttrail./dirdat/ex
Numfiles 300
Dynamicresolution
-- Rmthost 192.168.0.100, mgrport 7809
-- Rmttrail./dirdat/ra
-- Exttrail./dirdata/Ma
-- DDL include mapped
Table gguser. tcustmer;
Table gguser. tcustord;

 

6. Add a Transfer Process

Add extract pump1, exttrailsource./dirdat/ex, begin now

 

7. Add the transfer to directory and the process used for transfer

Add rmttrail./dirdat/Re, extract pump1

 

8. Edit pump1

Extract pump1
Dynamicresolution
Userid system, password Oracle
Rmthost 192.168.0.100, mgrport 7809, compress
Rmttrail./dirdat/Re
Numfiles 3000
Passthru
Table gguser. tcustmer;
Table gguser. tcustord;

 

9. Start and view Processes

Start load1

Start pump1

Info all

 

10. When pump1 is started, an error is returned.

14:26:27 error OGG-01044 Oracle goldengate capture for Oracle, pump1.prm: The trail '. /dirdat/re' is not assigned to extract 'pump1 '. assign the trail to the extract with the command "add exttrail/rmttrail. /dirdat/Re, extract pump1.

 

Solution: Alter rmttrail./dirdat/Re, extract pump1 ---- solve the problem, but the cause is unknown,

Then change it back to alter rmttrail./dirdat/Re, and extract pump1 will not be faulty. Why?

 

11. Configure the target machine

Add replicat rep1, exttrail./dirdat/Re

 

12. Edit rep1

Replicat rep1
Userid system, password Oracle
Assumetargetdefs
Discardfile./dirrpt/rep1.dsc, purge
Handlecollisions
-- DDL
Map gguser. tcustmer, target gguser. tcustmer;
Map gguser. tcustord, target gguser. tcustord;

 

13. Start and view

Start rep1

Info all

 

14. Verification

On the source machine, enter:

Insert into tcustord values (5, sysdate, 3, 3, 3 );

Commit;

View the process or view the files in the corresponding directory from the background

Stats load1

Stats pump1

Or check whether ex000000 files exist in./dirdat.

 

The same is true on the target machine.

Stats rep1

Or check whether there is a re000000 file in./dirdat.

 

15. If a file is found to be smaller than 0, but the database does not generate data,

Please tell the rep1 thread again where to extract data and restore it

That is:

Add replicat rep1, exttrail./dirdat/Re

16. Solve the network disconnection problem by automatically restarting Extract

Modify Mgr

Autostart extract *
Autorestart extract *, waitminutes 1, retries 3

 

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.