35. Options dialog
Prev |  | Next

## 35. Options dialog

The options dialog enables you to influence the behavior and look of SQL Workbench/J to meet your needs. To open the options dialog choose Tools → Options.

### 35.1. General options

#### Language

> With this option you can select in which language the application is shown. The new value will only be in affect when you restart the application.

#### Check for updates

> With this option you can enable an automatic update check when SQL Workbench/J is started. You can define the interval in days after which the application should check for updates on the home page. If a newer version is found on the web site this will be indicated with a little globe in the statusbar. Clicking on the icon will open your default internet browser with the application's home page.

> If you disable this option, you can manually check for updates using the menu Help → Check for updates....

> When SQL Workbench/J performs an update check, it sends the following information as part of the request to the server:

> - The version of SQL Workbench/J you are using
> - Whether the check was an automatic check or a manual one
> - The interface language selected
> - The operating system as reported by your Java installation
> - The Java version you are using

#### Show connect dialog

> If this option is enabled, the connect dialog will be shown automatically when the application is started.

#### Master password

> After providing a master password, all passwords in the connection profiles are encrypted using the master password. Once the master password is set, it is necessary to enter it, whenever SQL Workbench/J is started.

> If the master password is lost or forgotten, it's impossible to restore the original database passwords.

#### Exit on first connect cancel

> If this option is enabled, then the application is closed completely if the initial connect dialog is canceled.

> This option is only valid if "Show connect dialog" is selected.

#### Consolidate script log

> Usually SQL Workbench/J reports the success and timings for each statement that is being executed in the message tab of the current SQL panel. For large scripts this can slow down script execution dramatically. If this option is enabled, only a summary of the execution is printed once the script has finished. You can turn off the log during script execution by using the WBFEEDBACK command.

#### Auto-save connection profiles

> If this option is enabled, the connection profiles are automatically saved when closing the connection dialog using the OK button.

> If this option is disabled, the connection profiles are saved when closing the application.

#### Single page HTML help

> If this option is enabled, the HTML help will be shown as a single page in the browser instead of one page per chapter.

#### Quick filter for profiles

> If this option is enabled, an input field to filter the profiles is displayed above the list of profiles.

#### Set focus to quick filter

> If this option is enabled, the initial focus will be put into the quick filter input field after opening the connection dialog.

#### Separate variables per window

> Controles the visibility of variables if more than one main window is opened. See Scope of variables for more details.

#### Restore expanded profile groups

> If this option is enabled, the state of the expanced and opened profile groups is restored when the application is started.

#### Confirm tab close

> If this option is enabled, closing a tab needs to be confirmed, to prevent accidental closing.

#### Confirm closing multiple tabs

> If this option is enabled, a confirmation is required when closing multiple tabs using the option "Close other tabs".

#### Show tab index

> If this option is enabled, each editor tab will be shown with its index. You can then select the first 9 tabs by pressing Ctrl-1, Ctrl-2 and so on.

#### Scroll tabs

> This option controls the behavior of the tab display, if more tabs are opened than can be displayed in the current width of the window.

> If this option is enabled, the tabs are always displayed in a single row. If too many tabs are open, the row can be scrolled to the display the tabs that are not visible.

> If this option is disabled, the tabs are displayed in multiple rows, so that all tabs are always visible.

#### Enable animated icons

> Enable or disable the use of an animated icons in the SQL editor to indicate a running SQL statement. It has been reported, that the animated icon does have a severe (negative) impact on the performance on some computers (depending on JDK/OS/Graphics driver). If you experience a high CPU usage during the execution of SQL statements, or if you find your SQL statements are running very slow, try to turn off the usage of the animated icons.

#### Configuration file information

> At the bottom of the "General options" page, the full filename of the configuration file and the log file are listed.

### 35.2. Editor options

#### Line ending for DBMS

> This property controls the line terminator used by the editor when sending SQL statements to the database. The value "Platform default" relates to the platform where you run SQL Workbench/J this is not the platform of the DBMS server.

> The editor always uses "unix" line ending internally. If you select a different value for this property, SQL Workbench/J will convert the SQL statements to use the desired line ending before sending them to the DBMS. As this can slow down the execution of statements, it is highly recommended to leave the default setting of Unix line endings. You should only change this, if your DBMS does not understand the single linefeed character (ASCII value 10) properly.

#### File format

> This property controls the line terminator used when a file is saved by the editor. Changing this property affects the next save operation.

#### History size

> The number of statements per tab which should be stored in the statement history. Remember that always the full text of the editor (together with the selection and cursor information) is stored in the history. If you have large amounts of text in the editor and set this number quite high, be aware of the memory consumption this might create.

#### Files in history

> If this option is enabled, the content of external files is also stored in the statement history.

#### Electric scroll

> Electric scrolling is the automatic scrolling of the editor when clicking into lines close to the upper or lower end of the editor window. If you click inside the defined number of lines at the upper or lower end, then the editor will scroll this line into the center of the visible area. The default is set to 3, which means that if you click into (visible) line 1,2 or 3 of the editor, this line will be centered in the display.

#### Editor tab width

> The number of spaces that are assumed for the `TAB` character.

#### Additional word characters

> The editor recognizes character sequences that consist of letters and characters only as "words". This influences the way word by word jumping is done, or when selecting text using a doubleclick. Every character that is entered for this option is considered a "word" character and thus does not mark a word boundary.

