You can automate code formatting using the command line.
The command line functionality is available only in certain editions of dbForge Studio. For the detailed information on features availability in the dbForge Studio editions, please refer to the Editions list on our site.
Type cmd in the Search programs and files text box and press the ENTER button.
To run the Command Line in Windows 8:
From the Desktop Mode
- Move the mouse cursor to the exact lower left corner until the desktop shortcuts menu appears.
- Right-click to see the shortcut menu and than click Run.
From the Charms Bar
- Move your mouse to the upper right corner until the Charms Bar appears.
- Select Apps from the list and type run in the search box.
- Click Run from the search results.
Use Windows + R Shortcut Keys
- In desktop mode, press the Windows + R keys, to show the Run command line.
C:\Program Files\Devart\dbForge Studio for Oracle\dbforgeoracle.com
dbforgeoracle.com /formatsql [/switch1[:value | [parameter1:value parameter2:value ..]] /switch2 ..]
Tip: To see a quick help on the arguments available in the command line, type the following:
You can set the unlimited quantity of the required extensions:</br> dbforgeoracle.com /formatsql /sourcefolder:”c:" /filextension:.sql /filextension:.prg /filextension:*.db1
Select corresponding command line switches to perform the required operations:
|Argument||Action and Usage|
|/connection||This switch is used to specify a connection string. Command usage looks like:
|/encoding||This switch is used to specify the encoding which should be applied to open and save files. Command usage looks like:
|/filextension||This switch is used to specify the extension of the source folder files that will be formatted. The .sql extension is selected by default. Command usage looks like:
|/log||This switch is used to generate a formatting log file in the specified directory. Command usage looks like:
|/outputfile||This switch is used to specify the path to an output file where formatting results of the source file will be saved (in this case, the source file is saved without changing). If the parameter is not specified, the formatting results will be saved in the source file. Command usage looks like:
|/outputfolder||This switch is used to specify the path to an output folder where the source folder files with formatting results will be saved (files from the source folder will not be changed). If the parameter is not specified, the formatting results will be saved in the source folder. Command usage looks like:
|/password||This switch is used to specify a server password. It overrides the password specified in the connection string. Command usage looks like:
|/profile||This switch is used to specify the path to a file that contains settings for formatting options. If the parameter is not specified, the default settings will be applied to the formatting options. Command usage looks like:
|/sourcefile||This switch is used to specify the source SQL file to be formatted. Command usage looks like:
|/sourcefolder||This switch is used to specify the path to a folder where the files for formatting are located. Command usage looks like:
|/includesubfolders||This switch is used to include the current directory and all subdirectories in the search operation. Command usage looks like: