DBeaver Documentation

DOWNLOAD pdf

Database drivers

Overview

DBeaver supports many types of databases, including SQL, NoSQL, and others, by using pre-configured drivers to establish connections. If a specific database is not supported by default, you can manually add its JDBC driver through the Driver Manager.

Tip: DBeaver also supports ODBC drivers for users who prefer this standard. For more information on integrating ODBC drivers, see ODBC driver.

Obtaining a JDBC driver

A JDBC driver is a Java library that lets you connect and work with a specific database. It includes everything needed to use all the features of the database. These drivers are usually provided by the companies that create the databases.

JDBC drivers are made up of one or more .jar files. These files contain the code and other important files needed to use the driver. To add a new driver to DBeaver, you first need to get these .jar files. You can find them included with your database server or download them from the database provider’s website. If you are not sure where to find them, ask your database administrator.

Driver Manager

To begin adding a new JDBC driver, first open the Driver Manager. You can find it by navigating to Databases -> Driver Manager from the main menu.

Button Description
New Creates a new driver configuration.
Copy Copies the selected driver configuration.
Edit... Opens the selected driver configuration for editing.
Delete Removes the selected driver configuration from DBeaver.
Un-delete Restores recently deleted driver configurations.

Add a new driver

Click the New button to start adding a new driver. In the driver edit dialog, you will need to fill all the necessary details to configure the driver.

Main parameters

Parameter Description
Driver Name The name you assign to the driver. This can be any descriptive name that helps you identify the driver among others.
Driver Type Specifies the type of the driver used for connecting to the database. Users typically select the appropriate driver type based on the database being connected to. For unsupported databases, the Generic type is often used. For more information see section below.
Class Name The fully qualified name of the Java class for the JDBC driver. This is the main class that Java uses to interact with the database. It can often be found in the driver's documentation or by inspecting the .jar file.
URL Template A template for the database connection URL. If left empty, you must specify the JDBC URL manually for each connection. It's recommended to provide a template to simplify connection setup. For more information see section below.
Default Port The port number typically used by the database. This is optional and can be left blank if the port is non-standard or varies between installations.
Embedded Check this option if the database runs embedded within an application. This setting adjusts network and connection management configurations accordingly.
No Authentication Indicates that the driver does not use authentication. If selected, user and password input fields will be hidden in connection dialogs.
Category Used to group drivers within DBeaver. This field is deprecated but may still appear in some versions of the software.
ID A system-generated unique identifier for the driver. This is usually auto-filled.
Description A brief description of the driver.

Generic driver

The Generic driver allows you to connect to databases that do not have a predefined JDBC driver. It works with any database that supports JDBC, giving you control to manually load the required JDBC library.

This driver is useful for connecting to custom or uncommon databases. It ensures flexibility in setting connection parameters, but you must ensure that the JDBC driver you provide is fully compatible with the database to avoid issues with connections or queries.

URL template

JDBC drivers use URLs to connect to databases, similar to web URLs. These URLs typically follow the format jdbc:vendor:host:port/database. For example, a PostgreSQL database might use jdbc:postgresql:localhost:5432/postgres. Directly editing these long and complex strings can be prone to errors and inconvenient.

DBeaver simplifies this process by constructing the URL from connection parameters like host, port, and database name, which you provide on the connection configuration page. For the example mentioned, the URL template would be: jdbc:postgresql://{host}:{port}/{database}

For more information on the available variables, see Pre-configured variables.

Libraries

The Libraries tab displays a list of .jar files, binary libraries (such as .dll or .so files), and other files necessary for the driver. Typically, you only need to add .jar files here.

Button Description
Add File Adds a single .jar file. Useful for including individual JDBC driver files or additional libraries needed.
Add Folder Adds an entire directory that contains Java classes or resources, facilitating bulk additions.
Add Artifact Allows for the inclusion of a Maven artifact directly, streamlining dependency management for users who utilize Maven. For more information see the section below.
Edit... Allows you to modify the selected file or folder properties.
Delete Enables you to remove a selected file or folder from the list.
Download/Update Allows for the downloading or updating of the selected library file or artifact.
Information Provides detailed information about the selected file or artifact, such as version, source, and dependencies.
Find Class Searches the added .jar files for JDBC driver classes and displays all found classes, enabling you to select the correct one for your configuration.
Classpath Displays the full classpath constructed from the added files and folders, useful for debugging or verification purposes.

