Command line syntax
Published 15 November 2013
This is a list of switches you can use with the SQL Data Generator command line.
Licensing commands can be found here
/help
Alias: /?
Displays the list of switches in the command line with basic descriptions.
If /help is used with any switches except /verbose, /html, /out, /force or /outputwidth then those extra switches will be ignored; the help message will be printed and the process will end with exit code 0.
/html
You must specify /help
to use this switch.
Outputs the help text as HTML.
/quiet
Alias: /q
Prints output only if an error occurs.
/verbose
Alias: /v
Prints more detailed output. You can use /verbose with the /help switch for more detailed help information.
/force
Alias: /f
This forces the overwriting of any output files that already exist. If this switch isn't used and a file of the same name already exists, the program will exit with the exit code indicating an IO error.
/argfile:<file path>
Runs a file containing an XML argument specification:
sqldatagenerator /Argfile:XMLFileName.xml
For information about how to create XML argument specification files, see Using XML to specify command line arguments (SQL Compare documentation).
/out:<file path>
Redirects console output to the specified file:
sqldatagenerator /project:"C:\SQL Data Generator\Projects\widgetdata.sqlgen" /out:C:\output file
/outputwidth:<columns>
Forces the width of console output.
This can be used to ensure that database object names etc aren't truncated, and that SQL script lines aren't wrapped or broken. This is particularly useful when redirecting output to a file as it allows you to overcome the limitations of the default console width of 80 characters.
/project:<file path>
Alias: /pr
Uses a SQL Data Generator (.sqlgen) project file to generate data.
To populate a database with data using settings saved in the widgetdata project:
sqldatagenerator /project:"C:\SQL Data Generator\Projects\widgetdata.sqlgen"
/server:<server name>
Alias: /s
Specifies the SQL server instance to connect to.
sqldatagenerator /server:Widget_Server\SQL2012 /database:WidgetTest
/database:<database name>
Alias: /db
Specifies the database you want to populate with data.
sqldatagenerator /server:Widget_Server\SQL2012 /database:WidgetTest
/username:<username>
Alias: /u
The username for connecting to the server.
If no username is specified, Windows authentication is used.
sqldatagenerator /server:Widget_Server\SQL2012 /username:User1 /password:P@ssw0rd
/password:<password>
Alias: /p
The password for connecting to the server.
You must also provide a username. If you don't specify a username and password combination, Windows authentication is used.
sqldatagenerator /database:WidgetTest /username:User1 /password:P@ssw0rd