Switches used in the command line

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

Command line usage

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

To get more information on switches related to data export through the command-line interface, type:

C:\Program Files\Devart\dbForge SQL Tools Professional\dbForge Data Pump for SQL Server\datapump.com /dataexport /?

Available command-line switches

Switch Usage and Action
/connection Usage: /connection:<connection_string>
Specifies the connection string.
/errormode Usage: /errormode:<ignore|abort>
Specifies the application behavior when an error is encountered: ignore - to ignore all errors; abort - to cancel execution in case of an error.
/exitcodes Returns the list of possible exit codes that can be returned by the command-line process.
/outputfile Usage: /outputfile:<filepath>
Specifies the destination file, or directory for multiple export. The option is unavailable for the ODBC format.
/outputtable Usage: /outputtable:<tablename>
Specifies the destination table name. The option is available for the SQL, ODBC and Access formats.
/password Usage: /password:<pw>
Specifies the server password. Overrides the password specified in the connection string.
/range Usage: /range all|<start:<startfrom> length:<count>>
Specifies the range of exported rows.
all - allows exporting all rows; start:<startfrom> - allows specifying the row’s number to start exporting from; length:<count> - allows specifying the quantity of rows for export.
/singlefile Usage: /singlefile:file name
Specifies that all data has to be exported into a single file, even if there are several source tables.
/table Usage: /table <tablename> [<tablename>]
Specifies the source table name. Several tables can be specified.
/templatefile Usage: /templatefile:<filepath>
Specifies the template file.

Worked Examples

Configure data export with settings specified in the template file.

/dataexport /templatefile:"C:\Users\UserName\Documents\dbForge Data Pump for SQL Server\Export\sample_template.det"

Configure data export from several tables into a single file. Connection and tables are overridden and do not match with the template.

/dataexport /templatefile:"D:\Export_CSV.det" /connection:"Data Source=SQL_SERVER;Initial Catalog=TEST_DB;User ID=USER_NAME;Password=PASS" /table HumanResources.Employee HumanResources.Mapping /singlefile:"D:\expdata.csv"

Configure the export of 10 records with overriding the file save path. The “Ignore all errors” error processing mode is enabled.

/dataexport /templatefile:"D:\Export_CSV.det" /range  start:100  length:10 /outputfile:"D:\Sales_OrderTracking.csv" /errormode:ignore

The full command may look like as follows:

"C:\Program Files\Devart\dbForge SQL Tools Professional\dbForge Data Pump for SQL Server\datapump.com" /dataexport /templatefile:"C:\Users\UserName\Documents\dbForge Data Pump for SQL Server\Export\sample_template.det"