dbForge Studio for SQL Server provides a command-line interface (CLI) that allows you to automate and schedule data export tasks without using the graphical user interface.
The command-line interface is available in the Professional and Enterprise editions of dbForge Studio for SQL Server.
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:
cd C:\Program Files\Devart\dbForge Studio for SQL Server
cd C:\Program Files\Devart\dbForge Edge\dbForge Studio for SQL Server
The /dataexport command initiates data export from tables or views using the command line.
dbforgesql.com /dataexport [/option_name1[:value | [parameter1:value parameter2:value ..]] /option_name2 ..]
The following command enables you to view the switches available for /dataexport.
dbforgesql.com /dataexport /?
For the complete list of switches, see Command-line switches.
You can specify the required arguments directly in the command line.
dbforgesql.com /dataexport /connection:"Data Source=<server_name>;Initial Catalog=<database_name>;User ID=<user_name>" /password:yourPassword /table <table_name>
Alternatively, you can define data export settings in a template file (.det), which the command references when running the script.
dbforgesql.com /dataexport /templatefile:"D:\DataExportTemplate.det"
where:
/templatefile:"D:\DataExportTemplate.det" – The full path to a template file (.det).For detailed automation scenarios, see:
The /dataexport command returns exit codes that indicate the operation status.
For the complete list of exit codes, see Command-line exit codes.
dbForge Studio provides a built-in command-line wizard that helps you generate reusable command-line commands based on actions configured in the graphical user interface.
Instead of writing command-line syntax manually, you can configure data export settings in the command-line wizard. The wizard then generates the corresponding command-line syntax, which you can review, edit, and save as a .bat file for reuse or scheduling.
