

How to efficiently generate replication
scripts for many tables
Here are a few tips for efficiently using Repgen to generate
replication scripts for large numbers of database tables.
Attempt to be consistent when naming the replication conflict resolution
columns. This info is entered into the Date Modified and Site ID fields
within the Tables
folder Tab of Repgen. The example data displayed within Repgen uses
different names for these columns on different tables. This was done
simply for example purposes in order to emphasize that it is possible
to have differing names for these table columns.
If the tables to be replicated already contain primary keys and a trigger
producing a site unique key, just enter a simple designation like "ID"
for the column name for each table. This information is only used to
build the reppkcolumns_sitename.sql and idtriggers.sql scripts, which
are not used unless there aren't primary keys within each table.
Use a spreadsheet to organize the information which will be pasted into
the Repgen fields. The tables should be entered into the spreadsheet
(and Repgen) grouped by the replication group where they will reside,
for readability purposes. Here is an example
of an Excel spreadsheet which may be useful for this task. Spreadsheets
are well suited for processing repeating columns of information. By
entering the first row of info, the entire column can then be filled
with the desired value.
Once the spreadsheet has been filled out, copy and paste the information
into the appropriate fields
within Repgen. Note: It will often be necessary to paste
the info into a text processing program, then copying from the text
processing program into the Repgen field in order to get proper line
endings. Otherwise the text will get pasted all on one line. Then select
Save As from the File menu in Repgen to save all of the configuration
information within Repgen into a text file. This Repgen configuration
file can be easily reloaded at any time in the future when changes are
required.
It may be useful to keep the spreadsheet for documentation and maintenance
purposes after the replication setup has been completed. The spreadsheet
can serve as supplemental documentation in addition to the repdoc.txt
file. The spreadsheet can be useful for making incremental changes to
the data due to control over column sizes and the visual aids of line
numbering and grid layout. Entire columns of info can then be pasted
back into Repgen prior to regenerating the scripts.
Different versions of the replication setup may be maintained by setting
the File Version
number on the General tab. Please see the notes on the
graphical interface page for more info.

