Guaranteed to save you time with your database tasks

FAQ

Configuration

DbWrench produces a 'java.lang.OutOfMemory' error.
What is causing the error 'JDK 7.0 or newer cannot be found on your machine'?
On Linux and Mac systems DbWrench creates its 'config' directory in my home directory. How can I change it so it creates it in the DbWrench application directory?
How to specify a particular JDK/JRE to use?
Why do I get 'NoSuchMethodError' when starting DbWrench?
How can the editor toolbar and line numbering be enabled?

Database

How can I specify that forward engineer scripts be executed within a transaction?
How can I generate 'create' (not update) DDL scripts?
Do the SQL editors in DbWrench support code completion?
Why don't some data types show up in the data type combo boxes?
Why does a MySQL column still have unique restriction after forward engineering even though I unchecked the UNIQUE flag?

Connections

Connection combobox does not show my connection.
Connecting to a MySQL installation on Linux results in 'Server configuration denies access to data source'.
How do I specify the instance name in a connection to MS SQL Server?
Connecting to a MS SQL Server installation results in 'I/O Error: SSO Failed: Native SSPI library not loaded'.
Connecting to a MS SQL Server using Windows Authentication

Diagram

How can I slide/translate diagrams using the 'hand' control?
How can right-click functionality be accessed with a single button mouse?

DbWrench produces a 'java.lang.OutOfMemory' error.

A java.lang.OutOfMemory error may occur during viewing of large diagrams, large design files or other memory intensive tasks. By default DbWrench allocates approximately 256 MB of memory for itself, this maybe inadequate for larger designs. More memory can be allocated using the following procedure.

Navigate to the DbWrench installation folder. Usually dbwrench.

Then navigate to the etc subfolder.

Open the dbwrench.conf file in an editor. See the screen-shot below.

In the default_options line, change -J-Xmx256m to -J-Xmx512m.

To allocate an amount other than 512MB, just use that number instead.

Increase Java Startup Memory


What is causing the error 'JDK 7.0 or newer cannot be found on your machine'?

The JDK (Java Development Kit) is not in the location DbWrench expected. This can be fixed by editing a DbWrench .conf file.

Find the location of your JDK.

Then open the dbwrench.conf file in an editor. This file is located in the etc subfolder of the DbWrench installation folder.

Specify your path in the line circled in the screen-shot below. An example path would be something like C:\Program Files\Java\jdk1.7.0_13. Make sure to remove the '#' at the start of the line.

Restart DbWrench.

Configure JDK Path


Do the SQL editors in DbWrench support code completion

Yes. As you are typing in an editor, hit CTRL-Space to bring up the code completion window.

SQL Editor Code Complete


How to specify a particular JDK/JRE to use?

You can see the Java version DbWrench is using in the About dialog box within DbWrench.

To switch Java versions, open the dbwrench.conf file in an editor. This file is located in the etc subfolder of the DbWrench installation folder.

Specify your path in the line circled in the screen-shot below. An example path would be something like C:\Program Files\Java\jdk1.7.0_13. Make sure to remove the '#' at the start of the line.

Restart DbWrench.

Configure JDK Path


Why don't some data types show up in the data type combo boxes?

Some datatypes, particularly those that are specific to a particular database are disabled by default. You can enable them by using the Preferences panel, selecting Data Types in the list on the left and then enabling/disabling data types.

Enable Database Specific Data Types


How can I specify that forward engineer scripts be executed within a transaction?

Go to the Preferences panel, select Forward Engineering in the list on the left then make sure Use Transactions is selected.

Execute DDL Scripts within Transactions


How can I generate 'create' (not update) DDL scripts.

Select one of the 'generic' connections listed at the bottom of the Connections combobox before generating the forward engineer script.

Generic Connections to Generate DDL Create Scripts


Why do I get 'NoSuchMethodError' when starting DbWrench.

This usually indicates that you running an older version of the Java Runtime Environment (JRE). You can upgrade your JRE for free at www.java.com.



Connection combobox does not show my connection.

Forward Engineer filters out connections that do not have the same 'Database' name as the database name of the current DbWrench design. This happens if connection filtering is enabled in Preferences. To prevent filtering, from main menu go to Edit | Preferences. Then select Forward Engineer in the list on the left side. Make sure the Filter Connection List by Database Name is not selected.

Filter Database Connections by Database Name


Connecting to a MySQL installation on Linux results in a 'Server configuration denies access to data source' error.

MySQL docs explain the problem in more detail here (Section 20.4.5.3.1). Generally it's a privileges problem.



How do I specify the instance name in a connection to MS SQL Server?

Specify the instance name in the Optional Parameters field as shown in this example.

Specifying SQL Server Instance Name


Connecting to a MS SQL Server installation results in 'I/O Error: SSO Failed: Native SSPI library not loaded'.

DbWrench uses the jTDS JDBC driver to connect to SQL Server. This error occurs if the SQL Server installation is using Windows Authentication instead of SQL Server Authentication. Switching authentication methods will solve this problem. If this is not possible, installing the ntlmauth.dll native library will also address this problem. This dll is bundled in the jTDS zip file which can be downloaded for free from here. The zip file also includes readme.sso which has installation instructions for this dll.

Here is an outline of the installation instructions:
  1. From the zipped folder, locate the version of ntlmauth.dll that is appropriate for your system. For example, 32-bit version or 64-bit version.
  2. Copy this dll to any folder on your system path. You can view your system path by typing echo %path% at the command prompt.
  3. You may need to restart your system.

Also see the sample connection configurations



Connecting to a MS SQL Server using Windows Authentication

See the above question:

Connecting to a MS SQL Server installation results in 'I/O Error: SSO Failed: Native SSPI library not loaded'.



How can I slide/translate diagrams using the 'hand' control.

If the SHIFT key is down while the mouse is over a diagram panel, the 'hand' cursor should appear. Keeping the SHIFT key down, the diagram will 'slide' or translate as the mouse is moved.

Sliding a Diagram Using the 'Hand' Control


Why does a MySQL column still have unique restriction after forward engineering even though I unchecked the UNIQUE flag?

A unique index on that column will supercede the UNIQUE flag value. So make sure to remove any unique indexes on that column in addition to unchecking the UNIQUE flag.



On Linux and Mac systems DbWrench creates its 'config' directory in my home directory. How can I change it so it creates it in the DbWrench application directory?

Generally a user's home directory is used as the current working directory. So adding the line 'cd "$progdir/.." to the 'dbwrench2' shell script, as shown belown, will change the working directory to the application directory. The shell script is located in the 'bin' directory.

Shell Script Changes to Set Working Directory



© 2017 Nizana Systems
All rights reserved