If you get an error
"Driver class not registered" or
"Driver not found" please check the following settings:
Make sure you have specified the correct location of the jar file. Some drivers (e.g. for IBM DB2) may require more than one jar file.
Check the spelling of the driver's class name. Remember that it's case sensitive. If you don't know the driver's class name, simply press the Enter key inside the input field of the jar file location. SQL Workbench/J will then scan the jar file(s) to find the JDBC driver
When creating a stored procedure (trigger, function) it is necessary to use a delimiter other than the normal semicolon because SQL Workbench/J does not know if a semicolon inisde the stored procedure ends the procedure or simply a single statement inside the procedure.
Therefor you must use an alternate delimiter when running a DDL statement that contains "embedded" semicolons. For details please refer to using the alternate delimiter.
When using databases that support timestamps or time data with a timezone, the display in SQL Workbench/J might not always be correct. Especially when daylight savings time (DST) is in effect.
This is caused by the handling of time data in Java and is usually not caused by the database, the driver or SQL Workbench/J
If your time data is not displayed correctly, you might try to explicitely specify the timezone when starting the application.
This is done by passing the system property
-Duser.timezone=XYZ to the application, where XYZ
is the timezone where the computer is located that runs SQL Workbench/J
The timezone should be specified relativ to GMT and not with a logical name. If you are in Germany and DST is active, you need
-Duser.timezone=Europe/Berlin does usually
When using the Windows launcher you have to prefix the paramter with -J to identify it as a parameter for the Java runtime not for the application.
When using non-default font sizes in the operating system, it can happen that the windows shown in SQL Workbench/J are sometimes too small and some GUI elements are cut off or not visible at all.
All windows and dialogs can be resized and will remember their size. If GUI controls are not visible or are cut-off simply resize the window until everything is visible. The next time the dialog is opened, the chose size will be restored.
In order to write the proprietary Microsoft Excel format, additional libraries are needed. Please refer to Exporting Excel files for details.
The memory that is available to the application is limited by the Java virtual machine to ensure that applications don't use all available memory which could potentially make a system unusable.
If you retrieve large resultsets from the database, you may receive an error message indicating that the application does not have enough memory to store the data.
Please refer to Increasing the memory for details on how to increase the memory that is available to SQL Workbench/J
If you experience a high CPU usage when running a SQL statement, this might be caused by a combination of the graphics driver, the JDK and the Windows® version you are using. This is usually caused by the animated icon which indicates a running statement (the yellow smiley). This animation can be turned off in Enable animated icons for details. A different icon (not animated) will be used if that option is disabled.→ See
Since Build 112 it is possible that the DbExplorer does no longer display views or tables if the selected schema (username) contains an underscore. This is caused by a bug in older Oracle JDBC drivers.
The driver calls used to display the list of tables and views in a specific schema expects a wildcard expression.
To avoid listing the objects for
USERX1 when displaying the objects for
the underscore must be escaped. The driver will create an expression similar to
AND owner LIKE 'USER_1' ESCAPE '\'
(which would return tables for
USERB1 and so on, including of course
The character that is used to escape the wildcards is reported by the driver. SQL Workbench/J sends e.g. the
USER\_1 if the driver reports that a backslash is used to escape wildcards.
However some older Oracle drivers report the wrong escape character, so the value sent to the database results in
AND owner LIKE 'USER\_1' ESCAPE '/'. The backslash in the expression is the character
reported by the driver, whereas the forward slash in the expression is the character
actually used by the driver.
To fix this problem, the escape character reported by the driver can be overridden by setting a property in
You can also change this property by running
This bug was fixed in the 11.2 drivers.
Due to a bug in Oracle's JDBC driver, you cannot retrieve columns with
LONG RAW data type if the
package is enabled.
In order to be able to display these columns, the support for
has to be switched off using the DISABLEOUT command
before runnnig a
SELECT statement that returns
LONG RAW columns.
SQL Workbench/J supports reading and writing BLOB data in
various ways. The implementation relies on standard JDBC API calls
to work properly in the driver. If you experience problems when updating
BLOB columns (e.g. using the enhanced
syntax or the DataPumper)
then please check the version of your Oracle JDBC driver. Only 10.x drivers
implement the necessary JDBC functions properly. The version of your driver
is reported in the log file when you make a connection to your Oracle server.
By default Oracle's JDBC driver does not return comments made on columns or tables
COMMENT ON ..). Thus your comments will not be shown in the database
To enable the display of column comments, you need to pass the property
to the driver.
In the profile dialog, click on the
and the value
true. Now close the dialog by clicking on the OK button.
Turning on this features slows down the retrieval of table information e.g. in the Database Explorer.
When you have comments defined in your Oracle database and use the WbSchemaReport command, then you have to enable the remarks reporting, otherwise the comments will not show up in the report.
DATE column in Oracle always contains a time as well. If you are not seeing
the time (or just 00:00:00) for a date column but you know there is a different time stored, please enable the
option "Oracle DATE as Timestamp" in the "Data formatting" section of the Options dialog
( → )
The content of columns with the data type
XMLTYPE cannot be displayed by SQL Workbench/J because
the Oracle JDBC driver does not support JDBC's XMLType and returns a proprietary implementation that can only be
used with Oracle's XDB extension classes.
The only way to retrieve and update XMLType columns using SQL Workbench/J is to cast the columns to a CLOB
CAST(xml_column AS CLOB) or
In the DbExplorer you can customize the generated SQL statement to automatically convert the XMLType to a CLOB. Please refer to the chapter Customize data retrieval in the DbExplorer for details.
When running statements that contain single line comments that are not followed by a space
the following Oracle error may occur:
ORA-01009: missing mandatory parameter [SQL State=72000, DB Errorcode=1009].
--This is a comment SELECT 42 FROM dual;
When adding a space after the two dashes the statement works:
-- This is a comment SELECT 42 FROM dual;
This seems to be a problem with old Oracle JDBC drivers (such as the 8.x drivers). It is highly recommend to upgrade the driver to a more recent version (10.x or 11.x) as they not only fix this problems, but are in general much better than the old versions.
It seems that the necessary API calls to list the tables of the
database (which is a database, not a schema - contrary to its name) are not implemented correctly
in earlier JDBC drivers of MySQL. Only the driver with the version 5.1.7 returns the list of tables
In case you receive an error message "
Operation not allowed after ResultSet closed"
please upgrade your JDBC driver to a more recent version. This problem was fixed with the MySQL JDBC
driver version 3.1. So upgrading to that or any later version will fix this problem.
MySQL allows the user to store invalid dates in the database (0000-00-00). Since
version 3.1 of the JDBC driver, the driver will throw an exception when trying to retrieve
such an invalid date. This behaviour can be controlled by adding an extended property
to the connection profile. The property should be named
zeroDateTimeBehavior. You can
set this value to either
convertToNull or to
round. For details
SQL Workbench/J retrieves the view definitioin from
For some unknown reason, the column
VIEW_DEFINITION sometimes does not contain the view definition
and the source is not displayed in the DbExplorer.
To make SQL Workbench/J use MySQL's
SHOW CREATE VIEW statement instead of the
you can set the property
workbench.db.mysql.use.showcreate.view to true, e.g. by running
SQL Server does not support standard object remarks using
COMMENT ON and the
JDBC drivers (jTDS and Microsoft's driver) do not return the so called "extended attributes"
through the JDBC API calls. To retrieve table and column remarks that are defined through
the stored procedure
sp_addextendedproperty(), SQL Workbench/J must
run additional statements to retrieve the extended properties. As these statements
can impact the performance of the DbExplorer, this is turned off by default.
To turn the retrieval of the extended properties on, please configure the necessary properties. For details, see the section Retrieving remarks for Microsoft SQL Server.
In order to use the integrated Windows authentication (as opposed SQL Server Authentication) the Microsoft JDBC driver is required. It does not work with the jTDS driver.
When using Windows authentication the JDBC driver will try to load a Windows DLL named
This DLL either needs to be on the Windows
PATH definition or in the directory where
is located. You need to make sure that you use the correct "bit" version of the DLL. If you are running a 32bit Java Runtime you have to use
the 32bit DLL. For a 64bit Java Runtime you need to use the 64bit DLL (the architecture of the server is not relevant).
When displaying an execution plan using
SET SHOWPLAN_ALL ON and the following error is thrown:
The TDS protocol stream is not valid. Unexpected token TDS_COLMETADATA (0x81). please
set "Max. Rows" to 0 for that SQL panel. Apparently the driver cannot handle showing the execution plan and
having the result limited.
Microsoft SQL Server (at least up to 2000) does not support concurrent reads and writes
to the database very well. Especially when using DDL statements, this can lead to
database locks that can freeze the application. This affects e.g. the display of the tables
in the DbExplorer. As the JDBC driver needs to issue a SELECT statement to retrieve the table
information, this can be blocked by e.g. a non-committed
statement as that will lock the system table(s) that store the meta information about tables
Unfortunately there is no real solution to blocking transactions e.g. between a SQL tab and the DbExplorer. One (highly discouraged) solution is to run in autocommit mode, the other to have only one connection for all tabs (thus all of them share the same transaction an the DbExplorer cannot be blocked by a different SQL tab).
The Microsoft JDBC Driver supports a connection property called
It is recommended to set that to 0 (zero) (or a similar low value). If that is done, calls
to the driver's API will through an error if they encounter a lock rather than waiting
until the lock is released. The jTDS driver does not support such a property. If you are using
the jTDS driver, you can define a post-connect script that
SET LOCK_TIMEOUT 0.
This error usually occurs in the DbExplorer if an older Microsoft JDBC Driver is used and the connection does not use autocommit mode. There are three ways to fix this problem:
;SelectMethod=Cursorto your JDBC URL
This article in Microsoft's Knowledgebase gives more information regarding this problem.
The possible parameters for the SQL Server 2005 driver are listed here: http://msdn2.microsoft.com/en-us/library/ms378988.aspx
The jTDS driver and the Microsoft JDBC driver read the complete result set into memory before returning it to the calling application. This means that when retrieving data, SQL Workbench/J uses (for a short amount of time) twice as much memory as really needed. This also means that WbExport or WbCopy will effectively read the entire result into memory before writing it into the output file. For large exports this us usually not wanted.
This behaviour of the drivers can be changed by adding an additional parameter to the
JDBC URL that is used to connect to the database. For the jTDS driver append
useCursors=true to the URL, e.g.
The URL parameters for the jTDS driver are listed here: http://jtds.sourceforge.net/faq.html#urlFormat
For the Microsoft driver, use the parameter
switch to a cursor based retrieval that does not buffer all rows within the driver, e.g.
Note that since Version 3.0 of the driver
The URL parameters for the Microsoft driver are listed here: http://msdn2.microsoft.com/en-us/library/ms378988.aspx
When a sequence is incremented twice when running
SELECT NEXT VALUE FOR MYSEQ; and you are using
the Microsoft JDBC driver with the
selectMethod=cursor, remove the
from the JDBC URL. The sequences will then be incremented correctly.
If date values before 1940-01-01 are not displayed in the results at all, you have to
add the parameter
;date format=iso to your JDBC connection url. Note the
See IBM's FAQ for details: http://www-03.ibm.com/systems/i/software/toolbox/faqjdbc.html#faqB5
When using the DB2 JDBC drivers it is important that the
is part of the used JDK (or JRE). Apparently the DB2 JDBC driver needs this library in
order to correctly convert the EBCDIC characterset (used in the database) into the
Unicode encoding that is used by Java.
charsets.jar is usually included in all multi-language
If you experience intermittent "Connection closed" errors when running SQL statements,
please verify that
charsets.jar is part of your JDK/JRE installation.
This file is usually installed in
The content of columns with the data type
XML are not displayed in the DbExplorer
(but something like
com.ibm.db2.jcc.am.ie@1cee792 instead) because the driver does not convert
them to a character datatype. To customize the retrieval for those columns, please
refer to the chapter Customize data retrieval in the DbExplorer.
When using a JDBC4 driver for DB2 (and Java 6), together with SQL Workbench/J build 107, XML content will be displayed directly without the need to cast the result.
When running SQL statements in SQL Workbench/J and an error occurs, DB2 does not show a proper error message.
To enable the retrieval of error messages by the driver you have to set the extended
The connection properties for the DB2 JDBC driver are documented here:
The example claims that this property is only needed for z/OS, but it works as described for LUW as well.
REORG, RUNSTATS and other db2 command line commands cannot be be run directly through a JDBC interface because
those are not SQL statements, but DB2 commands. To run such a command within SQL Workbench/J you have to use the
sysproc.admin_cmd(). To run e.g. a REORG on a table you have to run the following statement:
call sysproc.admin_cmd('REORG TABLE my_table');
The PostgreSQL JDBC driver defaults to buffer the results obtained from the database in memory before returning them to the application. This means that when retrieving data, SQL Workbench/J uses (for a short amount of time) twice as much memory as really needed. This also means that WbExport or WbCopy will effectively read the entire result into memory before writing it into the output file. For large exports this us usually not wanted.
This behaviour of the driver can be changed so that the driver uses cursor based retrieval. To do this, the connection profile must disable the "Autocommit" option, and must define a default fetch size that is greater than zero. A recommended value is e.g. 10, it might be that higher numbers give a better performance. The number defined for the fetch size, defines the number of rows the driver keeps in its internal buffer before requesting more rows from the backend.
More details can be found in the driver's manual: http://jdbc.postgresql.org/documentation/83/query.html#query-with-cursor
PostgreSQL marks a complete transaction as failed if a only single statement fails. In such a case the transaction cannot be committed, e.g. consider the following script:
INSERT INTO person (id, firstname, lastname) VALUES (1, 'Arthur', 'Dent'); INSERT INTO person (id, firstname, lastname) VALUES (2, 'Zaphod', 'Beeblebrox'); INSERT INTO person (id, firstname, lastname) VALUES (2, 'Ford', 'Prefect'); COMMIT;
As the ID column is the primary key, the third insert will fail with a unique key violation.
In PostgreSQL you cannot commit anyway and thus persist the first two
This problem can only be solved by using a SAVEPOINT before and after each statement. In case that statement fails, the transaction can be rolled back to the state before the statement and the reminder of the script can execute.
Doing this manually is quite tedious, so you can tell SQL Workbench/J to do this automatically for you by setting the properties:
in the file workbench.settings. If this is enabled,
SQL Workbench/J will issue a
SET SAVEPOINT before running each statement
and will release the savepoint after the statement. If the statement failed, a rollback to the
savepoint will be issued that will mark the transaction as "clean" again. So in the above
sql.usesavepoint set to
true), the last
statement would be rolled back automatically but the first two
can be committed (this will also required to turn on the "Ignore errors" option is enabled).
to enable the usage of savepoints during imports. This setting also affects
You can also use the parameter
-useSavepoint for the
WbCopy commands to control the use of
savepoints for each import.
Using savepoints can slow down the import substantially.
nvarcharare not displayed properly
The jConnect driver seems to have a problem with
nvarchar columns. The data type is not reported properly by the driver,
so the display of the table structure in the DbExplorer will be wrong for those columns.