This topic gives a detailed description of command-line switches and examples of their usage.
To view command-line switches for /formatsql, run the following command:
dbforgesql.com /formatsql /?
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
| Name | Usage | Description |
|---|---|---|
/connection |
/connection:<connection_string> |
Specifies the database connection string. |
/encoding |
/encoding:<codepage|encoding_name> |
Specifies the encoding to use when opening and saving files. |
/errormode |
/errormode:<ignore|abort> |
Specifies the application’s behavior when an error occurs:
|
/exitcodes |
/exitcodes |
Lists exit codes returned by the command. For more information, see Exit codes used in the command line. |
/fileextension |
/fileextension:*.<sql|prc|txt|...> |
Specifies the extension of the source folder files to format. The default value is .sql. |
/includesubfolders |
/includesubfolders |
Includes the current folder and its subfolders in the formatting operation. |
/log |
/log:<file_path> |
Specifies the full path to the log file. |
/outputfile |
/outputfile:<file_path> |
Specifies the full path to the resulting formatted file. The source file remains unchanged. If not specified, the formatting results overwrite the source file. |
/outputfolder |
/outputfolder:<folder_path> |
Specifies the path to the folder for the resulting formatted files. Files from the source folder remain unchanged. If not specified, the formatting results overwrite the source folder files. |
/password |
/password:<password> |
Specifies the server password. Overrides the password in the connection string. |
/profile |
/profile:<path>|<profile_name> |
Specifies the full path to the file that contains formatting settings or the name of a predefined profile. If not specified, default formatting settings are applied. |
/sourcefile |
/sourcefile:<path> |
Specifies the full path to the file to format. |
/sourcefolder |
/sourcefolder:<path> |
Specifies the path to the folder that contains files to format. |
/treatwarningaserror |
/treatwarningaserror:[Yes|No] |
Specifies how to treat warnings:
|
For more examples, see Format code from the command line.