We're here to help!

Move APPLY or MINE DDC configuration to different directory

Problem Description

This article explains how to move the MINE and APPLY configuration directories to new location.

There are only minor differences between changing Unix and Windows Locations, except we have re-create new services for MINE and APPLY in windows with new path after deleting services from old path.


In this example we are going to change directory /u01/app/oracle/replicate to directory /u01/app/oracle/replicate_new.

Original paths:
Changing to:

When changing MINE side, you are working with following DDC parameters:

MINE.DDC_BACKUP_DIR = /u01/app/oracle/replicate/ddc_backup
MINE.LOG_FILE_TRACE = /u01/app/oracle/replicate/log/trace/dbvrep_%N_%D_%I_%U.%E
MINE.LOG_FILE = /u01/app/oracle/replicate/log/dbvrep_%N_%D.%E
MINE.MINE_PLOG = /u01/app/oracle/replicate/mine/%S.%E
MINE.SETUP_SCRIPT_PATH = /u01/app/oracle/replicate

When you need to change APPLY side configuration, you have to set following parameters:

APPLY.APPLY_STAGING_DIR = /u01/app/oracle/replicate/apply
APPLY.DDC_BACKUP_DIR = /u01/app/oracle/replicate/ddc_backup
APPLY.LOG_FILE_TRACE = /u01/app/oracle/replicate/log/trace/dbvrep_%N_%D_%I_%U.%E
APPLY.LOG_FILE = /u01/app/oracle/replicate/log/dbvrep_%N_%D.%E
APPLY.SETUP_SCRIPT_PATH = /u01/app/oracle/replicate
    1. Shutdown APPLY or MINE process.
    2. Login to console and change following parameter to new paths:
      set MINE.DDC_BACKUP_DIR = /u01/app/oracle/replicate_new/ddc_backup
      set MINE.LOG_FILE_TRACE = /u01/app/oracle/replicate_new/log/trace/dbvrep_%N_%D_%I_%U.%E
      set MINE.LOG_FILE = /u01/app/oracle/replicate_new/log/dbvrep_%N_%D.%E
      set MINE.MINE_PLOG = /u01/app/oracle/replicate_new/mine/%S.%E
      set MINE.SETUP_SCRIPT_PATH = /u01/app/oracle/replicate_new
    3. Copy everything except PLOG directories (defined by MINE.MINE_PLOG or APPLY.APPLY_STAGING_DIR parameters) from current to new directory.
      cp -rp /u01/app/oracle/replicate /u01/app/oracle/replicate_new
    4. Change paths accordingly in sh scripts in current directory:
      *run*sh (Run script which starts MINE and APPLY Process for UNIX)
    5. This step must be done only incase of WINDOWS , Need to re-create the windows services by editing *win_services-*.bat . Leave the delete service path which would delete the old service and edit the create service to new path.Run this file before starting MINE and APPLY. Below is the example
set EXEC="C:\Program Files\Dbvisit\Replicate\dbvrep.exe"
%EXEC% --ddcfile C:\Users\Administrator\Documents\ORCL\ORCL-APPLY.ddc delete service APPLY
%EXEC% --ddcfile E:\NEW\ORCL-APPLY.ddc create service APPLY
%EXEC% --ddcfile C:\Users\Administrator\Documents\ORCL\ORCL-MINE.ddc delete service MINE
%EXEC% --ddcfile E:\NEW\ORCL-MINE.ddc create service MINE

Where "C:\Users\Administrator\Documents\ORCL" is old path and "E:\NEW" is the new path
  1. Start the MINE/APPLY process.

NOTE: Already created PLOGs need to stay where they were originally created. The original paths are already stored in Replicate repository and MINE/APPLY will look for them when started. You can delete them later manually or let Replicate manage the deletion itself.

If APPLY and MINE are in sync, you can delete obsolete plogs using following notes:
Use command "list obsolete redo" to find out until which plog sequence you can delete the plogs on both, mine and apply:

list obsolete redo
Thread 1 last obsolete sequence#: 5093 at 05.12.2015 00:28:40 (7 minutes and 23 seconds ago)

You can safely delete plogs until sequence 5093 in this example.

Have more questions? Submit a request