> By putting e.g. an underscore into this field, the text `MY_TABLE` is recognized as a single word instead of two words (which is the default).

#### Insert closing brackets for

> To enable auto-completion of brackets, enter pairs of characters that should automatically be "closed", e.g. `()''` will automatically insert a closing bracket when an opening bracket is typed. To auto-complete quote characters enter two quotes.

> To disable automatic closing of brackets enter nothing in this input field.

#### Right click moves cursor

> Normally a right click in the SQL editor does not change the location of the cursor (caret). If this option is checked, then a right click will also change the caret's location (to where the mouse cursor is located)

#### Store last directory in workspace

> If this option is enabled, the directory from the last opened file is stored in the workspace of the current profile, not globally. If this option is unchecked, the last directory will be stored globally and will be used for all connections.

#### Current directory follows active file

> If this option is enabled, the file open dialog will default to the directory of the current file in the editor. If no file is loaded in the editor, the directory that is defined through the "Default directory" option will be selected.

### 35.3. SQL Excecution options

#### Error prompt for scripts

> This options defines what kind of dialog is shown when an error occurs during script execution. The dialog always offers the choice to ignore the error, ignore all subsequent errors or to cancel the script execution.

> The following options are available:

> - Simple prompt - it shows only the statement number that failed.
> - Include error message - this includes the actual error message from the DBMS (this is the default)
> - Show statement and allow retry - this includes the error message and the complete SQL statement that failed. It allows to edit and re-submit the statement.

#### Alternate Delimiter

> This options defines the default alternate delimiter. You can override this default in the connection profile, to use different delimiters for different DBMS. For details see using the alternate delimiter

#### Highlight current statement

> When running several statements (e.g. by using "Execute all") this option will highlight the current statement. The editor will be scrolled to make sure the currently executed statement is visible.

#### Retain current statement highlight

> If "Highlight current statement" is enabled and this option is turned on, the highlighting will be kept once execution has finished.

#### Highlight errors

> If "Highlight errors" is enabled then the statement that generated an error is highlighted after execution.

#### Always allow "Execute Selected"

> If this option is turned off, then SQL → Execute Selected will only work if text is selected in the editor. If this option is turned on and no text is selected, the complete content of the editor will be executed.

#### Auto advance to next statement

> If this option is enabled, then the cursor will automatically jump to the next statement in the script, when you execute a single statement using Ctrl-Enter ("Run current statement"). This can also be toggled through the menu SQL → Settings → Auto advance to next

> For more information on how you can execute statements in the editor, please refer to Executing Statements

#### Allow editing while executing

> When running a statement, the editor is set to read-only in order to allow a consistent statement highlighting. When this option is turned on, the text in the editor may be modified even if a statement is running. If the text in the editor is modified during execution, statement and error highlighting will not be done any more.

#### Allow empty lines as statement delimiter

> When analysing statements in the editor, it is assumed that individual statements are separated with a semicolon. This property controls if an empty line delimits a statement as well. This setting will be used to detect the current statement for auto-completion and when using Execute current inside the editor.

> This does not influence the behavior when running scripts in batch mode or when using the `WbInclude` command.

#### Use the statement in the current line

> When this option is enabled, the line of the cursor position determines the "current statement" rather than the cursor position itself when using Execute current.

### 35.4. Macro options

#### Macro expansion key

> This defines the key combination that triggers the detection of expandable macros.

#### Save window settings in workspace

> If this option is enabled, the current position and the expaned macro groups of the macro popup window are stored in the current workspace. It this option is disabled, these settings are saved globally.

#### Close window with ESC

> If this option is enabled the macro popup window can be closed using the ESC key.

#### Execute macro with Enter

> If this option is enabled the currently selected macro can be run by hitting the Enter key.

#### Macrolist position

> This option controls where the list of macros will be displayed, if Macros → Macro list is selected. The possible posititons are:

> - Floating - the macro list will be shown as a popup window
> - Left - the macro list will be in a panel on the left side inside the main window
> - Right - the macro list will be in a panel on the right side inside the main window

#### Base directory

> If a set of macros is specified for a connection profile with a relative filename, the macros will be loaded relative to this base directory.

### 35.5. Bookmark options

#### Also use @WbResult for bookmarks

> By default only locations marked with `@WbTag` are included in the list of bookmarks. When this option is enabled, locations that are marked with `@WbResult` are also included in the bookmark list.

#### Use procedure/function names as bookmarks

> If this is enabled SQL Workbench/J will also the names of procedures or functions for which a `CREATE` statement is present in the editor as a bookmark.

#### Include parameter names for procedures and functions

> When including procedure and function names in the bookmarks, only the datatype of the parameters are shown in the bookmark list. If this option is enabled the parameter names (if available) are also shown.

#### Remember column widths

> If this is enabled, the width of the columns in the bookmark window is not resized to match the displayed value, but rather the last with is remembered.

#### Remember sort order

> If this is enabled, the sort order of the bookmark list is restored the next time the bookmark window is displayed.

### 35.6. Editor colors

#### Current line color

> If you want to highlight the line in which the cursor is located, specify the color for the highlighting. To disable the highlight for the current line, simply "remove" the color selection by clicking on the remove button.

#### Selected text

> The color that is used to highlight selected text.

#### Error highlight color

