Command-line mode

Run DBConvert and DBSync unattended by replaying a saved session from the command line - the same path that the built-in scheduler uses internally.

Command-line mode replays a previously saved session without opening the GUI. The session captures source and target connection settings, the table / field / view selection, type mapping, and run options - the command line just hands DBConvert the session name and starts the job.

Use it when you want to:

  • rerun a prepared migration or synchronization without stepping through the wizard again,
  • wire the job into an external scheduler (Windows Task Scheduler, cron through WSL, CI runners),
  • chain several jobs in a batch file,
  • plug a saved session into the built-in scheduler (the scheduler invokes the same CLI under the hood).

Prerequisite: save the session in the GUI first

Open the DBConvert or DBSync product in the GUI, configure the source, target, and options, then save the session under a name you can remember. The CLI cannot create a new session - it can only replay one that exists. See Savable configurations / sessions for the save / load screen.

DBConvert saved session combo box

Basic syntax

Every DBConvert and DBSync product ships a console executable next to the GUI executable. The console version accepts a /Session: parameter and runs the job in headless mode.

"C:\Program Files\DBConvert\<Pair>Pro\<Pair>Pro_Cons.exe" /Session:"Session Name"

Replace <Pair> with the source / target pair installed on the workstation - the executable name follows the pattern <SOURCE>2<TARGET>Pro_Cons.exe. The path matches the install directory the GUI opens from.

Examples

Adjust the path and session name to your installation. Quote the session name when it contains spaces.

:: SQL Server → MySQL
"C:\Program Files\DBConvert\MSSQL2MySQLPro\MSSQL2MySQLPro_Cons.exe" /Session:"NightlyRefresh"

:: MySQL → PostgreSQL
"C:\Program Files\DBConvert\MySQL2PostgreSQLPro\MySQL2PostgreSQLPro_Cons.exe" /Session:"PG migration"

:: Oracle → PostgreSQL
"C:\Program Files\DBConvert\Oracle2PostgreSQLPro\Oracle2PostgreSQLPro_Cons.exe" /Session:"OracleToPG"

For pairs not listed here, look in the install folder - the executable name uses the same <SOURCE>2<TARGET>Pro_Cons.exe pattern.

Command-line FAQ

Can I create a session from the command line?

No. Sessions are created and saved only from the GUI. The CLI replays existing sessions; it does not accept connection strings or table lists as parameters.

Will the GUI need to be open?

No. The _Cons.exe binary is the headless / console version - it runs the migration directly without launching the GUI window.

Does the scheduler use the same command?

Yes. The built-in scheduler invokes the same _Cons.exe + /Session: call internally.

For adjacent topics, continue with Savable configurations / sessions and Built-in scheduler.