In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "the concrete scheme of Goldengate heterogeneous data synchronization". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "the specific scheme of Goldengate heterogeneous data synchronization".
Preparation for ORACLE source library configuration:
1) enable additional logs
Select supplemental_log_data_min from vault database; SUPPLEME-NO alter database add supplemental log data; select supplemental_log_data_min from vault database; SUPPLEME-YES
2) enable archiving (already in archiving mode, omit)
SQL > shutdown immediate SQL > startup mount SQL > alter database archivelog; SQL > archivelog list; Database log mode Archive Mode Automatic archival Enabled Archive destination / u01/arch SQL > alter database open
3) create an OGG synchronization user:
Create user goldengate identified by goldengate default tablespace users; grant dba to goldengate
Source database operation (oracle side):
1 the source end deletes the extraction, and transmits the process:
Dblogin userid goldengate, password goldengate
-- add additional logs for the table to be synchronized:
Add trandata MW_APP. DYT_DATALOSTRECORD
Create a GGLOG log directory related to the extraction process:
Mkdir-p / ogg/gglog/e_MW_APP/
Add a new extraction process:
Add extract e_MW_APP, tranlog, begin nowadd exttrail / ogg/gglog/e_MW_APP/ex, extract e_MW_APP,megabytes 200
2. Delete and add the transmission process:
Add extract p_MW_APP, exttrailsource / ogg/gglog/e_MW_APP/exadd rmttrail / ogg/gglog/MW_APP/re, extract p_MW_APP, megabytes 200
3 before starting the extraction process on the source side, do the following:
Alter extract pumped MWW App start e_MW_APP begin now-- Let the transfer process start to transfer data from now on
Create a definition of the table to be synchronized (important)
1. # create a parameter file
GGSCI (pos300-db01) 10 > edit param defgen defsfile. / dirdef/MW_APP.def userid goldengate, password goldengate table MW_APP.*; # generates the table definition file. / defgen paramfile. / dirprm/defgen.prm # to the target library directory scp / ogg/software/dirdef/MW_APP.def root@192.168.1.241:/ogg/software/dirprm
Target library (MYSQL side)
4 Delete the replication process and checkpoint table:
The target library is Mysql, which is slightly different from the synchronization between oracle and oracle
1) create user and pending synchronization libraries
Mysql > GRANT ALL PRIVILEGES ON `MW_ app. * TO root@'%' IDENTIFIED BY 'root';mysql > create database MW_APP
2) create a directory
GGSCI (zoop300) 1 > create subdirs Creating subdirectories under current directory / home/mysql Parameter files / goldengate/dirprm: created Report files / goldengate/dirrpt: created Checkpoint files / goldengate/dirchk: created Process status files / goldengate/dirpcs: created SQL script files / goldengate/dirsql: created Database definitions files / goldengate/dirdef: created Extract data files / goldengate/dirdat: created Temporary files / goldengate/dirtmp: created Stdout files / goldengate/dirout: created mkdir-p / ogg/gglog/MW_APP/
3) configuration management process
GGSCI (zoop300) 3 > edit params mgr join: port 7809 GGSCI (zoop300) 4 > start mgr Manager started. GGSCI (zoop300) 3 > info mgr Manager is running
4) configure checkpoints and globals
GGSCI (zoop300) 4 > dblogin sourcedb MW_APP userid root password rootGGSCI (zoop300) 5 > add checkpointtable MW_APP.checkpoint_table GGSCI (zoop300) 6 > edit params. / GLOBALS checkpointtable MW_APP.checkpoint_table
5) configure the replicat process
GGSCI (zoop300) 8 > add replicat r_MW_APP, exttrail / ogg/gglog/MW_APP/re,checkpointtable MW_APP.checkpoint_table
Edit the replicat process
Edit params r_MW_APP
-- add the following parameters
Replicat r_MW_APPtargetdb MW_APP userid root password roothandlecollisions sourcedefs / ogg/software/dirprm/MW_APP.defdiscardfile / ogg/software/dirrpt/dcr1.dsc,purge map MW_APP.DYT_DATALOSTRECORD,target MW_APP.DYT_DATALOSTRECORD
Start the process:
GGSCI (zoop300) 9 > start dcr1
4. Test data synchronization
Appendix:
-- configuration of each process-- Eextract e_MW_APPSETENV (ORACLE_HOME = "/ u01/oracle") SETENV (ORACLE_SID = "idoracle") SETENV (NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK") userid goldengate,password goldengateexttrail / ogg/gglog/e_MW_APP/exdiscardfile / ogg/software/dirrpt/e_MW_APP.dsc,append TRANLOGOPTIONS DBLOGREADERdynamicresolutiontable MW_APP.DYT_DATALOSTRECORD;-Pextract p_MW_APPrmthost 192.168.1.241 mgrport 7809passthrurmttrail / ogg/gglog/MW_APP/retable MW_APP.DYT_DATALOSTRECORD -Rreplicat r_MW_APPtargetdb MW_APP userid root password roothandlecollisions sourcedefs / ogg/software/dirprm/MW_APP.defdiscardfile / ogg/software/dirrpt/dcr1.dsc,purge map MW_APP.DYT_DATALOSTRECORD,target MW_APP.DYT_DATALOSTRECORD
At this point, I believe you have a deeper understanding of the "specific scheme of Goldengate heterogeneous data synchronization". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.