[ Master documentation index ]
Customizing
DbVisualizer
DbVisualizer is highly customizable, you can control formatting, layout
and the way DbVisualizer
interacts with databases. The default settings are good enough for the
normal user but sometimes it is necessary to modify these properties. This
chapter guides you through all the properties.
Properties are divided into two groups:
- General Settings
These settings controls DbVisualizer in general such as fonts, colors, data formats, etc.
- Database Settings
These settings are per
supported database type and defines properties that are used in
database specific operations. Changing a database property in Tool
Properties will then apply for all database connections defined for
that database type. In Connection Properties it is also possible to override
database properties specifically for a database connection.
The
user preferences
(XML) file
All properties are saved in an XML file. The exact location of this
file is platform dependent. The location on your system is listed in
the first, General category. The XML file
contains, in addition to all properties, also the information about
drivers,
database connections, bookmarks, etc. The general recommendation is to not edit
this file
manually even though it is quite easy to do so.
DbVisualizer automatically creates a backup copy of the XML file when
the application is started. The location of this file is the same as
for the standard XML file except that the .bak
suffix is appended to the file
name. The standard XML file might get broken for various reasons. If a
warning message that the XML file could not be read is displayed during
launch of DbVisualizer then simply copy the backup file to the
standard location and restart the application. If the XML file is
moved from its standard location or if it is removed
then DbVisualizer will automatically create a new one.
Tip:
the -up
command line argument is used to
identify the file name (and path) to an alternate XML file.
General Settings
The General settings tab collects all categories that are used to control the general aspects of DbVisualizer.
The buttons at the bottom of the window control whether the changed
properties should be applied using the Ok
(this also closes the window) and Apply button, if changes should be reverted using the Cancel
button or if the factory
defaults should be applied using the Defaults
button.
Changes are tracked on a per category basis. If any changes has been
made then a question will be displayed whether the changes should be
applied or not. Defaults can be initiated either to revert all properties (both General and Database properties) to their default settings or just the current category.
This is a screenshot of the General category tree.

Figure:
The Tool
Properties window showing the tree with General categories
Appearance
Property
|
Description
|
Look and Feel
|
Controls
which look and feel will be used.
Note
1: You must restart
DbVisualizer in order to use a new look and feel.
Note
2: Some look and feels are
platform specific and do not appear on all OS'es
|
Metal (Ocean)

|
Motif

|
Windows

|
Alloy

|
GTK+

|
Mac
OS X

|
|
Icon
Sizes
|
The
Menus,
Main
Tool Bars, Sub Tool Bars
settings are used to control the size of the icons.
|
| Show Tab Icons |
Specifies
whether an icon will appear in the header of all object view tabs. |
Fonts
Individual fonts can be defined for SQL editors, Grids and Text output data. The Application Font Size
settings is used to control the size of the font for all other
components in the user interface. Increasing the application font size
is useful at demos or presentations.
Key Bindings
The key binding function is used to define key bindings for almost all operations and editor commands in DbVisualizer. Key bindings are grouped in Key Maps.
DbVisualizer includes a set of pre-defined key maps targeted for the
supported operating systems. These key maps cannot be deleted or
modified. To customize key bindings, then copy an existing key map and
make your changes.

Figure: The key binding editor
All user defined key maps are stored in your $HOME/.dbvis/config/keymaps directory. A key map file contain only the differences between the copied key map and the current.
To create a new key map select the map you want to copy and press the Make Copy button. Set a name on the new key map and activate it with the Set Active button. The newly created key map will now have the exact same key bindings as the parent key map.
Note: Key maps must be uniquely named.

Figure: User defined key map
The action list is organized in folders. The Editor Commands folder lists all actions available in the SQL Commander editor and their current key bindings. The Main Menu
folder contain sub folders each representing the main window menu
actions. The other folders group feature specific actions such as
actions to control the references graph, form editor, etc.
To modify the key bindings for an action then select the action from
the action list. The current key bindings are listed in the Key Bindings list.

Figure: User defined key map
To add an additional key binding press Add Key Binding or press Edit Key Binding to edit the selection.

