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 normal use, but sometimes it is necessary to modify these
properties. This
chapter guides you through all the properties.
The Tool Properties window divides properties 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. When you set a database property in Tool
Properties, it applies to all database connections defined for
that database type. To set a property for one specific connection, use
the Connection Properties, available in the Object Details area when
you
select a connection.
The
user preferences
(XML) files
All properties are saved in XML files. The exact location of these
files is platform dependent. The location on your system is listed in
the first,
General category, in the Tool Properties
window. These files
contains, in addition to all properties, also the information about
drivers,
database connections, bookmarks, etc. We recommend that you do
not edit
these files
manually; even though it is quite easy to do so, even a simple typo of
an element name may cause problems. It's safer to edit all properties
from the DbVisualizer GUI.
DbVisualizer automatically creates a backup copy of the XML files when
the application is started. The location of these files is the same as
for the standard XML files, but a
.bak
suffix is appended to the filename. The standard XML file might get
broken for various reasons not in control by DbVisualizer. If you see a
warning message that the XML file can not be read when you
launch DbVisualizer, simply copy the backup file to the
standard location and restart the application. If you move the
XML file from its standard location, or if you remove it, DbVisualizer
will automatically create a new one.
Tip:
the -prefsdir
command line argument is used to
identify an alternative directory for your user settings.
Export Settings
Sometimes
it may be necessary
to migrate all your settings for DbVisualizer and import them in second
setup of DbVisualizer. This is very handy if you are migrating from one
machine to another, or if you want to setup an exact copy on your
home computer, etc. Another key reason is for backup purposes. Loosing
all database connection due to various reasons can be really
frustrating. The Export Settings feature is available from the
File->Export Settings main window
menu choice.
Figure: Export User Settings window
The default layout of the Export Settings window is that all settings
will be exported. Once you're done press OK and all settings will be
saved in the specified file. The structure of this JAR file is the same
as the content in your DbVisualizer settings directory.
The Relative File
Paths option will transform all path definitions in the exported
file relative to the DbVisualizer installation directory and your
personal settings directory. This is useful if you will import the
settings on another machine or share it with other users. Note that the
DbVisualizer version importing relative file paths must be 7.1 or later
to work properly (importing in earlier versions than 7.1 will not fail
but path information will be erroneous for things such as drivers,
favorites, etc.)
Import Settings
The Import Settings feature is used to import settings as previously
exported via the Export Settings feature. Import will examine the
content of the specified file and present the choices available.
Consider the previous screenshot and that we export the settings for
the Database Connections only. Here is how the
Import Settings window will look:
Figure: Import User Settings window
Use the
Target Location button
to set where the imported database connections will appear in the
objects tree.
General
Settings
The General settings tab collects all categories that are used to
control the general aspects of DbVisualizer.
Use the buttons at the bottom of the window when you have made some
changes: Click
OK
to save the changes and close the window, the
Apply
button to save the changes but keep the window open, and the
Cancel
button to revert all changes. To reset the properties to the factory
defaults, use the
Defaults
button.
Changes are tracked on a per category basis. If you have made changes
and click on another category, you are asked whether the changes should
be
applied or not. When you click
Defaults (for both
the
General
and the
Database
properties), you can reset either all properties or just the properties
for currently selected 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 to use.
Note 1: You must restart
DbVisualizer after you have selected a new look and feel.
Note 2: Some look and feels are
platform specific and do not appear on all OS'es
Metal (Ocean)

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 settings
is used to control the font for all other
components in the user interface, such as labels. Increasing the
application font size
is useful at demos or presentations. Anti-Aliased Fonts is supported by
some look and feels and when enabled it gives a much smoother
appearance of text in the application. Anti-Aliased font is not
supported by the SQL editor.
Key
Bindings
You can define key bindings for almost all operations and editor
commands in DbVisualizer. Key bindings are grouped in
Key Maps.
DbVisualizer includes a set of predefined key maps targeted for the
supported operating systems. These key maps cannot be deleted or
modified. To customize key bindings, 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/config70/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 click 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 now has the exact same key bindings as the parent key map.
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 a main window menu. 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, 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. If there is a conflict with another binding,
the Conflicts are shows 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.
Menu items and tooltips shows the first defined key binding in the
list.
Database Connection
| Peroperty |
Description |
| Ask When Creating Database Connection |
If enabled, you will be asked if you want to use the Connection
Wizard to create new connections. |
| Run "Connect All" at Startup |
If enabled, the Connect All operation is
automatically run when you launch
DbVisualizer, connecting all Database Connections marked as being
included in the Connect All operation (see the Database properties
further down for more on this). |
| Confirm "Disconnect All" |
If enabled, a dialog to be displayed before disconnecting
all current database connections when using the Disconnect All
operation. |
Execution
Timeout
Value
(seconds)
|
Specify here how many seconds
after which a database call that locks the GUI will time out
|
Driver Manager
The Driver Manager searches specified folders for JDBC drivers and
helps you make them available for use by DbVisualizer, see the
Load JDBC Driver
and Get Connected section for details. In the Driver Manager
properties category, you can specify if you want the Driver Manager to
run automatically at start-up, when new files are discovered in the
specified driver folders, or when driver related errors are
encountered. You can also specify the folders to search and files to
exclude, if any.
Permissions
The Permission functionality is a security mechanism, where you can
specify that certain database operations must be confirmed. You
configure permissions per connection mode (Development, Test and
Production) for feature areas described in the following sections.
Note: The
permission feature is part of DbVisualizer and does not replace the
authorization system in the actual database.
SQL Commander Permissions
For the SQL Commander, you can pick the permission type from a
drop-down list for each SQL command:
| Permission Type |
Description |
| Allow |
This permission type means that you can run the SQL
statement without any confirmation |
| Deny |
This permission type means that the SQL statement is not
executed at all. |
| Ask |
This permission type means that when executing an SQL
statement, or a script of statements, the SQL Commander asks you
whether the actual SQL command(s) should be executed. |
Figure: SQL Commander Permissions
Table Data Editing
Permissions
The permission types for the inline editor are:
| Permission Type |
Description |
| Confirm |
A confirmation window is displayed, and you can accept the
operation or cancel it |
| No Confirm |
The SQL operation is performed without any confirmation |
Figure: Table Data Editor Permissions
Time Zone
In the Time Zone properties category, you can change the time zone for
the DbVisualizer process, and thereby how date and time data is
interpreted. DbVisualizer uses the OS time zone by default, which is
usually what you want to use.
Changing the time zone is only of interest if you work with a database
running with a different time zone than the time zone set on the client
where you run DbVisualizer. One example is when working with a database
that uses the UTC/GMT time zone to normalize all date/time data.
File Encoding
In the File Encoding category, you can set which file encoding
DbVisualizer uses by default when reading and writing files, e.g., SQL
scripts loaded into the SQL Commander or files with exported data. By
default, DbVisualizer uses the default encoding for your operating
system, and this is typically what you want. You only need to change
this setting if you often work with files in another encoding, or if
DbVisualizer can not find the default encoding for your operating
system.
Data Formats
| Property |
Description |
| Date Format |
Specifies the
date format to use throughout the application (i.e., in
grids, forms and during editing). More
information below. |
| Time Format |
Specifies the
time format to use throughout the application (i.e., in
grids, forms and during editing). More
information below. |
| Timestamp Format |
Specifies the timestamp format to
use throughout the application (i.e., in
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. |
Boolean/BIT
Format
|
Specifies the textual
representation of boolean values (true/false).
|
| Null String |
Specifies 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
contain collections of
standard
formats. If these formats are not suitable, you can enter your own
format in the appropriate field. The tokens used to define the format
are listed in the right-click menu when the field has focus.
Figure:
The date and time right click menu
The complete documentation for these tokens is available at the
following
web page:
SimpleDateFormat.
Number formats
The lists for number and decimal number contain collections of
standard
formats. If these formats are not suitable, you can enter your own
format in the appropriate field. The tokens used to define the format
are listed in the right-click menu when the field has focus, and
complete documentation for these tokens is available at the following
web page:
DecimalFormat.
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 in the Database Objects->Data tab. Enabling this
property will cause an extra round trip to the database (i.e., a minor
performance
penalty) |
| Highlight Primary Key Columns |
Specifies
if Primary Key columns will be indicated in the Database
Objects->Data tab, Variable Substitution window, 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 SQL
statements that include DbVisualizer variables or if
the generated statements are plain SQL. Letting DbVisualizer generate
statements with variables results in the Variable Substitution
window
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. |
Transaction
| Property |
Description |
| Pending Transactions at Disconnect |
Specifies what DbVisualizer does on exit from the
application, when the auto commit setting is disabled. |
Scripts
| Property |
Description |
Default
Editor when Double-click
|
Define what target editor should load the file when
double-click Bookmark, Monitor or History script files.
|
Default
Editor
when
Alt+Double-click
|
Define what target editor
should load the file when Alt+double-click Bookmark, Monitor or History
script files. |
Monitor
| Property |
Description |
| Start Monitors Automatically |
Check to enable start of monitors automatically when
database connections are established. |
Form Viewer
| Property |
Description |
| Right Aligned Numbers |
If enabled, numbers are displayed as right-aligned in the
Form Editor/Viewer. |
| Image Thumbnail Size |
The number of pixels for the widest side of an image
(represented by binary data) when shown in the Data Form Viewer. The
value is used to scale the image proportionally. The default is 150. |
Grid
| Property |
Description |
| Auto Resize Column Widths |
If Auto Resize is enabled, DbVisualizer automatically sizes
each grid
column
based on the widest cell value. If Consider Column Header is
also enabled, the header widths are also considered when calculating
the column widths. |
| Show Grid Row Header |
If enabled, a row header is shown also for read-only result
set grids, such as monitoring result set grids. |
| Max Column Separator Width |
This setting is used only when Auto Resize Column Widths
is enabled and specifies 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 for text values. If the number of characters for a
text column is more than this setting, the column is colored in a light
red color and the value is truncated as specified by this property:
- Truncate Values
Truncate the original value to be less then the setting of Max Chars.
Note: This affects any subsequent edits and SQL
operations that use the value since it's truncated. This setting is
only useful to save memory when viewing very large text columns.
- Truncate Values Visually
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 when dealing with
large text columns.
|
Automatically
Show
Grid Warnings
|
When enabled the warning popup
in the Grid component is automatically displayed when the Max Rows
setting is exceeded, if columns are truncated or if the loading was
interrupted.
|
Copy
The Copy category groups properties that control the result
of using
Copy Selection
and
Copy Selection (With Column Header) via the
grid right-click menu, the corresponding key bindings, and drag and
drop.
| 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 is used to define alternatnve background,
foreground and grid colors for grid components.
Binary/BLOB
and CLOB Data
| Property |
Description |
Presentation of Binary/BLOB and CLOB Data
|
Specifies how binary/BLOB and CLOB data values are
represented in
grids. Setting this property to By Value results in performance
penalties and the memory consumption increases dramatically. |
Copy/Paste
and
Drag
& Drop of Binary/Blob and CLOB Data
|
Specifies what data is
transferred for binary/BLOB and CLOB data when copy and drag.
|
SQL
Editor
The editor category controls various settings specific for the SQL
Commander editor.
| Property |
Description |
Open SQL File in New DbVisualizer instance
|
Microsoft Windows only:
when enabled and opening a .sql file in Windows it will load into a new
SQL Editor in the running DbVisualizer instance. If disabled and
opening a .sql file then it will open in a new DbVisualizer instance.
|
| Recent Files Limit |
Specifies the max number of files listed in the File->Open
Recent sub menu. |
| Confirm Close of Unsaved Editors |
If enabled, DbVisualizer asks you whether to save the text
in an SQL editor with modified content (any editor; not only editors
loaded from file) when you close the editor. |
| Set "Sticky" for SQL Editor(s) |
If enabled, the Sticky flag is automatically set for all new
SQL Editors, which means that the database connection details only can
be changed manually. |
Tabs
|
Specifies settings for the tab keyboard key: Tab
Size (the
number of characters a tab character corresponds to), Whitespace(s) per
Tab (by how many characters to indent when the tab key is pressed), and
Expand Tab to Whitespace (if enabled, always insert space characters
when the tab key is pressed).
If Expand Tab to Whitespace is disabled, a tab character is inserted
when the tab key has been clicked as many times as it takes to indent
to the value specified by Tab Size, i.e., if Whitespace(s) per Tab is
set to 4 and Tab Size is set to 8, clicking the tab key twice results
in a tab character. |
|
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, set this one to the same as delimiter
1. |
| Allow "go" as Delimiter |
Specifies whether go as the first word on a single
line should 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.
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 feature substitutes
directly if there is only one matching entry |
| Display Delay |
Specifies the time in milliseconds until the auto completion
popup is displayed automatically |
Case for Auto
Completed Names
|
Specifies whether auto completed
names should be inserted in uppercase, lowercase or database default
|
Comments
| Property |
Description |
| Single Line Identifier 1 |
Specifies the character(s) that identifies the beginning of
a one line comment |
| Single Line Identifier 2 |
Specifies 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 |
| Block Comment End Identifier |
Specifies the character(s) that identifies the end of a
multi line comment block |
Variables
Variables can be used in the SQL executed in the SQL Commander. Before
executing an SQL statement or connecting a
database connection, a dialog is displayed, asking for replacement
values.
These settings define a character sequence that identifies a variable
and another sequence that delimits different parts of a variable.
Example:
${variable}$.
| Property |
Description |
| Variable Identifier Prefix |
The start identifier for a variable. Default is ${. |
| Variable Identifier Suffix |
The end identifier for a variable. Default is }$. |
| Variable Delimiter |
The delimiter used to identify the parts of a variable.
Default is ||.
|
SQL History
Settings used to control the SQL history feature.
| Property |
Description |
Ignore Duplicates and Collect in a Single
Entry
|
When enabled and executing the same SQL in sequence in the
SQL Commander then only one history entry is created. The Count field is increased for each
execution.
|
Ignore Error Entries
|
Enable to skip creating history entries when execution
results in error(s)
|
Ignore SQL (regex)
|
Don't create history entry if the SQL match this regular
expression
|
Proxy Settings
The
Check for Updates feature
requires HTTP access to the internet. If you access the internet
through a proxy, you must specify the proxy settings in order to use
this feature.
| Property |
Description |
| Proxy Type |
Specifies the type of proxy you use: HTTP or SOCKS |
| Proxy Host |
Specifies the name or the IP address for the proxy host |
| Proxy Port |
Specifies the proxy port number |
| Proxy User |
If the proxy requires authentication, specifies the proxy
user account name. Leave blank for a non-authenticating proxy |
| Proxy Password |
If the proxy requires authentication, specifies the password
for the proxy user account name. Leave blank for a non-authenticating
proxy |
Database
Settings
Database settings extends the General settings with properties that may
have different values per supported database type. You specify the
database type for a connection by choosing the appropriate type
from the
Database Type
list in the Connection tab. If there is no matching entry, use the
Generic database
type.
The database type specific properties in the Tool Properties apply to
all connections of the specific database type. You can also override
these properties in the
Connection Properties tab for a specific connection, in case you need
to use different values for connections of the same database type.
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 |
Specifies the connection mode for the database connection:
Development, Test or Production. Permissions
are based on connection mode. For the Test and Production modes,
DbVisualizer displays a border around areas where database content can
be edited, to bring your attention to the fact that you are connected
to a database where others may be affected by your changes. |
| 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 allows you to connect to
multiple database connections with a single click. Enable this property
to include database connections of this type when using the Connect All
feature. |
Authentication
| Property |
Description |
| Save Password |
If enabled, DbVisualizer saves the password for the database
connection between invocations. (The password is saved encrypted) |
| Clear Password at Disconnect |
If enabled, the password is cleared at disconnect |
| Require Userid |
If enabled, you are asked to enter a userid whenever the
database connection is established |
| Require Password |
If enabled, you are asked to enter a password whenever the
database connection is established |
Delimited
Identifiers
Delimited identifiers are identifiers which do not need to follow the
rules of regular database object identifiers. Usually,
delimited identifiers are used when you need to use
SQL
reserved words, spaces and mixed case sequences in an
identifier.
| Property |
Description |
| Begin Identifier |
Defines the start character for a delimited identifier.
Normally, this is a double quote as in "...". |
| End Identifier |
Defines the end character for a delimited identifier.
Normally, this is a double quote as in "...". |
| 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 |
Export
|
Enable this to use delimited
identifiers in the Export features
|
Qualifiers
These properties control whether table and column names should
be qualified when DbVisualizer generates SQL statement.
| Property |
Description |
| Qualify with Schema/Database: Scripting |
Enable this to qualify object names with the schema/database
in the Scripting features |
| Qualify with Schema/Database:
References/Navigator Graphs |
Enable this to qualify object
names with the schema/database
in the graphs shown in the References and Navigator tabs. |
| Qualify with Schema/Database: Auto
Completion/Query Builder |
Enable this to qualify object names with the schema/database
in the auto completion and query builder features. |
Qualify with
Schema/Database: Export
|
Enable this to qualify object names with schema/database in
the Export Schema and Export Table 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.
Note: When you specify a table name alias, it is always
used as a column name qualifier, regardless of this property setting. |
Physical Connection
The Physical Connection category controls whether DbVisualizer should
use only one physical connection with the database server or if
physical connections will be acquired when needed. The
Use Single Shared Physical Database
Connection
is disabled by default. If enabled then briefly it means that
whenever establishing a connection DbVisualizer will assign one
physical database connection for the objects tree and one per every SQL
editor in the SQL Commander. The physical connection for a SQL editor
is not acquired directly when the editor is created but rather when
doing the first execute in it.
If enabling
Use Single Shared
Physical Database Connection
then only one physical connection will be used for that database.
DbVisualizer will then share the physical connection among all features
communicating with the database. If using a single physical connection
and auto commit is off then a confirmation dialog may appear when
launching features that require transaction control and if there are
uncommitted changes in the database.
Transaction
| Property |
Description |
| Auto Commit |
Defines if each executed SQL statement will be auto
committed or not. This setting applies for all SQL statements that are
executed in the SQL Commander. |
Ask when Auto Commit is Off: When
Uncommitted Updates
|
If auto commit is off then this setting when enabled will
show a confirmation dialog if there are uncommitted changes (updates,
inserts, deletes, etc) in the SQL Commander. |
| Ask when Auto Commit is Off:
Always |
If auto commit is off then this
setting when enabled will
show a confirmation dialog if statements (not select) has been executed
in the SQL Commander without commit/rollback being invoked.
|
| 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. |
| Commit Batch Size |
Specifies after how many rows DbVisualizer commits the
transaction when saving a batch of changes in the table data editor and when inserting
rows in table data import. |
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 number of predefined variables, listed in the
SQL Templates
area right-click menu:
Figure:
All predefined variables
A specific predefined variable can be used in
one or more of the SQL templates. Using a variable that is not valid
for a specific SQL statement will result in the variable appearing
as-is when 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, for instance to modify the
appearance of
the where clause or the list of
columns.
| Property |
Description |
| 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 to clean up
various resources at
disconnect.
| Property |
Description |
| Run SQL at Connect |
Defines the SQL to be executed just after the connection has
been established |
| Run SQL at Disconnect |
Defines the SQL to be executed just before the connection
will be disconnected |
Objects
Tree Labels
| Property |
Description |
| Custom Object Tree Labels |
Here you can define custom tree labels for the data nodes in
the database objects tree. The Object Type must match the corresponding
type in the actual database profile, see more below. |
The label for a
data
node (e.g., a table or view node, as opposed to a node
that just groups nodes, such as the Tables node) is typically the name
of the database object the node represents, e.g., the table
or view name. In some cases, you may want to extend the label to
include other information, such as the name of the schema that the
object belongs to. To do this, you can use a custom tree label, defined
in the Objects Tree properties category.
You need two pieces of information to define a custom label: the Object
Type name for the data node, and the names of the variables that hold
the information you want to use in the label. You find this information
in the
<ObjectsTreeDef>
element in the database profile
XML file (described in detail in the
Database Profile
Framework section) for the database type you want to modify.
Using the database profile for the JavaDB/Derby database type as an
example,
a stripped down version of the
<ObjectsTreeDef>
element looks like this:
<ObjectsTreeDef id="derby">
<GroupNode type="Schemas" label="Schemas">
<DataNode type="Schema" label="${derby.getSchemas.Schema}">
<SetVar name="schema" value="${derby.getSchemas.Schema}"/>
<SetVar name="schemaId" value="${derby.getSchemas.Schema Id}"/>
[...]
<GroupNode type="Tables" label="Tables">
<DataNode type="Table" label="${derby.getTables.Table Name}" isLeaf="true">
<SetVar name="objectname" value="${derby.getTables.Table Name}"/>
<SetVar name="rowcount" value="true"/>
<SetVar name="acceptInQB" value="true"/>
[...]
</DataNode>
</GroupNode>
[...]
</DataNode>
[...]
</GroupNode>
[...]
</ObjectsTreeDef>
In this example, there is one
<DataNode>
element with a
type
attribute set to
Schema,
with a nested
<DataNode>
element with a
type
attribute set to
Table.
These two elements represent data nodes, for the schema and table
node, respectively, and the
type
attribute value is the Object Type name you need to bind the custom
label to an object type.
Each
<DataNode>
element also has a number of nested
<SetVar>
elements, declaring the variables you can use in the custom label
value. All variables declared for the object type node and those
declared for a parent
<DataNode>
element can be used in the label. So, if you want the label for table
nodes in the tree to show both the schema name and the table name, you
add a custom label declaration like this:
Figure: Custom label declaration
SQL Editor
| Property |
Description |
| Set Current Schema |
If enabled, changing the schema in the SQL Commander also
changes the default schema for the database connection, so that
unqualified table names in any SQL statement are associated with the
selected schema. If this property is not enabled, changing the schema
only affects the schemas used for auto-completion.
Note: Only a few databases supports setting the default
schema for an opened connection. This property is only shown for
database types that support it. |
Query Builder
| Property |
Description |
| Query Builder Auto-Join Properties |
With auto-join enabled, the Query Builder automatically
joins tables as they are included in the query, based on the specified
column matching rule: FK/PK declarations or columns with matching names
in different tables. |
| Generate JOIN clauses in Query Builder |
Specifies whether the Query Builder generates 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
DbVisualizer provides more support for some databases than for others,
and so
requires extended configuration capabilities for these databases.
Data
Types (Oracle)
With Oracle, the DATE data type should sometimes be handled as
TIMESTAMP. Enable
Handle
DATE as TIMESTAMP and DbVisualizer will convert DATE
into TIMESTAMP objects.
Data Types (DB2 and
JavaDB/Derby)
DB2 and JavaDB/Derby supports a data type named
CHAR FOR BIT DATA.
If
you
want
to
see
values
of
this
type as text, enable this property.
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 |
If enabled, critical nodes in the explain plan are
highlighted. |
| Critical Threshold |
Specifies the threshold for when a node should be handled as
critical |
| Warning Threshold |
Specifies 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.
Objects Tree (Oracle)
| Property |
Description |
| Show Empty Schemas |
If disabled, only schemas that contain database objects are
shown in the tree.
Note: Only disable this if you have DBA permissions,
otherwise no schemas as listed, |
| System View Prefix |
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 © 2010 DbVis Software AB. All rights reserved.