Exclude Tables with Setup Wizard or Remove Tables from Replication

Problem Description

There are two methods to exclude tables from the replication:

  1. In the Setup Wizard at the time of configuration.

  2. Using the unprepare command on the fly.

Solution

Setup Wizard

Tables to be excluded can be specified in step 3 of the Setup wizard. In the following example all tables of the test1schema except temp1 and temp2 are to be replicated:

Please enter list of all individual tables to be replicated. Enter schema name(s) only to replicate all tables in that schema. Use comma or space to delimit the entries. Enter the tables and schemas: [] TEST1 Selected schemas: TEST1 Add more tables or schemas? (YES/NO) [NO] To replicate changes of PL/SQL objects in schema(s), please enter the schemas to be replicated. Note that specifying any entry will cause additional privileges to be granted to dbvrep. Enter through a comma or space-delimited list. Enter the list of schemas (PL/SQL): []

The following advanced options can also be specified:

  • Exclude some tables from schema-level replication.

  • Rename schemas or tables.

  • Specify filtering conditions.

  • For tables only: Configure Change Data Capture. This does not maintain a copy of the source table, but logs all operations as separate entries. This is useful for ETL or as an audit trail. This usually requires adding new columns (timestamps, old/new values etc.) to the target table.

    Specify rename name or filter condition for any of the specified schemas (YES/NO): no Specify tables to exclude from PREPARE SCHEMA, if any: [] test1.temp1,test1.temp2

Unprepare Command

The unprepare command is used to remove tables from live replication. It removes tables or schemas from the replication and declares that this object should no longer be replicated. For example:

  • To drop the test1.temp1 table from the replication:

    dbvrep>unprepare table test1.temp1
  • To drop the entire test1 schema from the replication:

Donna Zehl September 11, 2014 05:38