Driver management
dbvr connects to databases using JDBC drivers. Some drivers are preconfigured and shipped with the application, while others are downloaded automatically from Maven Central when first used. If you need a specific driver version or want to use a custom one, you can update it manually.
Tip
Run dbvr driver list to see which drivers are already downloaded.
Preconfigured drivers location¶
Preconfigured drivers are bundled with dbvr and stored in the installation directory:
| OS | Default drivers directory |
|---|---|
| macOS | /Applications/dbvr.app/Contents/Eclipse/drivers |
| Windows | C:\Program Files\dbvr\drivers |
| Linux (package install) | /usr/share/dbvr/drivers |
| Linux (archive install) | ~/dbvr/drivers |
Tip
On Linux, the archive path depends on where you extracted dbvr. Replace ~/dbvr with your actual
installation directory.
Maven drivers location¶
Some drivers aren’t bundled with dbvr. They are downloaded automatically from Maven Central when you connect to the database for the first time.
Note
By default, dbvr resolves the RELEASE version of the driver artifact.
Maven drivers are stored in the DBeaverData directory, which is located next to the workspace:
- On Windows, open Explorer and enter the path
%APPDATA%\DBeaverData\drivers\maven\maven-central\. - On Linux, execute
cd $XDG_DATA_HOME/DBeaverData/drivers/maven/maven-central/. - On MacOS, navigate to
~/Library/DBeaverData/drivers/maven/maven-central/in Finder. To view hidden folders, press Cmd+Shift+..
Update a driver¶
- Download the required JDBC
.jar. -
Open the appropriate driver directory:
- for preconfigured drivers - see Preconfigured drivers location.
- for Maven drivers - see Maven drivers location.
-
Replace the file with the new version.
Configure drivers with drivers.xml¶
dbvr has no graphical Driver Manager, so driver settings live in a configuration file called drivers.xml. Edit this
file directly when you need to:
- add a custom driver for a database that isn't preconfigured.
- set a driver parameter.
- add a library to an existing driver.
The file sits in the workspace, under the .metadata/.config directory:
DBeaverData/workspace6/.metadata/.config/drivers.xml
How driver entries are structured¶
Each driver sits inside a <provider> element. The <driver> element holds the connection details, and one or more
<library> elements point to the files the driver needs.
Example
<provider id="db2_zos">
<driver id="db2_zos" category="Db2" categories="sql,legacy,mainframe" name="Db2 for z/OS" class="com.ibm.db2.jcc.DB2Driver" url="jdbc:db2://{host}[:{port}]/{database}" port="50000" description="IBM Db2 driver for z/OS" custom="false">
<library type="license" path="drivers/db2/LICENSE.txt" custom="false"/>
<library type="jar" path="drivers/db2" custom="false"/>
</driver>
</provider>
The attributes you'll use most often:
| Attribute | Element | Description |
|---|---|---|
id |
<driver> |
Unique identifier for the driver |
name |
<driver> |
Name shown when you run dbvr driver list |
class |
<driver> |
Fully qualified JDBC driver class |
url |
<driver> |
URL template used to build the connection string |
port |
<driver> |
Default port |
custom |
<driver> |
true for a driver you added yourself, false for a bundled one |
type |
<library> |
File type, either jar or zip |
path |
<library> |
Local path to the file, or a Maven coordinate like maven:/group:artifact:RELEASE |
version |
<library> |
Version currently downloaded and in use |
Add a custom driver¶
Add your driver under the existing generic provider, with a <driver> marked custom="true", then point it at the
driver .jar with a <library> element. The library path can be a local file or a Maven coordinate.
<provider id="generic">
<driver id="my_custom_db" categories="sql" name="My custom database" class="com.example.jdbc.Driver" url="jdbc:example://{host}:{port}/{database}" port="9000" description="Custom JDBC driver" custom="true">
<library type="jar" path="maven:/com.example:example-jdbc:RELEASE" custom="true"/>
</driver>
</provider>
Warning
Add custom drivers under the generic provider. dbvr only loads drivers for providers already registered
in the application, so a driver placed under a new provider id is ignored.
Tip
Set url to a template that uses variables like {host}, {port}, and {database}. dbvr fills these in
from your connection settings.
Confirm the driver loaded by running dbvr driver list. It appears under generic (Generic):
Add a driver parameter¶
Add a <parameter> element inside the <driver> you want to change. Each parameter takes a name and a value.
<driver id="my_custom_db" ... custom="true">
<parameter name="read-only-data" value="false"/>
<library type="jar" path="maven:/com.example:example-jdbc:RELEASE" custom="true"/>
</driver>
Add a library to an existing driver¶
Add another <library> element inside the <driver>. Use this when the driver needs an extra dependency that isn't
bundled.
<library type="jar" path="maven:/org.apache.httpcomponents.client5:httpclient5:RELEASE" custom="false" version="5.4.4"/>
Note
When you point a library at a Maven coordinate ending in RELEASE, dbvr downloads the latest published
version the next time it uses the driver.
Reference a pre-installed jar¶
Instead of a Maven coordinate, you can point a <library> at a .jar already on disk. Set custom="true" and use an
absolute path:
For relative paths, use these variables:
| Variable | Resolves to |
|---|---|
${drivers_home} |
dbvr drivers directory (DBeaverData/drivers) |
${dbeaver_home} |
dbvr installation folder |
${home} |
User home folder |
${workspace} |
dbvr workspace path |