Repstance has built-in functionality to load objects’ data and start the replication process from the timestamp at which the data has been created. Initial Loading is performing by the Capture Process at the “Run” stage (see chapter Run any Capture or Apply Processes for the details).
This functionality is used when it is necessary to synchronize data between the Source and Target Databases before starting the replication process. The Initial Load parameters can be configured to either clean up or preserve data in the Target Database before loading from the Source Database. Two further options are to create table in the Target Database if it doesn’t exist and recreate this table in the Target Database if it does exist.
The following parameters are used to configure the objects for Initial Loading:
loadinclude – list of the tables to be included into the Initial Load
loadexclude – list of the tables to be excluded from the Initial Load
Note – These parameters MUST be used in conjunction with the dmlinclude/ dmlexclude object definitions as well, otherwise the Capture Process will skip them.
The format to be specified takes the following form:
schema _name1.table_name1:[loadOption1], schema _name2.table_name2:[loadOption2], ...
In order to define the list of the tables to be part of this process, and where there are more than one tables mask to be defined each of these 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 schema _name and table_name parts.
The loadOption is an optional parameter, and it used to perform the action detailed below on the data before insertion into the Target Database, and can have the following values:
A – preserve the data which is the DEFAULT value
T – use truncate statement to clean up the data
D – use delete statement to clean up the data
C – create table if it doesn’t exist
R – recreate table if it already exists
Note – Once the Initial Load has been completed by Capture Process the values of loadinclude and loadexclude parameters will be removed automatically. The details of Initial Load criteria can be found in the Capture log files.
The following examples show various ways of defining the Initial Loading parameters:
To reload data for the emp and emp_audit_trail tables, which are in the dbo schema and truncate these tables before insertion:
loadinclude=dbo.emp:T,dbo.emp_audit_trail:T
Any data from tables starting with the rep_ prefix in the dbo schema which need to be deleted before insertion:
loadinclude=dbo.rep_%:D
To reload all tables started with emp prefix except the employee_archive tables:
loadinclude=dbo.emp%:T
loadexclude=dbo.employee_archive
To reload customer table and create it if it doesn’t exist in the Target Database:
loadinclude=dbo.customer:C
Prev page:
Capture Objects SpecificationNext page:
Prepare Apply Process