Command-line mode

Start a saved job from a batch file, Task Scheduler, a CI step or a command prompt.

Last updated November 24, 2026

A saved job holds both connections, the table selection and the options. Run it by name. There is nothing else to pass.

Name the job

A job saves itself from the moment Setup creates it. Its name is at the top of the window. That is the name you run.

To rename it, click the name and select Rename….

In Jobs, select a job to Rename…, Duplicate or Delete it. Duplicate asks for the copy's name. A running job cannot be renamed or deleted.

The job name at the top of the window, with its menu open: Rename, New job and All jobs

Where jobs are stored

WhatWhere
The saved job, shared by all DBConvert products%LOCALAPPDATA%\DBConvert\jobs\<job name>.json
The log of each command-line run%LOCALAPPDATA%\DBConvert\jobs\<job name>.log
The log of a run started in the appthe Open folder link on Execution
The log of each scheduled runthe Open log folder link in the Schedule dialog
Saved connections, shared by all DBConvert products%LOCALAPPDATA%\DBConvert\connections\
Connection passwordsthe Windows credential store, never the files above

On a server where several Windows users work with the same jobs, an administrator can move these folders to one place: Shared data folder for several users.

A job or connection file the app cannot read is left as it is and not listed. The app names it in a warning when it starts.

To see a job's file, open Jobs in the left rail, select the job and expand Job file. It shows where the file is and its text, read-only. Copy puts the text on the clipboard, for example for a message to support. The file holds references to connections, never passwords.

Jobs with Job file expanded: the file path, the job's text read-only and a Copy button

Import jobs from Studio 4.x

Sessions saved by DBConvert Studio 4.x become jobs.

  1. Open the job menu and click Import from Studio 4.x.
  2. Pick the Studio folder, workSettings. A copy from another computer works too.
  3. Click Import. The imported jobs are listed under Jobs.

The offer to import jobs from the previous version, with Not now and Import

What the import does:

  • A connection with a name that already exists is reused, not added twice.
  • One session can become several jobs.
  • Each job takes its migration mode from the session.
  • A session with no tables listed copies all tables.
  • A session saved twice imports the save that Studio ran.
  • A table with a row filter becomes a table from SQL with the same name.

A session that cannot be imported is listed with the reason, for example a filter that does not convert or a connection with no settings. The import always ends with Check the imported jobs before you run them.

The result of an import: 5 of 8 jobs imported, the rest listed with the reason

Run it

"C:\Program Files\DBConvert\DBConvert\dbconvert-run.exe" "Nightly orders"

Batch files from version 5 keep working, including the --run-job and /Session: forms.

The plan must be approved

A scheduled run does only what a person approved. The approval is the plan you read in the app before Start conversion.

  • Saving a schedule approves the plan. So does Start conversion.
  • If the job changes after that, the next scheduled run is refused before anything is written.
  • Open the job in the app, read the new plan and start it again.

Checks before an unattended run

Command-line and scheduled runs check the saved table selection before copying. They follow the job's table selection, including the box Also convert tables added to the source later. Older jobs with an explicit table list keep that selection.

The run checks the tables as the Tables step does. A table with a blocking problem, such as two source tables mapped to one destination table, is left out. The rest run, and the run exits with code 2. The log names each table left out and the reason. Fix it on Tables & mapping, as in the app.

The same rule holds in the app, from dbconvert-run and in a schedule. An old scheduledCheck setting in a job file is ignored.

A table unticked in the job is not copied.

A system database selected as the destination also stops the run. Open the job in the app to correct the destination or table selection.

Output and logs

No application window opens. The run writes to the console it was started from:

2026-08-24 12:47:21  === job run: Nightly orders ===
2026-08-24 12:47:23  Copying data for table 'orders'.
2026-08-24 12:47:25  Elapsed 00:00:02. Inserted: 41902 of 41902.
2026-08-24 12:47:25  run finished: ok (exit 0)

Redirection works as usual: dbconvert-run.exe "Nightly orders" > run.txt. Under Task Scheduler, a shortcut or Explorer there is no console, and the log is the only record. Every run is appended to it.

Validate after the run

A job saved with Validate after the run checks the destination after every run, also from dbconvert-run and a schedule. The log then says one of:

  • validation: the target matches
  • validation: the totals match
  • validation: the target does not match, see <job>.validation.json

A difference makes a finished run exit with code 2. When validation can compare only part of the data, the copy is not proven: a repeat sync writes only the rows that changed, and a row limit with no key or the fast mode reads only a sample. The run then exits with code 2. The report is <job>.validation.json in the records folder beside the job. What the levels check: Validate the copy.

Exit codes

CodeMeaning
0completed successfully
1failed, or no job by that name
2completed, but some rows or objects were rejected, a table was left out for a blocking problem, or validation found differences
3cancelled - not reachable from the command line

Code 2 is not a failure. Scripts usually branch on it separately:

@echo off
set APP=C:\Program Files\DBConvert\DBConvert\dbconvert-run.exe

"%APP%" "Nightly orders"

if %ERRORLEVEL% EQU 0 echo done
if %ERRORLEVEL% EQU 1 (echo FAILED & exit /b 1)
if %ERRORLEVEL% EQU 2 echo finished with rejected rows - see the log

Read the code from a batch file, not from an interactive prompt: Windows does not make a shell wait for a windowed program, so the prompt returns before the run finishes and %ERRORLEVEL% still holds the previous value.

Running several jobs

@echo off
set APP=C:\Program Files\DBConvert\DBConvert\dbconvert-run.exe

"%APP%" "Customers"  || exit /b 1
"%APP%" "Orders"     || exit /b 1
"%APP%" "Archive"    || exit /b 1

|| stops on code 1 and on code 2. To continue after rejected rows, use the if %ERRORLEVEL% form above.

Scheduled jobs

To schedule the open job:

  1. On Execution, click Schedule….
  2. Choose Frequency and Start time.
  3. Click Save schedule.

Schedule dialog with Frequency set to Every N minutes

FrequencyRuns
Onceonce, at the start time. A time already past today means tomorrow
Dailyevery day at the start time
Weeklyon the chosen day of the week
Monthlyon the chosen day of the month
Every N minutesfrom the start time, every 5 minutes or more, up to 23 hours 59 minutes. Sync jobs only. For once a day, choose Daily

The job runs while you are logged in to Windows, even with the app closed. The same dialog shows the next and last run, and has Run now and Remove. Open log folder shows what each run did.

The list of schedules also shows the schedules of earlier versions. You can run, edit or remove them there.

The schedule is a Windows Task Scheduler task. No console window opens. Same exit codes. Saving a schedule approves the plan, see The plan must be approved.

Keeping a destination in sync

Every N minutes repeats a sync job, so the destination follows the source all day.

A Convert job cannot repeat this way: each run would copy the same rows again. For a Convert job the list shows Every N minutes (sync jobs only), and the option cannot be chosen.

If a run is still going, the next one is skipped. The one after it starts on time.

One run of a job at a time

A job runs once at a time, wherever it is started: the app, dbconvert-run or a schedule. A second start while the first runs is refused:

the job 'Nightly orders' is already running (from the window, a schedule or the command line): this run was not started

From the command line and in a schedule, that start exits with code 1, and the line goes to the job's log.

Passwords

A job saved by the app holds no password. Connection passwords are read from the Windows credential store at run time. The job must therefore be saved on the machine, and under the Windows account, that will run it.

If a secret is missing, the run reports which connection, then continues without it. A password that was required fails at connect time with the server's own error.