Figure: Key stroke dialog
The key stroke dialog controls whether a key binding is already
assigned somewhere else. In the conflict box you'll see the names of
the actions that are conflicting. The modifier keys Shift, Alt,
Ctrl and Command can be used to form the final key binding.
Note: It is not recommended to assign several key bindings for
different actions. The reason is that you may get different results
between invocations of such key bindings.
Note: Menu items and tool tips shows the first defined key binding in the list.
Database
Connection
Property
|
Description
|
| Run
"Connect All" at Startup |
Defines
whether a database
connection will be connected when the Connect
All operation is
selected in the main window menu bar.
|
Confirm
"Disconnect All"
|
Checking
this property will force a dialog to be displayed before disconnecting
all current database connections using the Disconnect All operation.
|
| Connection
Timeout |
Specify
number of seconds that the driver will wait until terminating ongoing
connection request.
Note:
This property is
handled by JDBC drivers and
might not be supported. |
Permissions
The Permission functionality is a security mechanism preventing from
running certain database operations unconfirmed. Permissions are
configured per connection mode and are categorized into the following
feature areas.
Note: The permission feature is part of DbVisualizer and should not be mixed with any authorization system in the actual database.
SQL Commander Permissions
For the SQL Commander we define via a drop down the permission type for each SQL command:
- Allow
This type will run the actual SQL without any confirmation
- Deny
This type will simply ignore running the actual SQL command
- Ask
When executing the SQL statement or script of statements the SQL
Commander will first ask the user whether the actual SQL command(s)
should be executed or not.

Figure: SQL Commander Permissions
Inline and Form Editor Permissions
The permissions for inline and form editors are:
- Confirm
A confirmation window will be displayed in which the user must accept the operation or cancel it
- No Confirm
The SQL operation is performed without any confirmation being displayed

Figure: Inline and Form Editor Permissions
Data
Formats
Property
|
Description
|
Date
Format
|
Select
the date format that will be used throughout the application (i.e
grids, forms and during editing). More
information below.
|
Time
Format
|
Select
the time format that will be used throughout the application (i.e
grids, forms and during editing). More
information below. |
Timestamp
Format
|
Select
the timestamp format that will be used throughout the application (i.e
grids, forms and during editing). More information
below. |
Numbers
Format
|
Specifies
how numbers will be formatted.
|
| Decimal
Number Format |
Specifies
how decimal numbers will be formatted. |
Null
String
|
This
is the string representation of the null value. This string is the
readable form of null and appears in grids, forms, exports and during
editing.
|
Date,
Time and Timestamp formats
The lists for date, time and timestamp format contains a collection of
standard
formats. If these formats are not suitable then you can enter your own
format in the appropriate field. The tokens used to define the format
is listed in the right click menu while the field has focus.

