Capture Objects Specification

Repstance allows flexibility to determine a set of tables, which are to be captured. The tables for DML and DDL operations are specified by the different parameters.

The following parameters are used for DML replication:

  • dmlinclude – list of the tables to be included into the DML replication
  • dmlexclude – list of the tables to be excluded from the DML replication

The following parameters are used for DDL replication:

  • ddlinclude – list of the tables to be included into the DDL replication
  • ddlexclude – list of the tables to be excluded from the DDL replication

Note – A table is replicated only when its name matches an “include” mask and does not match an “exclude” mask: an “exclude” mask wins over an “include” mask.

The table is specified in the schema_name.table_name format. In order to specify the list of the tables, each table must be separated by comma. The % symbol may be used in order to match any number of characters. It may also be used in both the schema_name and the table_name parts.

The following examples show various ways of defining tables:

  • Customers and employees tables, which are in the dbo schema:
dbo.customers,dbo.employees
  • Any tables in the dbo schema:
dbo.%
  • Any tables having name started from rep or tmp:
%.rep%,%.tmp%
  • Any table in report schema ends with #:
report.%#

The following examples show how to use the DML/DDL parameters:

  • To capture DML changes for all tables in dbo schema except where tables start with rep:
dmlinclude=dbo.%
dmlexclude=dbo.rep%
  • To capture DML changes for all tables in the cap1, cap2 and cap3 schemas except the report1 table from the cap1 schema:
dmlinclude=cap1.%,cap2.%,cap3.%
dmlexclude=cap1.report1
  • To capture DML and DDL operations for any tables in the dbo schema:
dmlinclude=dbo.%
ddlinclude=dbo.%
  • To capture only DDL operations for objects in the report schema:
ddlinclude=report.%

These parameters influence the newly created tables as well. The description below shows the capture behaviour of the tables created:

Tables that match DML criteriaTables that match DDL criteriaCapture Behaviour
truetrueThis create statement is captured. Any further DML statements will be captured as well
truefalseThis create statement is not captured. No DML statements will be captured
falsetrueThis create statement is captured. DML statements are not captured. However, any further DDL statements are captured
falsefalseThis create statement is not captured. Neither DML or DDL statements will be captured

To see which tables a set of masks selects, without saving anything, add preview=1 to the prepare or alter command (see Alter Process). The tables that are copied in full when the process is run for the first time are listed with loadinclude (see Initial Load), and the rules that change names and data are described in Objects Mapping and Possible Transforms. The same masks are entered in the Replication Objects window of the Web UI.

 
On this page