> When a statement is not executed correctly (and the DBMS signals an error) it is highlighted in the editor. With this option you can select the color that is used to highlight the incorrect statement.

#### Syntax highlighting colors

> You can change the colors for the different types of keywords in the editor.

### 35.7. Font settings

#### Editor font

> The font that is used in the SQL editor. This font is also used when displaying the SQL source for tables and other database objects in the DbExplorer.

#### Data font

> The font that is used to display result sets. This includes the object list and results in the DbExplorer.

#### Message font

> The font that is used in the message pane of the SQL window.

#### Standard font

> The standard font that is used for menus, lables, buttons etc.

### 35.8. Auto-completion options

#### Paste completion in

> With this option you can select how the selected object name from the code completion popup is pasted into the editor. `As is` means, that the values will be inserted into the editor as it was retrieved from the database. This option will also be used when SQL statements are generated internally (e.g. for updating the result set or when you export/copy data as SQL statements)

#### Sort pasted columns by

> When selecting to paste all (or several columns) from the popup window, you can select with this option, in which order the columns should be written into the editor.

#### Close completion with search

> When using the quicksearch feature in the code completion this option controls the behavior when hitting the ESC key. If this option is enabled, the ESC key will also close the popup window with the available choices. If this option is disabled, the ESC key will only close the quicksearch input field.

#### Sort entries in popup

> If this is enabled, columns are sorted alphabetically in the popup. If not, they are listed in the order as they are returned by the the database.

#### Quick search matches anywhere

> If this option is enabled, the typed characters match anywhere in the object name. If this option is disabled, the object name must start with the entered search value.

#### Filter by quicksearch

> When this option is enabled, only those entries are shown in the popup that match the entered values in the quick search.

#### Prefer USING operator

> If this option is enabled, the JOIN completion generates a `USING` clause instead of an `ON` clause to join the tables. If there are no columns with identical names, a join with an `ON` operator is generated.

#### Always use parentheses

> If this option is enabled, JOIN completion will generated redundant parentheses around the join condition for the `ON` operator.

### 35.9. Workspace options

#### Save workspace before running SQL statements

> If this option is enabled, the current workspace is saved each time you run a SQL statement.

> If this option is disabled, the workspace is only saved when the application is closed, when a a different workspace is loaded (either manually or by connecting to a different connection profile) or when the workspace is manually saved through the menu using Workspace → Save Workspace

> If automatic backups of the workspace is enabled, this means that a new version of the workspace file is created each time a statement is executed. In that case the number of backups should be high enough so that also substantial changes to the workspace are still kept in the history.

#### Save interval in minutes

> The workspace is automatically saved after the specified number of minutes. An empty value or a value of zero disables this.

#### Base directory

> If workspaces are specified as relative files or directories in the connection profile they are searched relative to this base directory.

#### Remember open files in workspace

> You can customize how external files (that have been loaded using File → Open) are remembered in the workspace. You can select three different options:

> Content and filename | When this option is selected, the filename that is loaded in the editor tab will be stored in the workspace. The next time the workspace is loaded the file is opened as well. This is the default setting
> Content only | When this option is selected, only the content of the editor tab is save (just like any other editor tab), but the link to the filename is removed. The next time the workspace is loaded, the file will not be opened.
> Nothing | Neither the content, nor the filename will be saved. The next time th workspace is loaded, the editor tab will be empty.

### 35.10. Backup options

If an automatic backup is enabled for a file, then each time a file is saved, a new version of the file will be created in the backup directory if Number of backups is greater than 1.

A file version will be created by appending a version number to the file name (e.g. `testdata.wksp.1`, `testdata.wksp.2` and so on). The most recent version is the one with the highest number.

#### Create backups of workspace files

> If this option is enabled the current workspace file will be backed up.

#### Create backups of the settings file

> If this option is enabled, the settings file will be backed up.

#### Create backups of the macro file

> If this option is enabled, the file that contains macro definitions will be backed up.

#### Create backups of the connection profiles

> If this option is enabled, the file that contains connection profiles will be backed up.

#### Create backups of the driver definitions

> If this option is enabled, the file that contains JDBC drivers will be backed up.

#### Number of backups

> This option defines the maximum number of version to keep if backups are enabled.

#### Backup directory

> By default the backups for the workspaces are stored in the same directory as the workspace file itself. If you want to keep the (versioned) backups in a separate directory, you can specify it here.

> If you specify a relative directory, it will be relative to the config directory.

### 35.11. Options for displaying data

#### Show selection summary in statusbar

> If this option is enabled the number of selected rows in the result will be displayed in the status bar.

> If you have a single numeric column selected (by holding down the Alt key while selecting with the mouse), the status bar will display the sum of the selected values.

#### Use table name for result tabs

> If this option is enabled, the name of a result tab is derived from the `SELECT` that was used to generate the result. The query is analyzed and the first table name mentioned in the `FROM` clause will be used for the name of the result.

> The table name will not be used when the `@WbResult` annotation is also specified for the query.

#### Retrieve column remarks for queries

> If this option is enabled, the remarks defined for table columns in a result set are retrieved and shown as a tool tip. As this requires additional overhead after processing a query, it can be disabled for performance reasons.

#### Show max. rows warning

> If this option is enabled the result tab will show a warning sign if the limit defined by the max. rows setting is reached, indicating that the result might be incomplete.

