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.

Solution

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

Original paths:
/u01/app/oracle/replicate
Changing to:
/u01/app/oracle/replicate_new

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.

  4. Change paths accordingly in sh scripts in current directory:

  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

  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:

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