SchemaSmith Documentation

Command Line Options - SQL Server (Community)

Flags for automation, logging, and alternate config files.

SchemaSmith command-line tools for automated database deployments.

Overview

All SchemaSmith Community command-line tools (SchemaQuench, SchemaTongs, and DataTongs) share a common set of switches for configuration and logging.

Switches can be passed directly on the command line or combined with configuration files. Command-line values take the highest priority, overriding appsettings.json settings.

Switch Format

Prefix Styles

All switches accept either a double-dash (--) or forward-slash (/) prefix:

> SchemaQuench --ConfigFile:production.json
> SchemaQuench /ConfigFile:production.json

Value Separators

Values are separated from the switch name by a colon (:) or equals sign (=):

--ConfigFile:production.json
--ConfigFile=production.json

Case Insensitive

Switch names are not case-sensitive. These are all equivalent:

--version
--Version
--VERSION

Quoting Values with Spaces

If a value contains spaces, wrap it in quotes:

> SchemaQuench --ConfigFile:"C:\My Projects\config.json"

Common Switches

These switches are recognized by all SchemaSmith Community tools: SchemaQuench, SchemaTongs, and DataTongs.

Switch Aliases Description
--version -v, --ver Print the tool version, then exit.
--help -h, -? Print command-line options, then exit.
--ConfigFile:<path> Path to the configuration file. Overrides the default appsettings.json in the current working directory.
--LogPath:<path> Directory for log output and backup directories. Defaults to the executable directory.

Examples

> SchemaQuench --ConfigFile:production.json --LogPath:C:\Logs

> SchemaTongs --ConfigFile:extract-config.json

> SchemaQuench --version

> SchemaTongs --help

Related Documentation