Figure:
The date and time right click menu
The complete documentation for these tokens are listed in the following
web page SimpleDateFormat.
Table
Data
Property
|
Description
|
Show
Table Row Count
|
Specifies
if the number of rows in a table will be displayed in the header of the
table when in the Database Objects->Data tab. Enabling this
property
will cause an extra round trip to the database (i.e minor performance
penalty)
|
Highlight
Primary Key Columns
|
Specifies
if Primary Key columns will be indicated in the Database
Objects->Data tab, Variable Substitution dialog, SQL Commander
Result grids and in the References Graph.
|
Include
Variables in SQL
|
Specifies
if the right click menu operations in the Data tab will create
appropriate SQL statements that include DbVisualizer variables or if
the generated statements are plain SQL. Letting DbVisualizer generating
statements with variables results in the variable substitution dialog
being displayed when these statements are executed in the SQL
Commander. |
Max
Rows at First Display
|
Set
the number of rows that will be fetched for a table in the Data tab
when a table is first displayed.
|
Inline/Form Editors
Property
|
Description
|
Reload
Grid after Edit
|
Check
this to enable auto reloading of the grid after a successful edit in
the inline editor.
|
| Image Max Size in Form Editor |
The default size for images displayed in the form editor. |
Variables
Variables can be used in the SQL executed in the SQL Commander and in
Connection details. Before executing an SQL statement or connecting a
database connection a window is display asking for replacement values.
These settings define what character sequence identifies a variable.
Property
|
Description
|
Variable
Identifier
|
The
identifier for a variable. A
variable starts and ends with this identifier. Default is "$$".
|
Variable
Delimiter
|
The
delimiter used to identify
the parts of a variable. Default is "||".
|
Transaction
Property
|
Description
|
Pending
Transactions at Disconnect
|
Defines
what DbVisualizer will
do on exit from the application when the auto commit setting is
disabled.
|
Bookmarks
Property
|
Description
|
Number
of Bookmarks Limit
|
Specifies
the number of SQL bookmarks that the New
and History
bookmark object
may keep until the lists are truncated.
|
Monitor
Property
|
Description
|
Start
Monitors Automatically
|
Check
to enable start of monitors automatically when database connections are
established.
|
Grid
Property
|
Description
|
Fit
Grid Column Widths
|
Enable
to let DbVisualizer automatically fit the content in each grid column
based on the widest cell value.
|
| Max Column Separator Width |
This setting is used only when Fit Grid Column Widths is enabled and is used to set a maximum visual column width for grids. |
Meaning of setting Max
Chars
|
The
Max Chars property in the
Database Objects Data tab and in the SQL Commander is used to control
the max number of characters that text values can hold. If
the
number of characters for a text column is wider then this setting then
the column is colored in a light red color.
The meaning of setting this property can be one of the following:
- Truncate Values
Will truncate the original value to be less then the setting of Max
Chars.
Note:
this will
affect any subsequent edits and SQL operations that use the value since
it's truncated. This setting is only useful to save memory if viewing
very large text columns.
- Truncate Values Visually
Will truncate the visible value only and leave the original value
intact. This is the preferred setting since it will not harm the
original value. The disadvantage is that more memory is needed if
dealing with large text columns.
|
Copy
The copy category groups properties that are used to control the result
of using Copy Selection and Copy Selection (With Column Header) via the grid right click menu.
Property
|
Description
|
Column
Delimiter
|
Specifies
the delimiter between columns in a multi column copy
|
End
of Line Delimiter
|
Specifies
the new line control
characters for multi row copy requests
|
Colors
The Colors category defines how odd and even numbered rows in grids
should be presented.
Binary/BLOB
and CLOB Data
Property
|
Description
|
BLOB
|
Specifies
how BLOB and binary data values will be represented in grids. Setting
this property to By Value
will
result in performance penalties and the memory consumption will
increase dramatically. |
CLOB
|
Specifies
how BLOB and binary
data values will be represented in grids. Setting this property to By Value
will result in performance
penalties and the memory consumption will increase dramatically. |
SQL Editor
The editor category controls various settings specific for the SQL
Commander editor.
Property
|
Description
|
| Tabs |
This is used to define settings for the tab keyboard key. |
Recent Files Limit
|
Specifies the max number of files listed in the File->Load Recent sub menu. |
| Confirm Close of Unsaved Editors |
Enable this and DbVisualizer will ask for unsaved editors
(and not only editors loaded from file) whether to save to file or not. |
| Set "Sticky" for SQL Editor(s) |
When this is enabled new SQL Editors automatically will be
defined as Sticky meaning that the database connection details only can
be changed manually. |
Statement
Delimiters
Statement delimiters define how a script should be divided into
specific SQL statements in the pre-processing phase.
Property
|
Description
|
SQL
Statement Delimiter 1
|
Defines
the character(s) used to delimit one SQL statement from another in a
SQL script
|
SQL
Statement Delimiter 2
|
Defines
the additional character(s) used to delimit one SQL statement from
another in a SQL script. If there is no need for more then one SQL
statement delimiter then set this one to the same as delimiter 1.
|
Allow
"go" as Delimiter
|
Specifies
whether go
as the first word on a
single line will be interpreted as a statement delimiter.
|
Begin
Identifier
|
Defines
the character(s) that identifies the start of an anonymous SQL block
|
End
Identifier
|
Defines
the character(s) that identifies the end of an anonymous SQL block
|
SQL Formatting
The SQL formatting category groups properties to control the SQL
formatting feature in the SQL Commander. To see the effect of each
property, modify it, press Apply and format the SQL in the SQL Commander to see the result.
Auto
Completion
These category is used to define the visual appearance of the auto completion popup in SQL Editors.
Property
|
Description
|
Sort Tables List
|
Enable this to always present tables sorted in the auto completion popup |
| Sort Columns List |
Enable this to always present column names sorted in the auto completion popup |
| Display Automatically |
Enable this and the auto completion popup is automatically displayed whenever possible |
| Instant Substitution |
Enable this and the auto completion popup is only displayed when needed |
| Display Delay |
Specifies the time in milliseconds until the auto completion popup is displayed automatically |
Comments
Property
|
Description
|
Single
Line Identifier 1
|
Defines
the character(s) that identifies the beginning of a one line comment
|
Single
Line Identifier 2
|
Defines
the additional character(s) that identifies the beginning of a one line
comment
|
Block
Comment Begin Identifier
|
Specifies
the character(s) that identifies the start of a multi line comment block
|
End
|
Specifies
the character(s) that identifies the end of a multi line comment block
|
Debug
The debug category is used to control the amount of output that is
produced when setting various debug modes. Normally only error messages
are displayed in the default debug destination which is the
Tools->Debug
Window. The support team
often refer to
the debug properties when we want more information in a problem
situation.
Property
|
Description
|
Debug
Output Destination
|
Specifies
the destination to which all debug messages will be written to. It is
not advisable to set this to Off
since then also error messages will then also be ignored. Standard Out
is only useful if the
debug mode of the DbVisualizer launcher is enabled.
|
Debug
DbVisualizer
|
Defines
the amount of logging
that will be produced. Full
output is when Log Level
is
set to Debug and lowest output is Error.
Setting Detail
Level to Full
produces the most detail and also
consume more resources.
|
| Debug JDBC Drivers |
This property enables any debug output produced by a JDBC driver. The amount of output depends on the actual drivers. |
Read more about Problem
Resolution.
Database Settings
Database settings extends the General settings with properties that are
defined per supported database type. The selection of what database
type is current for a database connection choose the appropriate type
in the Database Type list in the Connection tab. If there is no matching entry use the Generic database type.
Having database type specific properties is useful as settings can be
defined for all database connections instead of per individual database
connections. It is also possible to override these properties in the
Connection Properties tab.

