Switches used in the command line

This topic gives a detailed description of command-line switches and examples of their usage.

Command line usage

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

The first argument for schemacompare is usually an operation switch that corresponds to the operation that you want to perform with the application.

Note

To run the Command Line in Windows 10:

From the Desktop Mode

  • Move the mouse cursor to the exact lower left corner until the desktop shortcuts menu appears.
  • Right-click to see the shortcut menu and than click Run.

From the Charms Bar

  • Move your mouse to the upper right corner until the Charms Bar appears.
  • Select Apps from the list and type ‘run’ in the search box.
  • Click Run from the search results.

Use Windows + R Shortcut Keys

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

Available command-line switches

Switch Usage
/argfile /argfile:<path>
Path to command-line arguments file. Options specified in the command line have higher priority than the options which were given in the file.
/activate /activate /key:<activation_key>
Activate a product using activation key.
/deactivate Deactivate a product.
/execute Execute a script.
/schemacompare Launch schema comparison.
/script Generate scripts of a database.
/scriptsfolder Create a scripts folder of a database.
/snapshot Create a snapshot of a database.
/quiet (/q) Hide 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>
Specify the connection string.
/database Specify a database to script or override the database specified in a template or in a connection string.
/encoding /encoding:<codepage|encoding name>
Specify the encoding which should be applied to open and execute the script.
/inputfile Specify an SQL or ZIP file with a script to execute.
/password /password:<pw>
Specify the server password or override the password specified in the connection string.
/zippassword /zippassword:<zip password>
Enter a password for protected archive with script.

/schemacompare

Launch schema comparison.

Parameter Description
/compfile /compfile:<path>
Load command line settings from comparison .scomp project file.
/filter /filter:<filepath>
Specify a filter path to filter objects. To learn more, refer to Use object filter.
/log /log:<filepath>
Generate comparison log file in the specified directory.
/options /{option}:[value]
Specify the value for comparison or synchronization option. To turn on the option, specify: Yes, Y, On, True, T. To turn off the option, specify: No, N, Off, False, F. Forced disabling of an option from the CLI is necessary if the option is set via UI and then saved in a dcomp file.
You can use this switch as many times as many options you want to specify. For more information, refer to Options used in the command line.
/report /report:<filepath>
Generate schema comparison report file. If the output file name has .html, .xls or .csv extension, it’s not necessary to specify the file format - it will be chosen depending on the extension.
/reportformat /reportformat:<HTML|XLS|XML>
Specify the format of the file comparison report. If the format was not specified, it is determined by the extension of the report file.
/source Specify 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>
scriptsfolder:<folderpath>
/sync /sync[:path]
Launch database synchronization. If an output file path is specified, the program will generate only a synchronization script.
/target Specify 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>
scriptsfolder:<folderpath>

/script

Generate scripts of a database.

Parameter Description
/connection /connection:<connection_string>
Specify the connection string.
/database Specify a database to script or override the database specified in a template or in a connection string.
/outputfile Specify a file name for storing the database script or override the file name specified in template.
/password /password:<pw>
Specify the server password or override the password specified in the connection string.
/projectfile /projectfile:<path>
Specify script template to use. Some template options can be overridden by switches.
To learn how to create a project file, refer to How to generate SQL Server database scripts.

/scriptsfolder

Create a scripts folder of a database.

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

/snapshot

Create a snapshot of a database.

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

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Schema Compare for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Schema Compare in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Schema Compare for your business, request a demo to see it in action.
Ready to start using dbForge Schema Compare for SQL Server?