SQL Data Generator 3

Using the command line

This topic provides information on the following aspects of the SQL Data Generator command line:

For examples of how to use the command line interface, see Examples using the command line.

For information about all the switches you can use with the SQL Data Generator command line, see Command line syntax.

Entering a command

When you enter a command line, the order of switches is unimportant. We recommend you use the Microsoft convention of separating a switch from its values using a colon, like this:


You can separate a switch that accepts a single value from its value using a space, but we don't recommended it.

Values that include spaces must be delimited by double quotation marks ( " ). For example:

/out:"c:\output file.txt"

Getting help from the command line

To display help, enter:

SQLDataGenerator /help

This displays a brief description, and help on all the command line switches.

For more detailed help enter:

SQLDataGenerator /help /verbose

This displays a detailed description of each switch and the values it can accept (where applicable), and all exit codes. To output the help in HTML format, enter:

SQLDataGenerator /help /verbose /html


Many of the switches have an alias. The alias provides a convenient shorthand way to specify the switch. For example, /? is the alias for the /help switch, and /v is the alias for the /verbose switch.

Switches and aliases aren't case-sensitive.

Redirecting command output

Output from all commands can be redirected to a file by one of several methods:

  • Use the /out switch to specify the file to which you want output directed:

    SQLDataGenerator ... /out:outputlog.txt

    where outputlog.txt is the name of the file. If the file exists already, you must also use the /force switch to force the tool to overwrite the file, otherwise an error will occur.

  • Use the output redirection features that are provided by the shell in which you are executing the command.From the standard command prompt provided by Windows, you can redirect output to a file as follows:

    SQLDataGenerator ... > outputlog.txt

    The redirection operator ( > ) and file name must be the last items on the command line.

    If the specified file exists already, it will be overwritten.

    To append output from the tool to an existing file, for example to append to a log without losing the data already present in the log, enter the following:

    SQLDataGenerator ... >> existinglog.txt

    If you're scripting using a language such as VBScript, JScript, PHP, Perl, or Python, or if you want to access the tool from Web pages using ASP.NET, refer to the documentation for the language.

Didn't find what you were looking for?