The /dataimport command imports data from a table or a view into an existing or new table or view. To import data from the command line, you need to pre-configure a template file (.dit) that stores all import settings.
Note
The template file doesn’t contain a password for security purposes. If you selected the Allow saving password option when creating a connection in dbForge Studio, no further action is required. If you didn’t save the password, you must specify it using the
/passwordswitch.
Warning
Parameter values specified directly in the command line override values in the template file.
dbforgesql.com /dataimport [/option_name1[:value | [parameter1:value parameter2:value ..]] /option_name2 ..]
To view command-line switches for /dataimport, run the following command:
dbforgesql.com /dataimport /?
To run dbForge Studio CLI commands, open Command Prompt and navigate to the folder that contains dbforgesql.com. The default path to this executable depends on where dbForge Studio for SQL Server is installed. If you installed dbForge Studio:
"C:\Program Files\Devart\dbForge Studio for SQL Server"
"C:\Program Files\Devart\dbForge Edge\dbForge Studio for SQL Server"
To run data import using the settings specified in the template file (.dit), use the /templatefile switch.
/dataimport /templatefile:"<file_path>"
dbforgesql.com /dataimport /templatefile:"D:\ImportTemplate.dit" /connection:"Data Source=demo-mssql\SQL2025;Encrypt=False;Integrated Security=False;User ID=sa;Password=password" /inputfile:"D:\Production.Product.csv" /table:"AdventureWorks2025.Production.Product" /errormode:abort
For the complete list of switches, see Command-line switches.
/dataimport /templatefile:"D:\Import.dit"
/dataimport /templatefile:"D:\Import.dit" /connection:"Data Source=<server_name>;Initial Catalog=<database_name>;User ID=admin" /password:admin /table table_name
/dataimport /templatefile:"D:\Import.dit" /inputfile:"D:\Import.txt" /table:table_new /create /errormode:ignore
/dataimport /templatefile:"D:\Import.dit" /inputtable:table1 /table:table_new /create