Once you have added the necessary .jar files, you can locate the JDBC driver classes contained within these files. Click the Find Class button, and DBeaver will list all available driver classes found in the added .jars. Usually, there is only one driver class per driver, but if multiple classes are listed, you should consult the driver's documentation to identify the correct one.

Maven artifacts

DBeaver can download driver .jars from the Maven repository, a global collection of Java libraries. If your database driver is listed in this public repository, you can use this feature. Maven artifacts are useful because they let you see all driver versions and change the driver version during runtime without reconfiguring driver properties.

For additional information, see How to add additional artifacts to the driver.

Driver properties

The Driver Properties tab displays default connection properties related to the JDBC driver once a driver file is loaded. This tab allows for the configuration and customization of various driver-specific settings necessary for establishing and managing database connections.

Advanced parameters

For most JDBC drivers, the default advanced properties suffice. However, you may find it beneficial to adjust these settings for performance optimization or to correct structural issues.

Main parameters
Parameter Description
Driver supports indexes Indicates if the driver can utilize table indexes.
Driver supports stored code Supports stored database objects like procedures, functions, and packages.
Driver supports references Allows the driver to handle table references such as foreign keys.
*Driver supports SELECT count() clause** Supports the use of the SELECT count(*) SQL clause.
Driver supports views Enables the driver to manage table views.
Split procedures and functions Displays procedures and functions in separate folders in the UI.
Script delimiter Character or string used to separate SQL statements in scripts.
Script delimiter redefiner SQL clause that changes the script delimiter during execution.
Use script delimiter after query Retains the delimiter after each SQL query within scripts.
Use script delimiter after SQL block Maintains the delimiter after SQL blocks like BEGIN/END.
String escape character Character used to escape special characters in SQL strings.
Meta model type Defines the metadata model type, either standard or indexed.
All Objects Pattern SQL pattern to match all metadata objects.
Omit catalog(s) Skips catalog (database) information in metadata operations.
Omit single catalog Hides catalog in the UI if only one exists on the server.
Omit schema(s) Omits reading schema information from metadata.
Omit single schema Hides schema in the UI if only one exists.
Use schema filters Applies JDBC schema filters for databases not supporting catalogs, or filters schemas client-side.
Omit type cache Avoids using the driver's internal cache for data types.
Shutdown parameter Parameter for shutting down the database through URL.
Create database parameter URL parameter used to create a new database.
Driver supports multiple results Supports multiple result sets per query.
Driver supports result set limit Allows setting limits on the number of rows in a result set.
Driver supports structure cache Uses cache for database structure such as columns and keys.
Driver supports TRUNCATE operation Enables use of the TRUNCATE command, faster than using DELETE.
Queries
Parameter Description
Get active database Retrieves the name of the currently active database.
Set active database Sets the active database during the session.
Shutdown database Command to shut down the active database connection.
PING query SQL query to check the connection state.
Dual table name Specifies the name of a dummy table used for evaluating expressions.
Active object type Defines the type of database object that can be selected (e.g., schema, catalog).
Driver supports results scrolling Enables scrolling through results in the result set.
Quote reserved words Automatically quotes SQL reserved words when they conflict with identifier names.
Escape LIKE masks in search queries Escapes special characters in LIKE clauses during metadata searches.
DDL
Parameter Description
Drop column short syntax Uses a shorter syntax for dropping columns.
Drop column - use brackets Encloses column names in brackets when dropping.
Use legacy SQL dialect for DDL Uses a traditional SQL dialect for DDL operations.
Add COLUMN keyword in alter table query Adds the COLUMN keyword in ALTER TABLE queries for clarity.
Formatting
Parameter Description
Timestamp format The format pattern for timestamp columns.
Date format The format pattern for date columns.
Time format The format pattern for time columns.

For more information on a date/time format pattern, see DateTimeFormatter documentation.

Saving the driver and adding a connection

Once you have completed configuring your driver, click the Ok button to save the settings. You are now ready to Create a connection.

Editing driver

Editing an existing driver can be done through several access points:

  • Driver Manager: Navigate through Databases -> Driver Manager in the main menu to edit any listed driver.
  • Database Navigator: Right-click on a database connection to open the context menu, then select Edit Configuration to open the Connection Properties dialog. This method allows you to modify the driver settings linked specifically to that connection.