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.
The following environment is used as an example:
- DbVisualizer Pro Edition on Windows
- 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:
- Open DbVisualizer and select Tools > Connection Wizard.
- Enter a name for the connection in the New connection Wizard(for example, Exasol) and click Next.
In the Select Database Driver screen, select
Exasoland click Next.
- In the next screen, enter the following connection details:
- Database Server: Enter the
- Database Port: Enter the port number.
The default port is 8563.
- Database Userid: Enter your user name.
- Database Password: Enter your
- Database Server: Enter the
- To check your connection, click Ping Server .
- To complete the connection configuration, click Finish.
After connecting to the Exasol database, Exasol is listed in the Databases tab under the Connections tree.
- To create a new SQL Commander, click SQL Commander > New SQL Commander.
- Run your SQL statements in the new SQL Commander.
If the Exasol installation instance is new, the username is sys and the password is exasol.
To remove issues with --/, click Tool Properties > General > SQL 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:
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.
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:
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:
- Go to Tool Properties > Tools > SQL Formatting.
- 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 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.
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.
- In DbVisualizer installation folder, open the file /resources/dbvis-custom.prefs in a text editor.
- Add dbvis.exasol.ReplaceCRLFwithLF=true as a new row and save the file.
- Restart DbVisualizer.
After connecting DbVisualizer to Exasol, you can start loading data into the Exasol database. For more information, see Loading Data.
For more information about DbVisualizer, see DbVisualizer Official Documentation.