#### Show row numbers

> If this option is enabled the row numbers for result sets are shown at the left hand side of the result.

#### Show tooltip warning

> If this option is enabled, a tooltip indicating that the maximum number of rows has been reached is shown for the result tab.

#### Default max. Rows

> When adding a SQL panel, this number will be used as a default for the max. rows value for the new panel.

#### Display SQL query

> If this option is enabled, the query that generated a result is shown right above the result grid.

#### `NULL` string

> The specified value will be displayed instead of `NULL` values in the result of a SQL statement.

#### Append results

> This option defines the default behavior for appending results when a new editor tab is opened.

#### Number alignment

> This controls the alignment of numbers in the result grid.

#### Result tab tooltip

> This options configures the tooltip that is shown when the mouse is hovering over a result tab.

#### Sort Locale

> When you sort the result set, characters values will be sorted case-sensitive by default. This is caused by the `compareTo()` method available in the Java environment which puts lower case characters in front of upper case characters when sorting. With the "Sort Locale" option you can select which language rules should be applied while sorting. Note that sorting with a locale is slower than using the "Default" setting.

#### 35.11.1. Column header settings

##### Show data type in header

> If this option is enabled, the data type (as returned by the JDBC driver) of each column is shown in the header below the column name.

##### Bold header

> If this option is enabled, the name of the columns in the result is shown with a bold font, instead of the regular data font.

##### Show remarks in header

> If this option is enabled, the column remarks are shown in the header. This requires that Retrieve column remarks for queries is enabled

##### Show table name in header

> If this option is enabled, the table to which a column belongs to is shown in the header.

> This option depends on the JDBC driver. If the JDBC driver does not return this information nothing will be displayed.

##### Show as column prefix

> By default, the the table name for a column is displayed below the column name. When this option is enabled, it will be shown as part of the column name, e.g. `person.firstname`.

#### 35.11.2. Column width settings

##### Automatically adjust column widths

> If this option is enabled, the widths of the result set columns are automatically adjusted to fit the largest value (respecting the min. and max. size settings) after retrieving data. Note that you can manually optimize the column widths using View → Optimize width for all columns.

##### Adjust to column headers

