Pro2 supports command-line operations for some of the web interface tool operations. This is an alternative to performing the tasks using the command prompt instead of the web interface. This topic explains the different modes and their respective syntax to execute the administrative tool operations. These operations can be executed using the BatchGen.bat file located in the Scripts folder of your Pro2 installation.

LOAD_CONFIG: Loads the configuration file from the location given using the PATH variable.

Syntax
"%PROEXE%" -b -pf %REPLPF% -p %CODEDIR%\BatchGenerators.p -param "PATH=C:\Pro2\replbasev4.ini;DB=All;Mode=LOAD_CONFIG " >> %CODEDIR%\repl_log\batch.log

SAVE_CONFIG: Saves the current configuration to the path given in the PATH variable.

Syntax
"%PROEXE%" -b -pf %REPLPF% -p %CODEDIR%\BatchGenerators.p -param "PATH=C:\Pro2\;DB=All;Mode= SAVE_CONFIG" >> %CODEDIR%\repl_log\batch.log

AUTO_DBXREF: Adds the database map record to the Database Mapping table.

Syntax
"%PROEXE%" -b -pf %REPLPF% -p %CODEDIR%\BatchGenerators.p -param "Mode=AUTO_DBXREF;DB=sports,Options=MSS >> %CODEDIR%\repl_log\batch.log

GEN_TGT: Adds the Microsoft SQL Server database map record to the Database Mapping table.

Syntax
"%PROEXE%" -b -pf %REPLPF% -p %CODEDIR%\BatchGenerators.p -param "PATH=C:\Pro2\;DB=All;Mode= GEN_TGT Options=NO|YES|NO " >> %CODEDIR%\repl_log\batch.log

AUTO_MAP: Maps the tables that were automatically mapped, listed in the Mapping table.

Syntax
"%PROEXE%" -b -pf %REPLPF% -p %CODEDIR%\BatchGenerators.p -param "PATH=C:\Pro2\;DB=All;Mode= AUTO_MAPP " >> %CODEDIR%\repl_log\batch.log

GEN_PROCS: Generates the Process libraries, Replication triggers, Bulk-copy processors to the default location specified in properties file.

Syntax
"%PROEXE%" -b -pf %REPLPF% -p %CODEDIR%\BatchGenerators.p -param "PATH=C:\Pro2\;DB=All;Mode= GEN_PROCS " >> %CODEDIR%\repl_log\batch.log

GEN_TGT_DIFF: Generates the target differential files and saves them to the location given in PATH variable.

Syntax
"%PROEXE%" -b -pf %REPLPF% -p %CODEDIR%\BatchGenerators.p -param "PATH=C:\Pro2\;DB=All;Mode= GEN_TGT_DIFF;Options=NO|YES|NO " >> %CODEDIR%\repl_log\batch.log

TGT_DELTA_DF: Generates the trigger Delta DF file to the location given in the PATH variable.

Syntax
"%PROEXE%" -b -pf %REPLPF% -p %CODEDIR%\BatchGenerators.p -param "PATH=C:\Pro2\;DB=All;Mode= TGT_DELTA_DF " >> %CODEDIR%\repl_log\batch.log

GEN_DELTA_DF: Generates a Delta DF file on the WAN side and saves the files to the location given in the PATH variable.

Syntax
"%PROEXE%" -b -pf %REPLPF% -p %CODEDIR%\BatchGenerators.p -param "PATH=C:\Pro2\;DB=All;Mode= GEN_DELTA_DF " >> %CODEDIR%\repl_log\batch.log

CHECK_GEN_Q REC: Enables the functionality of generating replication queue records for single and multiple tables (which are separated by comma (,)).

Syntax
"%PROEXE%" -ininame Pro2.ini -basekey "INI" -b -pf %REPLPF% -p
%CODEDIR%\BatchGenerators.p -param "PATH=C:\Pro2\;DB=All;Mode=CHECK_GEN_QREC;TABLE=Customer" >> %CODEDIR%\repl_log\batch.log

Parameters

TABLE
Name of the mapped table. You can specify a single table name, multiple table names or ALL.

UNCHECK_GEN_QREC: Disables the functionality of generating replication queue records for single and multiple tables (which are separated by comma (,)).

Syntax
"%PROEXE%" -ininame Pro2.ini -basekey "INI" -b -pf %REPLPF% -p
%CODEDIR%\BatchGenerators.p -param
"PATH=C:\Pro2\;DB=All;Mode=UNCHECK_GEN_QREC;TABLE=Customer" >>
%CODEDIR%\repl_log\batch.log

Parameters

TABLE
Name of the mapped table. You can specify a single table name, multiple table names or ALL.

ADD_THREAD: Adds a new replication thread.

Syntax
"%PROEXE%" -ininame Pro2.ini -basekey "INI" -b -pf %REPLPF% -p
%CODEDIR%\BatchGenerators.p -param "PATH=C:\Pro2\;DB=All;Mode=ADD_THREAD;THREAD_NUM=10"
>> %CODEDIR%\repl_log\batch.log

Parameters

THREAD_NUM
A number for the thread you are adding. The value must be an INTEGER ranging between 1 and 99.

DEL_MAP_TABLE: Deletes a mapped table along with its mapped fields for single and multiple tables (which are separated by comma (,)).

Syntax
"%PROEXE%" -ininame Pro2.ini -basekey "INI" -b -pf %REPLPF% -p
%CODEDIR%\BatchGenerators.p -param
"PATH=C:\Pro2\;DB=All;Mode=DEL_MAP_TABLE;TABLE=Customer" >> %CODEDIR%\repl_log\batch.log

Parameters

TABLE
Name of the mapped table. You can specify a single table name, multiple table names or ALL.

DEL_DBMAP: Deletes the mapped records of a database.

Syntax
"%PROEXE%" -ininame Pro2.ini -basekey "INI" -b -pf %REPLPF% -p
%CODEDIR%\BatchGenerators.p -param "PATH=C:\Pro2\;DB=sports;Mode=DEL_DBMAP" >>
%CODEDIR%\repl_log\batch.log

Parameters

DB
Name of the database. You can specify a single database name or ALL.

CHECK_CRC: Checks whether the CRC matches for mapped tables in the source databases and the local databases in a WAN environment.

Syntax
"%PROEXE%" -ininame Pro2.ini -basekey "INI" -b -pf %REPLPF% -p
%CODEDIR%\BatchGenerators.p -param "PATH=C:\Pro2\;DB=All;Mode=CHECK_CRC" >>
%CODEDIR%\repl_log\batch.log

Parameters

DB
Name of the database. You can specify a single database name or ALL.

SYNC_REPL: Synchronizes the replication database table values in a WAN environment.

Syntax
"%PROEXE%" -ininame Pro2.ini -basekey "INI" -b -pf %REPLPF% -p
%CODEDIR%\BatchGenerators.p -param "PATH=C:\Pro2\;DB=All;Mode=SYNC_REPL" >>
%CODEDIR%\repl_log\batch.log

CDC Purge: The CDC Purge menu item can be used to delete the data of change records other than the old data based on user input about the number of days of data that should be deleted and the maximum number of records that should be deleted per batch.

Syntax
"%PROEXE%" -b -pf %REPLPF% -p %CODEDIR%\CDCPurge.p -param "DB=sports,CDC_PURGE_DAYS=0,MAXPROCESSED=100" > %CODEDIR%\repl_log\CDCPurge.log