This topic gives a detailed description of command-line switches and examples of their usage.
To view command-line switches for /execute, run the following command:
dbforgesql.com /execute /?
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 ServerAs part of the dbForge Edge bundle
C:\Program Files\Devart\dbForge Edge\dbForge Studio for SQL Server
All switches available for this option are listed below, along with usage examples.
| Name | Description |
|---|---|
/connection |
Specifies the connection string. Example: dbforgesql.com /execute /connection:"User Id=your_username;Server=your_server_nameUsage: /connection:<connection_string> |
/database |
Executes the script against a specific database. Databases inside the script are ignored. Fully qualified object names are not affected. Usage: /database:<database_name> |
/encoding |
Specifies the encoding for opening and executing the script. Usage: /encoding:<codepage|encoding name> |
/errormode |
Specifies the application’s behavior when an error occurs:
Usage: /errormode:<ignore|abort> |
/exitcodes |
Displays the list of exit codes that can be returned by the command-line process. Usage: /exitcodes |
/inputfile |
Specifies the .sql or .zip file containing the script to execute. Usage: /inputfile:<file_path> |
/password |
Specifies the server password and overrides the values specified in the /connection parameter. Usage: /password:<pw> |
/treatwarningaserror |
Specifies how to treat warnings:
Usagea: /treatWarningAsError:[Yes|No] |
/zippassword |
Specifies the password for the protected archive. Usage: /zippassword:<zip password> |
For more examples, see Execute SQL scripts from the command line.