The /dataexport command exports data from a file. To export data from the command line, you need to pre-configure a template file (.det) that stores all export 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 /dataexport [/option_name1[:value | [parameter1:value parameter2:value ..]] /option_name2 ..]
Note
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:
- As a standalone tool
C:\Program Files\Devart\dbForge Studio for SQL Server
- As part of the dbForge Edge bundle
C:\Program Files\Devart\dbForge Edge\dbForge Studio for SQL Server
To view command-line switches for /dataexport, run the following command:
dbforgesql.com /dataexport /?
/templatefile switch./dataexport /templatefile:"<file_path>"
dbforgesql.com /dataexport /templatefile:"D:\ExportTemplate.det" /connection:"Data Source=demo-mssql\SQL2025;Encrypt=False;Integrated Security=False;User ID=sa" /table dbo.Employees dbo.Customers /range start:1 length:0 /errormode:abort
For the complete list of switches, see Command-line switches.
/dataexport /templatefile:"D:\Export_CSV.det"
/dataexport /templatefile:"D:\Export_CSV.det" /connection:"Data Source=<server_name>;Initial Catalog=<database_name>;User ID=admin" /password:admin /table table1 table2 /singlefile:true /outputfile:"D:\export_output.csv"
/dataexport /templatefile:"D:\Export_CSV.det" /range start:100 length:10 /outputfile:"D:\export_output.csv" /errormode:ignore
/dataexport /templatefile:"D:\Export_SQL.det" /outputtable:new_table /outputfile:"D:\export_output.sql"