DbVisualizer

This section describes how to connect DbVisualizer to Exasol and run an SQL statement. DbVisualizer Pro is the recommended SQL client by Exasol. To know more about the benefits of the Pro version, see Exasol Specific Features.

Environment

The following environment is used as an example:

  • DbVisualizer Pro Edition on Windows

Prerequisite

  • DbVisualizer installed.
  • Exasol should be installed and the database instance should be online.
  • A public network where both Exasol database and the host containing DbVisualizer can use to communicate.

Connect to Your Database

Do the following to connect to your Exasol database from DbVisualizer:

  1. Open DbVisualizer and select Tools > Connection Wizard.
  2. Enter a name for the connection in the New connection Wizard(for example, Exasol) and click Next.
  3. Connect DbVisualizer to Exasol

  1. In the Select Database Driver screen, select Exasol and click Next.

    Connect DbVisualizer to Exasol - Select Database Driver

  2. In the next screen, enter the following connection details: 
    • Database Server: Enter the Connection string.
    • Database Port: Enter the port number. The default port is 8563.
    • Database Userid: Enter your user name.
    • Database Password: Enter your Password.
  3. Connect DbVisualizer to Exasol - Connection Details

    If the Exasol installation instance is new, the username is sys and the password is exasol.

  4. To check your connection, click Ping Server .
  5. To complete the connection configuration, click Finish.

    After connecting to the Exasol database, Exasol is listed in the Databases tab under the Connections tree.

  6. To create a new SQL Commander, click SQL CommanderNew SQL Commander.

    Connect DbVisualizer to Exasol - New SQL Commander

  7. Run your SQL statements in the new SQL Commander.

    Connect DbVisualizer to Exasol - Run SQL Statement

Recommended Settings

To remove issues with --/, click Tool Properties > GeneralSQL Commander > Statement Delimiters and select Allow SQL Dialects.

EXAplus to DbVisualizer

Here are some best practices if you are moving from the old EXAplus client to DbVisualizer:

Keyboard Shortcuts

In EXAplus, the keyboard shortcuts for the statements start with CTRL+Enter. In DbVisualizer, it is CTLR+.

If you want to configure the shortcuts, see Changing Keyboard Shortcuts in DbVisualizer documentation.

Auto Complete

In EXAplus, to use the auto completion of table/column names you need to first type the schema name. In DbVisualizer, you can directly access the table or column name without the need to fully qualify the object. In DBVisualizer, if you are in the context of a schema, only the tables of that schema are shown in the auto completion. To know more about the feature, see Auto Completion in DbVisualizer documentation.

You can also customize the behavior of the auto-completion from Tools > Tool Properties > SQL Commander > Auto Completion.

Creating LUA Scripts and UDFs

In DBVisualizer, LUA scripts / UDFs should be created as an SQL block. The start of the SQL Block is --/ and the end of the block is defined with /. For example:

--/
CREATE LUA SCRIPT MY_CAT RETURNS TABLE AS

return query([[select * from cat]])

/

By default, the keywords in DbVisualizer are displayed in uppercase. So if you open an existing LUA script, keywords are automatically transformed to uppercase and they won't work. To change this setting:

  1. Go to Tool Properties > Tools > SQL Formatting.
  2. Select Keep Case As is in the Case drop-down.

Additionally, see Executing Complex Statements.

Favorites or Bookmarks

In EXAplus, frequently used SQL Statements are stored in the Favorite tab.

In DBVisualizer, a similar feature is called Bookmarks. To know more about the bookmarks feature, see Managing Frequently Used SQL in official DbVisualizer documentation.

EXAplus Commands

EXAplus commands like set autocommit off won't work in DbVisualizer. DbVisualizer has its own syntax for its client commands. The commands start with @. For example, @set autocommit off;.

To know more about the client's commands, see Using Client-Side Commands in official DbVisualizer documentation.

Troubleshooting

Problem DbVisualizer has problem with delimiting Scripts.

Solution: To tell DbVisualizer that a part of a script should be handled as a single statement, you can insert an SQL block begin-identifier just before the block and an end-identifier after the block. The delimiter must be the only text on the line. The default begin-identifier consists of two dashes followed by a forward slash (--/) and for the End Identifier it is a single slash (/).

Problem: New Schema isn't visible in SQL Editor drop-down.

Solution: If the newly created schema is not visible in the SQL Editor drop-down, right click the connection and select Reconnect.

Problem: R scripts sent from a Windows OS using DbVisualizer are not executed. This issue occurs because DbVisualizer uses the platforms linefeed convention CRLF for Windows and LF for all other platforms.

Solution:

  1. In DbVisualizer installation folder, open the file /resources/dbvis-custom.prefs in a text editor.
  2. Add dbvis.exasol.ReplaceCRLFwithLF=true as a new row and save the file.
  3. Restart DbVisualizer.

Next Step

After connecting DbVisualizer to Exasol, you can start loading data into the Exasol database. For more information, see Loading Data.

Further Information

For more information about DbVisualizer, see DbVisualizer Official Documentation.