Batch Mode
Go to <installation folder>/dbsync/scripts. Make sure that setenv.bat points to your installation directory.
To enable return code go to batch file run.bat found in scripts folder.Replace the existing commands in the last section of run.bat with the new commands shown below. Return code “0” will be displayed in command prompt after successful replication. If there is any error during replication, retun code “-1” will be displayed.
Existing command:
%JAVA_HOME%\bin\java -Xmx512m -Dinstance=%1 -Dconfig.dir=%CONFIG_DIR% -classpath %CLASSPATH% com.dbsync.salesforce.dbsynch.Driver %2 %3 %4
New command:
%JAVA_HOME%\bin\java -Xmx512m -Dinstance=%1 -DconsoleExitCode=true -Dconfig.dir=%CONFIG_DIR% -classpath %CLASSPATH% com.dbsync.salesforce.dbsynch.Driver %2 %3 %4
set ExitCode=%ERRORLEVEL%
echo %ExitCode%
Commands to run replication with example is shown below.
Sync schema Run – run <<profile name>> db_setup
Example: run dbsync db_setup
For getting a clean copy Run – run <<profile name>> cleancopy
Example: run dbsync cleancopy
Last updated