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

Syntax

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

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

Syntax

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

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

Syntax

AUTO_DBXREF: Adds the DB map record to the Database Mappings table.

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

Syntax

GEN_TGT: Adds the DB map record to the Database Mappings table.

"%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

Syntax

AUTO_MAP: Maps the tables listed in the Mapping table automatically.

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

Syntax

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

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

Syntax

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

"%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

Syntax

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

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

Syntax

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

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

Syntax

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

"%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.

Syntax

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

"%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.

Syntax

ADD_THREAD: Adds a new replication thread.

"%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.

Syntax

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

"%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.

Syntax

DEL_DBMAP: Deletes the mapped records of a database.

"%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.

Syntax

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

"%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.

Syntax

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

"%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

Syntax

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 delated and the maximum number of records that should be deleted per batch.

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