> When calculating the optimal width for a column (either manually or if "Auto adjust column widths" is enabled, then the column's label will be included in the width calculation if this option is enabled. If this option is disabled, and the column contains very short values, the column width could be smaller than the column's label.

> This option is also used when manually optimizing the column width,

##### Max. column width

> When the initial display size of a column is calculated, or if you optimize the column widths to fit the actual data, columns will not exceed this width. This is useful when displaying large character columns.

##### Min. column width

> When the initial display size of a column is calculated, or if you optimize the column widths to fit the actual data, columns will not exceed this width.

#### Displaying multi-line values

> SQL Workbench/J uses a special display component for the contents of `CLOB` columns that is capable of displaying multiple lines. This component honors newlines and linefeeds in the data retrieved from the database and is capable of using word wrapping for long lines (even if no newlines are embedded).

> By default only `CLOB` are considered to be able to contain multiple lines, so `VARCHAR` columns are usually not treated as multi-line columns. If your database stores text in VARCHAR columns that contains line breaks, you can define a threshold for the length of the column. Any column that is defined with a higher value will be displayed with the multiline component.

> The default value of 250 means that a `VARCHAR(250)` column will be displayed with the multi line renderer. A `VARCHAR(210)` will be displayed in a single line. Note that this limit refers to the defined length of the column, not the actual length of the data.

> Displaying data using the multi line component is slower than using the standard (single line) component.

> The feature Adjust row height only works with multi-line columns.

#### 35.11.3. Row height settings

##### Automatically adjust row height

> If this option is enabled, the height of each column is automatically adjusted after data retrieval to display as many lines of the column values (for character columns) as possible. Note that you can manually optimize the row height using View → Optimize row height.

> Not every (character) column is displayed in a manner that multiple lines will be displayed. The default setting is to always display `CLOB` columns as multi line. `VARCHAR` (and `CHAR`) columns will only be displayed in multi line mode if they can hold more than 250 characters. This limit can be changed.

> This can be enabled for a single query using the `@WbOptimizeRowHeight` annotation.

##### Allow row height resizing

> If this option is enabled, you can manually adjust the height of each row using the mouse. This option does not need to be enabled in order to (automatically) optimize the row height.

##### Max. number of lines

> When calculating the optimal height for each row, the number of lines defined with this option will never be exceeded.

### 35.12. Options for formatting data

#### Date, timestamp and time formats

> Define the format for displaying date, date/time (timestamp) and time columns in the result set. For more details on the format of this option, please refer to the documentation of the `DateTimeFormatter` class. This format is also used when parsing input for date or timestamp fields, so if you enter a date while editing the data, make sure you enter it the same way as defined with this option.

> Here is an overview of the letters and their meaning that can be used to format the date and timestamp values. Be aware that case matters!

> Letter | Description
> --- | ---
> G | Era designator (Text, e.g. AD)
> y | Year (Number)
> M | Month in year (Number)
> w | Week in year (Number)
> W | Week in month (Number)
> D | Day in year (Number)
> d | Day in month (Number)
> F | Day of week in month (Number)
> E | Day in week (Text)
> a | AM/PM marker
> H | Hour in day (0-23)
> k | Hour in day (1-24)
> K | Hour in am/pm (0-11)
> h | Hour in am/pm (1-12)
> m | Minute in hour
> s | Second in minute
> S | Milliseconds
> z | General time zone (e.g. Pacific Standard Time; PST; GMT-08:00)
> Z | RFC 822 time zone (e.g. -0800)
> V | Time zone ID, e.g. Asia/Saigon

> Optional elements can be enclosed in square brackets, e.g. `[ Z]` to display time zone information if available. As the format for timestamps is also used for timestamps with a time zone it's recommended to define the time zone display as optional. This is especially important as the format is also used to parse manual input and is used for both `TIMESTAMP` values and `TIMESTAMP WITH TIME ZONE` values.

#### Oracle `DATE` as `TIMESTAMP`

> The Oracle `DATE` datatype includes the time as well. But the JDBC driver does not retrieve the time part of a DATE column, so when retrieving `DATE` values, this would remove the time stored in the database. If this option is enabled, SQL Workbench/J will treat Oracle's `DATE` columns as `TIMESTAMP` columns, thus preserving the time information.

> Note that the Oracle 12.x drivers don't allow to switch this off. If if this parameter is unchecked the Oracle 12.x driver will return values from `DATE` columns as timestamps.

#### Decimal symbol

> The character which is used as the decimal separator when displaying numbers.

#### Group separator

> The character to be used to separate groups inside a number. This is only used when a format string is specified, that includes the placeholder for the group character.

#### Decimal digits

> Define the maximum number of digits which will be displayed for numeric columns. This only affects the display of the number, not the storage or retrieval. Internally they are still stored as the DBMS returned them. To see the internal value, leave the mouse cursor over the cell. The tool tip which is displayed will contain the number as it was returned by the JDBC driver. When exporting data or copying it to the clipboard, the real value will be used.

> If this value is set to 0 (zero) values will be display with as many digits as available.

#### Decimal/Integer format

> Define the format for displaying integers or numbers with decimals. For details on the format of this option, please refer to the documentation of the `DecimalFormat` class.

> If a format string is defined, the "Decimal digits" option will not be used. The number of decimal digits has to be controlled through the format string in that case.

> Here is an overview of the characters that can be used to format numbers:

> Character | Description
> --- | ---
> 0 (zero) | Digit, a zero is shown as a zero
> # | Digit, zeroes are suppressed
> . | Marks the position where the decimal separator should be displayed
> , | Marks the position where the grouping symbol should be displayed

### 35.13. Data display colors

#### Alternate row colors

> If this color is defined, the rows in the data table will be displayed with alternating background color.

#### Color for `NULL` values

> If a color is defined, NULL values will be highlighted with the selected colors in the result set.

### 35.14. Options for data editing

#### Confirm result set updates

> When this option is enabled, the statements which are sent to the database when saving changes to result set table, are displayed before execution. The update can be cancelled at that point if the statements are not correct. The generated statements can also be saved to a file from that window.

> The statement(s) that are displayed in the confirmation window can not be changed!

#### Confirm discarding changed results

> When running a statement that would replace a result that has changes that are not saved to the database, you will be prompted whether you want to cancel the current operation that would discard those changes.

> This applies to statements run in the editor, as well as to changes done in the Data tab of the DbExplorer.

> You will not be prompted when running statements in the editor, when the option Append results is enabled.

#### Highlight required fields

> When editing data either in the result set or in the data tab of the DbExplorer, fields that are set to `NOT NULL` in the underlying table, will be displayed with a different background color if this option is selected.

#### Color for required fields

> If required fields are highlighted during editing, this option defines the background color that is used.

#### Default PK Map

> This property defines a mapping file for primary key columns. The information from that file is read whenever the primary keys for a table of cannot be obtained from the database. For a detailed description on how to define extra primary key columns, please refer to the `WbDefinePk` command.

#### Single record dialog

> When displaying data in the Single record dialog you can customize the width for the input fields, and the default height for multiline columns.

### 35.15. DbExplorer options

#### 35.15.1. General options

##### DB Explorer as Tab

> The Database Explorer can either be displayed as a separate window or inside the main window as a another tab. If this option is selected, the Db Explorer will be displayed inside the main window. If the option Retrieve DB Explorer is checked as well, the current database scheme will be retrieved upon starting SQL Workbench/J

##### Automatically retrieve dependency tree

> If this option is enabled, the tree display in the "References" and "Referenced by" tabs will automatically be loaded when the list of foreign keys is loaded. If this option is disabled, loading of the tree display must be started manually by clicking on the "reload" button.

##### Show trigger panel

> By default triggers are shown only in the details of a table. If the option "Show trigger panel" is selected, an additional panel will be displayed in the DbExplorer that displays all triggers in the database independently of their table.

##### Focus to data panel

> When this option is selected, the focus inside the DbExplorer will be set to the data panel, after an object in the list has been selected and the data panel is visible.

##### Focus to source panel

> When this option is selected, the focus inside the DbExplorer will be set to the object's source panel, after an object in the list has been selected and the source panel is visible.

##### Show focus

> When this option is selected, a rectangle indicating the currently focused panel will be displayed, to indicate the component that will received keystrokes e.g. shortcuts such as Ctrl-R.

##### Object details tabs

> With this drop down you can select the position of the details tabs (Columns, Source, Data etc).

#### 35.15.2. Object list options

##### Automatically retrieve objects

> If this option is enabled, the contents of the database schema is retrieved when the DB Explorer is displayed. If this option is not checked, either the Refresh button or selecting a schema or table type will load the list.

##### Allow table altering

> If this option is enabled, column definitions of a table can directly be altered by editing them inside the "Columns" tab. It also allows to directly change the name of a table in the table list.

##### Remember object type

> The list of objects can be filtered with the drop down. If the option "Remember object type" is selected, the current object type will be stored in the workspace of the current connection, and will be restored the next time.

##### Default object type

> If "Remember object type" is not enabled, you can define a default object type that is selected in the drop down when the DbExplorer is displayed initially.

Quick filter options

> The following configuration options of the quick filter are also used for the quick filter in the Database Objects Tree.

> Use RegEx in Quickfilter

> > If this option is enabled, the expression entered in the quick filter of the DbExplorer's table list is used as a regular expression (rather than a "SQL" Expression) to filter the list.

> Partial match

> > If this option is enabled, then any text that is typed into the quick filter will be matched anywhere in the object name. It is equivalent to typing `*foo*` into the quick filter. If this option is enabled and a wildcard is part of the value, then only that wildcard is used. Using `foo*` for the filter while this option is enabled, shows all objects that start with `foo`.

> > This also enables filtering for multiple values, separated by comma. Entering `foo,bar` in the quick filter will show all objects that contain either `foo` or `bar`.

> > This option is only available when the use of regular expressions in the quick filter is disabled.

> Filter while typing

> > If this option is enabled, the filter expression is applied while you type. In this case, the "Filter" button does not need to be clicked in order to apply the filter expression.

#### 35.15.3. SQL Generation options

##### Generate PK constraint name

> When displaying the SQL source for a table, a name will be generated for primary key constraint if the current constraint has no name or a system generated name.

> System generated names are identified using a regular expression that can be configured.

> If this option is selected, the generated SQL will not reflect the real statement that was used to create the table!

##### Generate table grants

> If this option is enabled the generated table source will contain any table grants that have been defined.

##### Generate DROP statement

> If this option is enabled the generated table source will start with the appropriate `DROP` statement.

#### 35.15.4. Data display options

##### Remember sort column

> When this option is selected, the sort column in the data display of the DbExplorer will be restored after reloading the table data.

##### Remember column order

> When you reorder the column in the data display of a table, enabling this option will automatically store the new column order and apply it the next time the table data is displayed.

##### Apply sort order as ORDER BY

> If the table data was sorted by clicking on one of the columns, reloading the data will use an appropriate `ORDER BY` clause for the data retrieval. This is useful if not all rows were displayed in the data panel due to a max. row limit and you want the first rows displayed based on the current column sort.

### 35.16. DbTree options

#### Use the current tab's connection

> By default the DbTree uses a separate connection to the database to avoid locking problems. However this could mean that changes done in a transaction in a SQL tab, might not be visible in the DbTree. E.g. when a session local temporary table is created.

> If this option is enabled, the DbTree will use the connection of the currently active tab.

#### Apply filter while typing

> If this option is enabled, the quick filter is applied while typing in the input field. If this option is disabled, the filter will be activated when pressing the Enter key in the filter field.

### 35.17. File tree options

#### Exclude files

> Enter a comma separated list of file names that should never be shown in the file tree.

#### Exclude directories

> Enter a comma separated list of directory names that should never be shown in the file tree.

#### Default directories

> Select a list of directories that should be opened automatically when the file tree is displayed.

> When the file tree is open, when a workspace is saved (e.g. because SQL Workbench/J is closed), then the currently displayed directories are saved in the workspace. The next time the workspace is loaded, the directories stored in the workspace are used, not the default directories from this option.

### 35.18. SQL Formatting

These options influence the behavior of the internal SQL Formatter when reformatting a SQL statement in the editor.

#### Max. length for sub-select

> When the SQL formatter hits a sub-SELECT while parsing it will not reformat any statement which is shorter then the length specified with this option, i.e. any sub-SELECT shorter then this value will be formatted as one single statement without line breaks or indention. See SQL Formatter for details on how the SQL formatting works.

#### Columns in SELECT

> This property defines the number of columns the formatter puts in on line when formatting a `SELECT` statement. The default of 1 (one) will put each column into a separate line:

>     SELECT p.name,
>            p.firstname,
>            a.city,
>            a.zip
>     FROM person p
>       JOIN address a ON p.person_id = a.person_id;

> If this is set to 2, this would result in the following formatted SELECT:

>     SELECT p.name, p.firstname,
>            a.city, a.zip
>     FROM person p
>       JOIN address a ON p.person_id = a.person_id;

> The above example would list all columns in a single line, if this option is set to 4 (or a higher value):

>     SELECT p.name, p.firstname, a.city, a.zip
>     FROM person p
>       JOIN address a ON p.person_id = a.person_id;

#### Columns in INSERT

> This property defines the number of columns the formatter puts in on line when formatting an `INSERT` statement. A value of one will list each column in a separate line in the `INSERT` part and the `VALUES` part

>     INSERT INTO PERSON
>     (
>       id,
>       firstname,
>       lastname
>     )
>     VALUES
>     (
>       42,
>       'Arthur',
>       'Dent'
>     );

> When setting this value to 2, the above example would be formatted as follows:

>     INSERT INTO PERSON
>       (id, firstname,
>        lastname)
>     VALUES
>       (42, 'Arthur',
>        'Dent');

#### Columns in UPDATE

> This property defines the number of columns the formatter puts in on line when formatting an `UPDATE` statement. A value of 1 (one) will put each column into a separate line:

>     UPDATE person
>        SET firstname = 'Arthur',
>            lastname = 'Dent'
>     WHERE id = 42;

> With a value of 2, the above example would be formatted as follows:

>     UPDATE person
>        SET firstname = 'Arthur', lastname = 'Dent'
>     WHERE id = 42;

#### Keywords

> This option defines if standard SQL keywords are generated in upper case, lower case or left unchanged.

#### Identifiers

> This option defines if identifiers (table names, column names, ...) are generated in upper case, lower case or left unchanged.

#### Functions

> This option defines if the names of SQL functions are generated in upper case, lower case or left unchanged. This does not apply to user-written functions, only standard functions available for the current DBMS.

#### JOIN wrapping

> This option controls how conditions for `JOIN` operators are generated

> Never

> > The JOIN condition is always kept on a single line:

> >     SELECT *
> >     FROM person p
> >       JOIN address a ON p.person_id = a.person_id;

> Always

> > the JOIN condition is always written on a new line:

> >     SELECT *
> >     FROM person p
> >       JOIN address a
> >         ON p.person_id = a.person_id;

> Multiple conditions

> > the JOIN condition is generated on multiple lines only if the join involves more than one condition:

> >     SELECT *
> >     FROM person p
> >       JOIN address a ON p.person_id = a.person_id;
> >       JOIN address_details ad
> >         ON ad.address_id = a.address_id
> >        AND ad.person_id = a.person_id;

#### Space after comma for IN lists

> If this option is selected, a space is added after the comma inside an `IN` list.

#### Comma after line break

> If this option is enabled, the commas inside the `SELECT` list are put on the start of the next line, rather than on same line as the last column.

> If this option is disabled a `SELECT` statement will be formatted like this:

>     SELECT id,
>            lastname,
>            firstname
>     FROM person;

> If this option is enabled the above statement will be formatted like this:

>     SELECT id
>            ,lastname
>            ,firstname
>     FROM person;

#### Space after a comma with line break

> This option is only available is "Comma after line break" is enabled. In that case it controls if a space character is inserted after the comma.

#### Quoted elements per line

> This option is used when changing the selected text into elements suitable for an `IN` list using SQL → Create SQL List. The number of values that are kept on a single line is controlled with this option.

#### Other elements per line

> This option defines how many values will be put into a single line when creating non-quoted elements using SQL → Create non-char SQL List.

### 35.19. External SQL Formatter

#### Use of the external formatter

When formatting a SQL statement, SQL Workbench/J first looks if a formatter for the current DBMS is defined and active. If a formatter is found, that is used. If no formatter for the current DBMS is found, and the "Default" external formatter is active, that is used. If no active external formatter is found, the internal formatter is used.

#### Executable

> This is the full path to the formatter's program

#### Command line

> The command line configures the parameters passed to the formatter. The input file for the formatter can be specified by using the placeholder `${wbin}`. If no input file is specified on the command line, the SQL statement will be passed through stdin. If the formatter writes the output to a file, the placeholder `${wbout}` can be used in the command line. If no output file is specified the result will be read from stdout of the process.

#### Supports multiple statements

> If this option is enabled, SQL Workbench/J send the selected text that should be formatted as a single input to the formatter. If this option is disabled, SQL Workbench/J will split up the text to be formatted and send each statement seperately to the formatter.

#### Enabled

> This option can be used to turn of the usage of a formatter without deleting the definition.

### 35.20. SQL Generation

#### Format UPDATEs

> If formatting of `UPDATE` statements is enabled, generated `UPDATE` statements are formatted using the SQL formatter before they are displayed.

#### Format INSERTs

> If formatting of `INSERT` is enabled, the way they generated `INSERT` statements are formatted using the SQL formatter before they are displayed.

#### Format DELETEs

> If formatting of `DELETE` is enabled, the way they generated `DELETE` statements are formatted using the SQL formatter before they are displayed.

#### Date literals for clipboard

> Defines the date literal format to be used when copying data as SQL statements to the clipboard. For a detailed description of the different formats please refer to the WbExport description. This option does not influence the default format used by the `WbExport` command.

> When you copy data as "Text" (tab-separated) to the clipboard, the date and timestamp format from the general options is used.

#### Date literals for WbExport

> Defines the date literal format to be used for the WbExport command. The value of this option is used if the `-sqlDateLiterals` switch is not supplied when running `WbExport`. This default value is reported when `WbExport` is executed without parameters.

#### Date literals for WbDataDiff

> Defines the date literal format to be used for the WbDataDiff command. The value of this option is used if the `-sqlDateLiterals` switch is not supplied when running `WbDataDiff`. This default value is reported when `WbDataDiff` is executed without parameters.

#### Include owner in export

> This setting controls whether SQL Workbench/J uses the owner (schema) when creating SQL scripts during exporting data (through WbExport or "Save as"). When this option is selected, the usage of the schema depends on the ignore schema setting that controls ignoring certain schemas for specific DBMS. When this is option is not selected, the schema/owner will never be used for SQL scripts.

#### Include empty comments

> By default the DbExplorer will not generate the SQL to create empty comments (tables, views, columns,...). If this option is enabled then a corresponding SQL statement to define a comment with an empty string will be generated. If a comment is `NULL` comments will never be generated.

#### Ignore identity and autoincrement columns for INSERTs

> If this option is enabled, generated INSERT statements (e.g. when editing data) will not contain identity or autoincrement columns. When using `WbExport` to create a SQL script, this can be controlled independently from the global option.

### 35.21. Window Title

The title bar of the main window displays displays information about the current connection, workspace and editor file. Some of these elements can be enabled or disabled with the options on this page.

#### Application name at end

> If this option is enabled, the Application name will be put at the end of the window title.

#### Show Workspace name

> If this option is enabled, the currently loaded workspace name will be displayed in the main window's title.

#### Show Profile Group

> If this option is enabled, the group of the current connection profile will be displayed in the main window's title. The name of the current connection profile will always be shown.

#### Enclose Group With

> If you select to display the current profile's group, you can select a pair of characters to put around the group name.

#### Separator

> If you select to display the current profile's name and group, you can select the character that separates the two names.

#### Editor Filename

> If the current editor tab contains an external file, you can choose if and which information about the file should be displayed in the window title. You can display nothing, only the filename or the full path information about the current file. The information will be displayed behind the current profile and workspace name.

### 35.22. SSH Hosts

By defining global SSH hosts, it's possible to edit the login information for the SSH host centrally instead of editing the SSH settings for each connection profile.

If the details of such a SSH host change (e.g. the password), they only need to be changed once, and all connection profiles using the host automatically use the new definition.

Option | Description
--- | ---
Configuration | The name for this global SSH host.
SSH Hostname | This is the remote computer that is used to establish the SSH connection and from which the remote database server is reachable
SSH Port | The port for the SSH connection. If this is empty the default port 22 is used.
Username | The username on the SSH host to be used for the login.
Private key file | If the SSH host is configured to use authentication through a SSH key file, the path to the key file can be entered here
Password | This is either the password for the remote user login, or, if a private key file is specified, the passphrase for that key file. If no password is provided, you will be prompted to enter one when connecting. If a password is entered, it is always stored in the profile. If no password is entered, you will be prompted for one when the connection is established. If the password is used as a passphrase for a private key file, the entered password will be remembered until the application is closed. It will be (re)used for other tunnels using the same private key file.
Authenticate through SSH agent | If this option is enabled SQL Workbench/J will try to use a running SSH agent to authenticate against the SSH host. Supported agents are `pageant.exe` for Windows® and `ssh-agent` for Linux systems. In this case supplying a private key file or a password is not necessary, but the user name is still required. In order to be able to communicate with the SSH agent, additional libraries are needed, which can be downloaded from https://www.sql-workbench.eu/jna.zip. Please unzip the archive and put the two jar files into the `ext` sub-directory where `sqlworkbench.jar` is located.

### 35.23. External tools

On this page, you can define external tools (programs). Currently the only place where this is used, is in the BLOB info dialog, to open the BLOB data with one of the defined external tools.

This could be a program to display images, OpenOffice to display office documents or a text editor to display text files.

If the tool needs additional parameters (e.g. to select a hex editing mode for a text editor), they have to be entered in the "Parameters" field. Do not add parameters to the definition of the executable.

### 35.24. Look and Feel

If you want to use additional Look and Feels that are not part of the JDK, you can specify them here.

A Look And Feel definition consists of a name, the class name to be used and the location of the JAR file that provides the look and feel implementation. The class name that has to be used should be available in the documentation of the look and feel of your choice. The name is SQL Workbench/J internal and is only used when displaying the list of available Look and Feels.

The current look and feel is only changed when you click on the Make current button. Simply selecting a different entry in the list on the left side will not change the look and feel.

When you switch the current Look & Feel, you will need to restart the application to activate the new look and feel. Note that if you switch the current Look & Feel it will be changed, regardless whether you close the options dialog using Cancel or OK.

### 35.25. Customize the FlatLaf Look & Feel

The FlatLaf Look and Feel is bundled with SQL Workbench/J

FlatLaf can be customized through properties files. This properties file (typically named `FlatLaf.properties` needs to be put into the `ext` folder (where the `flatlaf.jar` is located).

### 35.26. Logging

#### Log all SQL statements as INFO messages

> If this option is enabled, all manually entered SQL statements that logged into the log file as INFO messages. The statements will be logged without changs, which means potentially sensitive information could be written to the logfile.

#### Log internal SQL statements as INFO messages

> If this option is enabled, all statements that SQL Workbench/J runs internally are written to the log file as INFO messages.

#### Obfuscate information in logfile

> If this option is enabled, some information is obfuscated before written to the logfile. This includes details about the connection (JDBC URL, server, database and user names) as well as paths to local files.

> If SQL statements are logged, those are not changed in any way to hide sensitive information

#### Log Level

> With this option you can control the level of information written to the application log. The most verbose level is `DEBUG`. With `ERROR` only severe errors (either resulting from running a user command or from an internal error) are written to the application log.

> When using Log4J as the logger, this will change the log level of the root logger.

Prev |  | Next
34. Common DBMS problems | Home | 36. Configuring keyboard shortcuts