We're here to help!

How to Add a Fetcher to Already Existing Configuration

Follow
Description

This article can be used, when you want to move mine to the target system and create a fetcher on source, that will ship logs to the target mine process.

Steps Performed
  1. Shutdown:
    dbvrep> shutdown all
  2. Backup current DDC directories:
    • MINE:

      Backup & delete ddc\_backup,mine & log directory on source:

      zip -r mine\_backup.zip ddc\_backup/ log/ mine/
      rm -r ddc\_backup/ log/ mine/
    • APPLY:

      backup & delete ddc\_backup, apply & log directory on target:

      zip -r apply\_backup.zip ddc\_backup/ log/ apply/
      />rm -r ddc\_backup/ log/ apply/
  3. Create and run Fetcher configuration file:
    set APPLY.\_MINE\_LOOP\_PREVENTION = NO 
    set APPLY.\_APPLY\_LOOP\_PREVENTION = NO 
    set APPLY.\_APPLY\_TFO\_10205 = NO 
    set APPLY.\_APPLY\_TFO\_11202 = NO 
    set APPLY.\_APPLY\_TFO\_PKG = YES 
    set FETCHER.APPLY\_FILEOUT\_FILE\_FORMAT = OFF 
    set FETCHER.DDC\_BACKUP\_DIR = /home/oracle/replicate/ddc\_backup #CORRECT PATHS 
    set FETCHER.FETCHER\_DATABASE = SOURCE #SOURCE DB NAME, same as mine's 
    set FETCHER.FETCHER\_DATABASE\_DBID = 2651777923 #SOURCE DBID, same as mine's 
    set FETCHER.FETCHER\_ENABLED = YES 
    set FETCHER.FETCHER\_LISTEN\_INTERFACE = 0.0.0.0:7903 
    set FETCHER.FETCHER\_PASSWORD = 53616c7465645f5f14f87e482fc7df4d8ffe68872094b3d0176a5caa7afc32bf #Same as MINE's 
    set FETCHER.FETCHER\_REMOTE\_INTERFACE = dbvlin818.dbvisit.co.nz:7903 #SOURCE MACHINE 
    set FETCHER.FETCHER\_SCHEMA = dbvrep 
    set FETCHER.FETCHER\_USER = dbvrep 
    set FETCHER.LOG\_FILE = /home/oracle/replicate/log/dbvrep\_%N\_%D.%E #CORRECT PATHS 
    set FETCHER.LOG\_FILE\_TRACE = /home/oracle/replicate/log/trace/dbvrep\_%N\_%D\_%I\_%U.%E #CORRECT PATHS 
    set FETCHER.MINE\_PEER = MINE 
    set FETCHER.NCHARSET = AL16UTF16 #Check for proper charsets - same as MINE's 
    set FETCHER.NLS\_LANG = AMERICAN\_AMERICA.AL32UTF8 #Check for proper charsets - same as MINE's 
    set FETCHER.PREPARE\_CHECK\_APPLY = NO 
    set FETCHER.PREPARE\_CHECK\_MINE = YES 
    set FETCHER.PROCESS\_TYPE = FETCHER 
    set FETCHER.SETUP\_SCRIPT\_PATH = /home/oracle/replicate #CORRECT PATHS 
    set FETCHER.STATUS\_SORT = 00 
    set FETCHER.\_MINE\_DIRECTIO\_ONLINE = NO 
    set FETCHER.\_REDO\_SWITCH\_REREAD\_ARCH = NO 
    set MINE.MINE\_STAGING\_DIR = /home/oracle/replicate/mine\_stage #CORRECT PATHS 
    set MINE.\_APPLY\_LOOP\_PREVENTION = NO 
    set APPLY.STATUS\_SORT = 02 
    set MINE.FETCHER\_ENABLED = YES 
    set MINE.STATUS\_SORT = 01 
    set MINE.MINE\_REMOTE\_INTERFACE = dbvlin819.dbvisit.co.nz:7901 #TARGET\_MACHINE

    NOTES

    By default when MINE and APPLY is used. MINE is configured on 7901 and APPLY is configured on 7902. But when FETCHER is used, Replicate configures FETCHER on 7901, MINE on 7902 and APPLY on 7903. In this setup, we are adding FETCHER afterwards therefore we will set it to 7903 FETCHER.FETCHER\_DATABASE\_DBID is same as MINE.MINE\_DATABASE\_DBID. FETCHER.FETCHER\_PASSWORD is same as MINE.MINE\_PASSWORD Now, set following parameters. These parameters change their values when FETCHER is used. Set MINE remote interface to new host (target). Apply is already running on <target>:7902 so do not touch it.

    Run this file in dbvrep console:

    dbvrep> @fetcher\_configuration\_file
  4. Delete metadata about non obsolete archived logs.
    • Check the last obsolete redo in dbvrep console:
      list obsolete redo 
      Thread 1 last obsolete sequence#: 1350 at 25.05.2015 06:39:35 (10 minutes and 51 seconds ago)
    • Delete all registered archived logs from DBRSMINE\_REDO\_LOG\_HISTORY table (under dbvrep schema):
      • Backup original table:
        create table DBRSMINE\_REDO\_LOG\_HISTORY\_BKP as select \* from DBRSMINE\_REDO\_LOG\_HISTORY;
      • Delete the rows:
        delete from DBRSMINE\_REDO\_LOG\_HISTORY where SEQUENCE>1350; 
        commit;
  5. Create Fetcher DDC file:

    Use cp or mv command to copy/move the original MINE ddc file.

    On source:

    mv replicate-MINE.ddc replicate-FETCHER.ddc

    Delete or modify whole part after the section: 

    ########## Any manual settings should go below this line ##########
  6. Restore apply directory on target from apply\_backup.zip.

    When restarted, APPLY will look for plogs in this directory.

  7. Modify starting file on source:

    Modify the starting scripts to start the fetcher using DDC file created in step 5.

    oracle@dbvlin818.dbvisit.co.nz:/u01/app/oracle/replicate> cat replicate-run-dbvlin818.dbvisit.co.nz.sh DBVREP=/usr/bin/dbvrep $DBVREP --daemon --ddcfile /u01/app/oracle/replicate/replicate-FETCHER.ddc start FETCHER
  8. Start fetcher:
    ./replicate-run-dbvlin818.dbvisit.co.nz.sh
  9. Modify target starting file - add line with mine start
    oracle@dbvlin819.dbvisit.co.nz:/u01/app/oracle/replicate> cat replicate-run-dbvlin819.dbvisit.co.nz.sh DBVREP=/usr/bin/dbvrep $DBVREP --daemon --ddcfile /u01/app/oracle/replicate/replicate-MINE.ddc start MINE $DBVREP --daemon --ddcfile /u01/app/oracle/replicate/replicate-APPLY.ddc start APPLY
  10. Start the MINE and APPLY processes
    ./replicate-run-dbvlin819.dbvisit.co.nz.sh

Petr Horejs May 26, 2015 02:30

Have more questions? Submit a request

Comments