Excluding columns from replication

If tables need to be replicated that contain columns that do not need to be replicated or with current unsupported data types, then these columns can be excluded from replication. See here for current Supported Datatypes.

There are 2 methods to exclude the columns:

  1. Editing the resulting .dbvrep file after the setup wizard has completed and before the *all.sh or *all.bat script is run. 
  2. Issuing the exclude column command in the console. 

Each option is further explained below. For more information about the EXCLUDE COLUMN please see Full Command-Line Reference

Editing the resulting .dbvrep file

The setup wizard does not provide the option to exclude the column, but the resulting .dbvrep file can be edited to add the EXCLUDE COLUMN commands before the replication is initiated with the *all.sh or *all.bat script.

The steps are:

Edit the *.dbvrep file and after the last PREPARE OFFLINE command add:

EXCLUDE COLUMN SCHEMA.TABLE.COLUMN_NAME

 

Multiple exclude columns can be added for the same table.

Example:

#prepare the tables (we use OFFLINE as neither MINE not APPLY is running; with OFFLINE we won't wait on network timeout)
PREPARE OFFLINE SCHEMA OE NODDL
EXCLUDE COLUMN OE.PRODUCT_DESCRIPTIONS.TRANSLATED_NAME
EXCLUDE COLUMN OE.PRODUCT_DESCRIPTIONS.XML_DATA

 

In this example the columns TRANSLATED_NAME and XML_DATA from the table PRODUCT_DESCRIPTIONS from schema OE are excluded in the replication.

Save the .dbvrep file and then run the *all.sh or *all.bat script as per normal.

When the setup wizard is run again for the same replication (or DDC) name, the .dbvrep script will be overwritten. 

Issuing the exclude column command 

The EXCLUDE COLUMN command can also be run in the Dbvisit Replicate command console. Entering this command in the console requires a restart of the MINE process.

dbvrep> exclude column schema.tablename.columnname
dbvrep> shutdown mine
Restart the MINE process
$ ./ORCL-run-dbvisit.com.sh
Â