Figure:
The Tool
Properties window showing the tree with Database categories
The following properties are displayed when selecting a database type in the tree.
Property
|
Description
|
Connection Mode
|
Specify here what mode the database connection is. Permissions are based on connection mode as well as a visual border around critical features in DbVisualizer.
|
Show only default Database or Schema
|
Enable this if you only want the default database or schema listed in the database objects tree. |
| Connect when "Connect All" |
The Connect All feature is used with a single click to connect all database connections that have this setting enabled. |
Authentication
Property
|
Description
|
Save Password
|
Enable
this and DbVisualizer will save the password for the database
connection between invocations. (The password is saved encrypted)
|
Clear Password at Disconnect
|
Enable this and the password will be cleared at disconnect |
| Require Userid |
Ask the user to enter userid whenever the database connection is established |
| Require Password |
Ask the user to enter password whenever the database connection is established |
Delimited Identifiers
Delimited identifiers are identifiers which do not need to follow the
rules of regular identifiers. Such identifiers can include
sequence of printable characters excluding those which are not
allowed to use in delimited identifiers in the actual database.
Usually delimited identifiers are used when you need to use SQL
reserved word, spaces and mixed case sequences as an identifier.
Property
|
Description
|
Begin Identifier
|
Defines the start character for a delimited identifier. Normally this is a double quote (")
|
End Identifier
|
Defines the end character for a delimited identifier. Normally this is a double quote (") |
| Scripting |
Enable this to use delimited identifiers in the Scripting features |
| Auto Completion/Query Builder |
Enable this to use delimited identifiers in the auto completion and query builder features |
Qualifiers
Use these settings to control whether column names should be qualified with the table name.
Note: Using table name aliases will override the setting of prepend column names.
Property
|
Description
|
Qualify with Schema/Database: Scripting
|
Enable this to qualify object names with schema/database in the Scripting features
|
| Qualify with Schema/Database: Auto Completion/Query Builder |
Enable this to qualify object names with schema/database in the auto completion and query builder features |
Qualify Columns: Auto Completion/Query Builder
|
Enable this to qualify column names with the table name in the auto completion and query builder features |
Transaction
Property
|
Description
|
Auto
Commit
|
Defines
if each executed SQL statement will be auto committed or not. This
setting applies for all SQL's that are executed in the SQL Commander.
The
inline and form editors in DbVisualizer Personal handles the commit and
rollback management independently of the setting of Auto Commit.
|
Transaction
Isolation
|
Attempts
to change the
transaction isolation level for all database connections.
Note:
If this property is changed during a transaction, the result is JDBC
driver specific. |
SQL
Statements
This category controls the SQL templates that DbVisualizer uses
internally throughout the application. Each SQL template is composed of
the standard SQL and variables. Variables are identified with $$...$$.
DbVisualizer
relies on a list of pre-defined variable names that are accessed in the
SQL Templates right
click menu:

Figure:
All
pre-defined variables
A specific pre-defined variable can be used in
on or more of the SQL templates. Using a variable in a SQL statement
that is not valid will result in the variable appearing as is
once the statement is executed.
There is normally no reason to modify the SQL templates nor the
variable identifier or delimiter settings. There might however be
circumstances when edits are needed:
- To put quotes or brackets
around table names
- To change the variable
identifier or variable delimiter since the
default settings may interfere with object names in the database
- To modify the appearance of
the where clause or the list of
columns
Property
|
Name
|
Description
|
SQL Templates
|
SELECT
ALL
|
Command
used when selecting all rows for a table
|
SELECT
ALL WHERE
|
Command
used when selecting some rows for a table
|
SELECT
COUNT
|
Command
used to get the number of rows in a table
|
INSERT
INTO
|
Command
used to insert a new row into a table
|
UPDATE
WHERE
|
Command
used to update an
existing row in a table
|
DELETE
WHERE
|
Command
used to delete a
specific row in a table
|
DROP
TABLE
|
Command
used to drop a specific
table
|
CREATE
TABLE
|
Command
used to create a new
table with an optional primary key |
CREATE
INDEX
|
Command
used to create an index
for a specific table
|
Monitor
Row
Count
|
Command
used to get the number
of rows in a table and the current time stamp
|
Monitor
Row Count Change
|
Command
used to get the row
count difference in a table compared to the previous execution. The
calculated row count and the current time stamp is returned
|
Connection Hooks
Connection hooks defines optional SQL commands that are sent to the
database at connect and just before disconnect. They are typically used
to initialize the database session with custom settings and at
disconnect clean up various resources.
Property
|
Description
|
Run SQL at Connect
|
Defines the SQL that will be executed just after the connection has been established
|
Run SQL at Disconnect
|
Defines the SQL that will be executed just before the connection will be disconnected |
Objects Tree
Property
|
Description
|
Custom Object Tree Labels
|
Here you can define custom tree labels that will appear in the database objects tree. The Object Type must match the corresponding type in the actual database profile. |
SQL Editor
Property
|
Description
|
Remove
New Line Characters
|
Specifies
whether any new line characters should be removed from any SQL
statement executed in the SQL Commander and in the implicit SQL
execution functionality in DbVisualizer. Some drivers/databases such as
DB2 requires that no new line characters are part of any executed SQL.
|
| Generate JOIN clauses in Query Builder |
Specifies whether the Query Builder will generate JOINs as JOIN clauses or WHERE conditions.
JOIN clause:
SELECT *
FROM HR.EMPLOYEES emp
INNER JOIN HR.DEPARTMENTS dept
ON (emp.DEPARTMENT_ID = dept.DEPARTMENT_ID)
WHERE condition:
SELECT *
FROM HR.EMPLOYEES emp,
HR.DEPARTMENTS dept
WHERE (emp.DEPARTMENT_ID = dept.DEPARTMENT_ID) |
Database Specific settings
Some databases are supported more in DbVisualizer then others and so requires extended configuration capabilities.
Data Types (Oracle)
In Oracle it is sometimes desired to treat DATE data types as TIMESTAMP. Enable Handle DATE as TIMESTAMP and DbVisualizer will automatically convert DATE's.
Explain Plan (Oracle, SQL Server and DB2)
The explain plan feature supported for Oracle, SQL Server and DB2 can be configured to highlight certain threshold levels.
Property
|
Description
|
Color Critical Nodes
|
Enable this and critical nodes in the explain plan feature will be highlighted. |
| Critical Threshold |
The threshold for when a node should be handled as critical |
| Warning Threshold |
The threshold for when a node should be handled as a warning |
Explain Plan (Oracle)
The explain plan feature for Oracle can be configured to define the
management of the underlying plan table in which the explain plan
result is stored.
Explain Plan (DB2)
The explain plan feature for DB2 can be configured to define the
management of the underlying plan tables in which the explain plan
result is stored.
System Tables (Oracle)
Select here whether the database profile for Oracle should retrieve database information from the DBA or ALL system tables.
Note: If choosing DBA make sure the appropriate privileges are granted for the user you are connecting as.
Copyright © 2006 Onseven Software AB. All rights reserved.