Switches used in the command line

Last modified: March 28, 2025

This article describes the command-line switches supported by Schema Compare and provides examples of their usage.

Access available Schema Compare switches

To quickly access help regarding the available command line arguments, use the following command:

schemacompare.com /?

Help in cmd

For detailed information on each command-line operation, execute the following command and specify the desired option value schemacompare /option_name /?. For example, schemacompare /backup /?.

Note

To run the Command Line in Windows 11:

From the Windows taskbar

  • Right-click the taskbar at the bottom of the screen and then select Run. or
  • Click Start or press the Windows key on your keyboard to open the Start menu.
  • Type cmd or Command Prompt in the search bar.
  • Select the Command Prompt app from the search results to open it.

Using shortcut keys

  • Press the Windows + R keys, to show the Run command window.
  • In the window that opens, type cmd and press Enter.

Command line usage

schemacompare [/argfile:filepath] [/operation_switch] [/switch1[:value | [parameter1:value parameter2:value ..]] /switch2 ..]

Typically, the initial argument for schemacompare is an operation switch, which indicates the specific action you wish to execute with the application.

Available command-line switches

Switch Usage
/argfile /argfile:<filepath> Specifies the path to the command-line arguments file. Options specified in the command line have higher priority than the options that were given in the argfile.
/activate /activate /key:<activation_key> Activates a product using the activation key.
/deactivate Deactivates a product.
/execute Executes a script.
/schemacompare Launches schema comparison.
/script Generates database scripts.
/scriptsfolder Creates a scripts folder of a database.
/snapshot Creates a snapshot of a database.
/quiet (/q) Hides the console window in console mode. It should be used after the main operation switch.

Switches details

/execute

Execute a script.

Parameter Description
/connection /connection:<connection_string> Specifies the connection string.
/database Specifies a database to script or override the database specified in a template or in the connection string.
/encoding /encoding:<codepage|encoding name> Specifies the encoding to be applied when opening and executing the script.
/inputfile Specifies a SQL or ZIP file with a script to execute.
/password /password:<pw> Specifies the server password or override the password specified in the connection string.
/zippassword /zippassword:<zip password> Enters a password for the protected archive with the script.

/schemacompare

Launch schema comparison.

Parameter Description
/source Specifies the source with the following options:server:<name> database:<db> [user:<name>] [password:<pw>] If ‘user’ is not specified, the system’s integrated security is used.connection:<connection_string>snapshot:<filepath> specifies the file path to a database schema snapshot file (.snap) that captures the structure of a database in the XML format scriptsfolder:<folderpath> serverversion:<serverversion> collation:<collation> Specifies the folder path to a scripts folder containing SQL scripts that represent the objects of a database To specify the file path to a SQL Server backup file (.bak) or backup files taken from the differential backup: backup:<filepath> [backup:<filepath> ...]
/target Specifies the target with the following options: server:<name> database:<db> [user:<name>] [password:<pw>]If ‘user’ is not specified, the system’s integrated security is used. connection:<connection_string> snapshot:<filepath> specifies the file path to a database schema snapshot file (.snap) that captures the structure of a database in the XML format scriptsfolder:<folderpath> serverversion:<serverversion> collation:<collation> Specifies the folder path to a scripts folder containing SQL scripts that represent the objects of a database To specify the file path to a SQL Server backup file (.bak) or backup files taken from the differential backup: backup:<filepath> [backup:<filepath> ...]
/compfile /compfile:<filepath> Loads command line settings from the comparison .scomp project file.
/options /{option}:[value]Specifies the value for comparison, synchronization, or comparison report option. To turn on the option, specify: Yes, Y, On, True, or T. To turn off the option, specify: No, N, Off, False, or F. Forced disabling of an option from the CLI is necessary if the option is set via UI and then saved in a scomp file. You can use this switch as many times as many options you want to set. For more information, see the Options used in the command line topic.
/sync /sync[:filepath]Launches database synchronization. If an output file path is specified, the program will generate only a synchronization script.
/report /report:<filepath>Generates a schema comparison report file. If the output file name has .html, .xls or .csv extension, there’s no need to specify the file format as it will be automatically determined based on the extension.
/reportformat /reportformat:<HTML|XLS|XML>Specifies the format of the comparison report file. If the format is not specified, it is determined by the extension of the report file.
/includeobjects /includeobjects:<All|Filtered|Diff|SelectForSync Specifies objects for the report: * All - all objects; * Filtered - filtered objects; * Diff - objects with differences; * SelectForSync - objects selected for synchronization. The option refers specifically to the report generation in the HTML/XLS/XML formats and does not work separately from the /report:<filepath> key.
/log /log:<filepath>Writes a comparison log to the specified file.
/filter /filter:<filepath>Specifies the file path to filter objects in a .scflt file. To read more about the Object Filter feature, refer to the Use object filter topic.

/script

Generate database scripts.

Parameter Description
/connection /connection:<connection_string>Specifies the connection string.
/password /password:<pw>Specifies the server password or override the password specified in the connection string.
/database Specifies a database to script or override the database specified in a template or in a connection string.
/outputfile Specifies a file name for storing the database script or override the file name specified in a template.
/projectfile /projectfile:<path>Specifies the script template to use. Some template options can be overridden by switches.

/scriptsfolder

Create a scripts folder of a database.

Parameter Description
/connection /connection:<connection_string>Specifies the connection string.
/password /password:<pw>Specifies the server password or override the password specified in the connection string.
/database Specifies a database to script or override the database specified in a template or in a connection string.
/decrypt /decrypt:[value]Specifies whether source objects should be decrypted during the description process.
/includedata /includedata:[value]Defines whether to include data. To turn on the option, specify: Yes, Y, On, True, or T. To turn off the option, specify: No, N, Off, False, or F. Forced disabling of an option from the CLI is necessary if the option is set via UI and then saved in a scomp file.
/path /path:<folder_path>Defines a scripts folder path.

/snapshot

Create a snapshot of a database.

Parameter Description
/connection /connection:<connection_string>Specifies the connection string.
/password /password:<pw>Specifies the server password or override the password specified in the connection string.
/database Specifies a database to script or override the database specified in a template or in a connection string.
/decrypt /decrypt:[value]Specifies whether source objects should be decrypted during the description process. To turn on the option, specify: Yes, Y, On, True, or T. To turn off the option, specify: No, N, Off, or False, F. Forced disabling of an option from the CLI is necessary if the option is set via UI and then saved in a scomp file.
/compress /compress:[value]Defines if the snapshot file should be compressed. To turn on the option, specify: Yes, Y, On, True, or T. To turn off the option, specify: No, N, Off, False, or F. Forced disabling of an option from the CLI is necessary if the option is set via UI and then saved in a scomp file.
/file /file:<file_path>Defines a snapshot file location.

Note

To build the command-line syntax, it’s better to use the Command-line Wizard.