GoldenGate Series 1: quick setup of one-way synchronization GoldenGate Environment

Source: Internet
Author: User

GoldenGate Series 1: quick setup of one-way synchronization GoldenGate environment 1. Environment preparation (1) download the installation package and decompress it to ORACLE_BASE (2) modify the environment change [plain] [oracle @ irms156ogg] $ vi ~ /. Bashrc exportPATH = $ ORACLE_HOME/bin:/u01/app/ogg: $ PATH (3) create a subdirectory [plain] [oracle @ irms157 ogg] $ ggsci GGSCI (irms157) 1> create subdirs Creating subdirectories under currentdirectory/u01/app/ogg Parameter files/u01/app/ogg/dirprm: alreadyexists Report files/u01/app/ogg/dirrpt: created Checkpoint files/u01/app/ogg/dirchk: created Process status files/u01/app/ogg/dirpcs: created SQL script files /U01/app/ogg/dirsql: created Database definitions files/u01/app/ogg/dirdef: created Extract data files/u01/app/ogg/dirdat: created Temporary files/u01/app/ogg/dirtmp: created Stdout files/u01/app/ogg/dirout: created Note: We recommend that all Goldengate operations be performed under the Goldengate installation directory. 2. Start a management process (1) create a management process parameter file [plain] GGSCI (irms156) 1> edit params mgr port 7809 (2) Start the manager [plain] GGSCI (irms156) 2> start mgr Managerstarted. GGSCI (irms156) 3> info mgr Manager isrunning (IP port irms156.7809 ). GGSCI (irms156) 4> info all Program Status Group Lag at Chkpt Time Since Chkpt manager running 3. Enabling supplemental logs on the source end (1) Oracle-specificinstallation steps Thefollowing steps are only required when GoldenGate Will be capturing data fromthe server. therefore it is only needed when you are installing GoldenGate forOracle as your <source> environment. [SQL] [oracle @ irms157 ogg] $ sqlplus/nolog SQL> conn/as sysdba Connected. SQL> alter database add supplementallog data; Database altered. SQL> alter system switch logfile; System altered. (2) Add supplemental logging for a specific mode object [SQL] GGSCI (irms156) 9> Dblogin useridsystem, password Lu123456; Successfully logged into database. GGSCI (irms156) 10> add trandatascott. emp; ERROR: No viable tables matchedspecification. (do not include a semicolon) GGSCI (irms156) 11> add trandatascott. emp Logging of supplemental redo dataenabled for table SCOTT. EMP. GGSCI (irms156) 13> add trandata scott. salgrade 2013-05-14 14:29:47 WARNING OGG-00869 No unique key is defined for table's ALGRADE '. all viable columns will be used to represent the key, but may notguarantee uniqueness. KEYCOLS may beused to define the key. logging of supplemental redo dataenabled for table SCOTT. SALGRADE. GGSCI (irms156) 14> add trandatascott. bonus 14:30:12 WARNING OGG-00869 No unique key is defined for table 'BONUS '. all viable columns will be used to represent the key, but may not guarant Eeuniqueness. KEYCOLS may be used todefine the key. logging of supplemental redo dataenabled for table SCOTT. BONUS. GGSCI (irms156) 15> add trandatascott. dept Logging of supplemental redo dataenabled for table SCOTT. DEPT. GGSCI (irms156) 16> info trandata scott. emp Logging ofsupplemental redo log data is enabled for table SCOTT. EMP. columnssupplementally logged for table SCOTT. EMP: EMPNO. 3. Data preparation (1) Create a table on the target and the source (2) import the initial data from the source to the target. Because the scott mode is used in this experiment, it is installed on each oracle database by default, therefore, no preparation is required. In step 2, you can use datapump, goldengatedirect load, SQL * loader, and other methods. 4. Configure source extraction (1) add extraction group [SQL] GGSCI (irms156) 1> add extracteoragd, tranlog, begin now, threads 1 EXTRACT added. GGSCI (irms156) 2> info extracteoragd extract eoragd Initialized 2013-05-1414: 58 Status STOPPED Checkpoint Lag 00:00:00 (updated 00:00:13 ago) Log Read Checkpoint Oracle Redo Logs 14:58:05 Thread 1, seqno 0, RBA 0 SCN 0.0 (0) Log Read Checkpoint Oracle Redo Logs 14:58:05 Thread 2, Seqno 0, RBA 0 SCN 0.0 (0) (2) Create the extraction process parameter file [SQL] GGSCI (irms156) 3> edit params eoragd EXTRACT EORAGD USERID system, PASSWORD Lu123456 RMTHOST 10.252.48.155, MGRPORT 7809 RMTTRAIL. /dirdat/gd TABLE scott. emp; TABLE scott. dept; TABLE scott. salgrade; TABLE scott. bonus; (3) Define the GoldenGate trail add thetrail that will store the changes on the target. GGSCI (irms156) 8> add RMTTRAIL. /dird At/gd, extract eoragd rmttrail added. GGSCI (irms156) 9> info rmttrail * Extract Trail :. /dir/gd Extract: EORAGD Seqno: 0 RBA: 0 File Size: 5 M (4) Start the extraction process and verify GGSCI (irms156) 10> start extracteoragd Sending START request to MANAGER... extract eoragd starting GGSCI (irms156) 11> info extracteoragd, detail GGSCI (irms156) 12> view report eoragd 5. Configure the target checkpoint table (1) configure the global parameter file and add the checkpoint table [SQL] GGSCI (Irms155) 1> edit params./globals checkpointtablescott. ggschkpt (2) activate the GLOBALS parameter file and exit and enter ggsci to take effect. [SQL] GGSCI (irms155) 2> exit (3) Add the checkpoint table [SQL] GGSCI (irms155) 1> dblogin useridsystem, password Lu123456 Successfully logged into database. GGSCI (irms155) 3> addcheckpointtable scott. ggschkpt Successfully created checkpoint tablescott. ggschkpt. 6. Configure the target end change shipping (1) add the replicat group [SQL] GGSCI (irms155) 5> add replicatroranf, exttrail. /dirdat/gd, checkpointtable scott. ggschkpt REPLICAT added. consistent with the source configuration. (2) Create the replicat parameter file [SQL] GGSCI (irms155) 7> edit params roranf REPLICAT RORANF USERID system, PASSWORD Lu123456 HANDLECOLLISIONS ASSUMETARGETDEFS DISCARDFILE. /dirrpt/RORANF. DSC, purge map scott. emp, TARGET scott. emp; MAP scott. salgrade, TARGET scott. salgrade; MAP scott. bonus, TARGET scott. bonus; MAP scott. dept, TARGET scott. dept; (3) start the replicat process [SQL] GGSCI (irms155) 8> START replicatroranf Sending start request to MANAGER... replicat roranf starting GGSCI (irms155) 9> info replicatroranf replicat roranf Last Started 00:00:00 Status RUNNING Checkpoint Lag 00:00:09 (updated ago) Log Read Checkpoint File. /dirdat/nf000000 First Record RBA 0 GGSCI (irms155) 10> info all Program Status Group Lag at Chkpt Time Since Chkpt manager running replicat running roranf 00:00:00

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.