Compare CLI

The Compare CLI runs a saved set of comparisons from the command line, so you can call it from a deployment pipeline, a SQL Server Agent job, or your own scripts, without opening Aireforge Studio. Exporting a job for the CLI needs a paid licence.

Exporting a comparison job

The CLI executable itself is lightweight and cannot create or edit comparisons; the job file it runs has to be built and exported from Aireforge Studio first.

On the Compare tab, tick the servers and choose the comparisons you want the job to run, then select the command-line icon. You are prompted for a password and a location to save the file, for example d:\tf.adc.

The exported .adc file contains everything the CLI needs to run unattended: the comparisons to perform, the servers to check, and their connection details, including credentials. The file is encrypted and protected by the password you set when exporting it, so keep that password safe. Because the servers and comparisons are fixed at export time, any change, such as adding a server or a comparison, means exporting the job again from Studio.

Running the CLI

The executable, omnicomparecli.exe, is installed alongside Aireforge Studio in its program folder. Run it with no arguments, or with -h, to see its usage.

omnicomparecli.exe -h

To run a job, pass the exported file and its password with -i and -p:

omnicomparecli.exe -i d:\tf.adc -p <password> -v full

-v full turns on full logging. Use it for debugging only: a full comparison of a large estate logs a lot of detail. -o writes the output to a file instead of, or as well as, the console, which is a more practical way to review a run than reading full logging on screen.

Reading the result

The CLI returns an exit code you can check from whatever calls it: 0 if no differences were found, 1 if differences were found. That is enough to catch in a script and raise an alert, or abort a deployment.

To look at what actually differs, review the output file from -o, or open the job's comparisons in Aireforge Studio itself and run them there.