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

/dataimport [/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 /dataimport /?

Available command-line switches

Switch Usage and Action
/connection Usage: /connection:<connection_string>
Specifies the connection string.
/create Usage: /create
If specified, a new table to import the data to will be created.
/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.
/inputfile Usage: /inputfile:<filepath>
Specifies the file with data that you want to import. The option is unavailable for the ODBC format.
/inputtable Usage: /inputtable:<tablename>
Specifies a table or view to import the data from. The option is available for the Access and ODBC formats.
/password Usage: /password:<pw>
Specifies the server password. Overrides the password specified in the connection string.
/table Usage: /table:<tablename>
Specifies the target table (the one you want to insert the imported data into).
/templatefile Usage: /templatefile:<filepath>
Specifies the template file.
/treatwarningaserror Usage: /treatWarningAsError:[Yes|No]
Yes: Treat all warnings as errors and further behavior is determined by the errormode option.
No: Do not consider all warnings as errors and execute with warning messages.

Worked Examples

Configure data import with settings specified in the template file.

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

Configure data import using the template file and override a connection specified in the template.

/dataimport /templatefile:"D:\TXT.dit" /connection:"Data Source=SQL_SERVER;Initial Catalog=TEST_DB;User ID=USER_NAME;Password=PASS" /table HumanResources.Department_copy

Configure data import with a new table creation

/dataimport /templatefile:"D:\TXT.dit" /table HumanResources.Department_copy /create

The full command may look like as follows:

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