Page tree
Skip to end of metadata
Go to start of metadata

DBSync Cloud Replication process can be initiated in Batch mode and the same is explained in this section.

  • 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
  • For moving data from source apps (Salesforce and Microsoft CRM) to database Run – run <<profile name>> source_to_db
    • Example: run dbsync source_to_db
  • For moving data from database to source apps (Salesforce and Microsoft CRM) Run – run <<profile name>> db_to_source
    • Example: run dbsync db_to_source
  • No labels