Dbeaver установка драйвера вручную



How to install the database driver for Dbeaver without a network-Take installing the Oracle driver as an example

ready:

1. A computer that can connect to the network and has Dbeaver installed;
2. A U disk;
3. The target computer that cannot connect to the network.

Such asreferenceAs mentioned, it is recommended to set the download path of the driver to Alibaba Cloud. For the specific setting method, please refer to the article header display link.

Step 1: Open dbeaver on a computer with internet, and click Database>Driver Manager>Oracle>Edit in turn to enter the interface as shown in Figure 1:

Select any one in the green box No. 3, click Download/Update, hover the mouse over it after downloading, the corresponding local address will be displayed, and enter this address after downloading one by one. The author’s address is shown in Figure 2 below:

Step 2: Copy these files to a computer that cannot connect to the network via a USB flash drive, and select a folder address that you will not easily delete and store.

Step 3: Also click Database>Driver Manager>Oracle>Edit to enter the same interface. At this time, you need to delete all the drivers in the green box shown in Figure 1, and then click Add/Folder to add the drivers in Figure 2 one by one Just come in.

Источник

Adding new database drivers

  • Application overview
  • Administration
    • Overview
    • Server configuration
    • Connection Management
    • Access Management
      • Users
      • Roles
    • Authentication methods
    • User credentials storage
    • Query Manager
  • Supported databases
  • Authentication
  • Theming
  • Localization
  • Features
    • Database navigator
      • Simple and Advanced View
    • Data editor
      • Data Filters
      • Data Ordering
      • Value Panel
      • JSON and Document View
      • Working with spatial/GIS data
    • ERD
    • Data export
    • Entity Diagrams
    • Document viewer
    • SQL Editor
      • Query Execution Plan
      • Visual Query Builder
    • Log Viewer
    • Cloud Explorer
    • Query History
    • Resource Manager
  • Releases

  • Server configuration
  • Configuring server datasources
    • Connection configuration
  • CloudBeaver and Nginx
  • Product configuration parameters
    • Administration
    • Authentication
    • Theming
    • Localization
    • Database Navigator
    • Data Editor
    • SQL Editor
    • Log Viewer
    • Data Export
    • ERD
    • Connections
  • Command line parameters

CloudBeaver EE for AWS

CloudBeaver Enterprise Edition

Clone this wiki locally

CloudBeaver supports many popular databases out of the box.
But sometimes you need to add a new driver — less popular than a custom driver developed by your company.

This instruction describes how you can do it.

CB is based on the DBeaver platform. It reuses drivers provided by DBeaver plugins.
Thus, you cannot add a driver which is not configured in some DBeaver plugins.

Out of the box DBeaver supports more than 50 different database drivers. Some of them are pre-configured in CloudBeaver as well, and some are not.
Generally, adding a new driver in CB consists of two steps:

  1. Add driver in DBeaver
  2. Configure this driver in CloudBeaver

If a driver is already included in DBeaver, then you can skip the first step.

What is special about CloudBeaver compared to DBeaver?

DBeaver downloads database drivers (JDBC) on demand (after the first attempt to connect to the database). This approach does not work in CloudBeaver, mostly because the driver download may require some user interactions + access to external resources + some local file system permissions.
CloudBeaver must have all driver jars pre-downloaded in the folder set as driversLocation in the Server configuration. By default it is a directory drivers in the root of CloudBeaver deployment.

Configuring drivers in DBeaver

The driver descriptions are usually located in the DBeaver’s plugin.xml files. You can search the string there and find a bunch of examples. Like this:

It is the actual PostgreSQL driver definition (irrelevant configuration elements were skipped).
The full driver ID is postgresql.postgres-jdbc . It is made up of two parts: the data source provider ID and the driver definition ID.

Note: for most non-standard drivers you must add a new driver definition to the Generic plugin ( org.jkiss.dbeaver.ext.generic ) because it only works with plain JDBC API.

Adding driver definition in UI (optional).

You can add a new driver configuration manually in the plugin.xml. But you can also generate this configuration in the DBeaver user interface.

Adding custom drivers configuration in the UI is described here: Database Drivers.
After that you can find you driver definition in the drivers.xml (see Administering drivers). Then you can copy it into the appropriate plugin.xml file.

All drivers need some 3rd party jar files (actual driver executable code).
For CloudBeaver, 3rd party jars must be in a public Maven repository (Maven Central is preferred). Line

refers to an external Maven artifact which must contain the driver jar files.

Drivers and bundles

In the driver definition example (see above) you can see two lines:

The first one refers to the actual Maven artifact. The Second one refers to some weird path drivers/postgresql . What does it mean?
The DBeaver Community does not contain any drivers’ jars. It downloads them on demand. But DBeaver EE and CloudBeaver and other products may contain drivers out of the box so users will not need to download them.
These two lines configure the driver for these two different situations. If you do not plan to include your driver configuration in DBeaver, then you may skip the first line.

Testing and contributing (optional)

After you add your new driver in plugin.xml you must be able to connect to your database in DBeaver UI by choosing your new driver in the new connection wizard:

  • Build the DBeaver desktop app (run mvn clean package in the root folder).
  • Run dbeaver executable in product/standalone/target/products/. /dbeaver folder (path differs for different OSes).
  • Open the «New Connection» wizard. Configure your connection and click the «Test Connection» button.

If everything is fine then you can create a Pull Request and contribute your changes in the main DBeaver repository. This part is optional, you can leave everything in your local version or your forked version of DBeaver. In this case you will need to fix the CloudBeaver build script (default build script uses the main dbeaver repository as a platform source code).

Adding drivers in CloudBeaver

You need to configure the driver in CloudBeaver separately. Because it does not include all existing drivers from DBeaver.

Adding Maven artifact(s)

You must include a driver in the server build. All 3rd party jars must be available for the server during the startup. By default, the CB buidl script downloads 3rd party jars from Maven Central but you can add a custom logic there.

  • Explore directory server/drivers.
  • Create a new sub-folder new-driver-id . You can copy-paste some existing driver directory for simplification.
  • Add pom.xml file in the new directory. It is a standard Maven pom. It can look like this:
  • Add you new driver id (equals to the new directory name) to the main server/drivers/pom.xml in the section.

Include driver in server configuration

Источник

Database drivers

You can use a pre-configured database driver or create a new driver.

DBeaver has a lot of pre-configured drivers including SQL, NoSQL, key-value databases, graph databases, search engines, etc. But sometimes you need to connect to a database which was not configured in DBeaver yet.

All you need is a JDBC driver of your database. The rest is easy.

Obtaining JDBC driver

JDBC driver is a program (in Java) which can connect and operate with some local or remote database server. It usually provides all needed functionality to cover 100% of database functionality. The JDBC driver is usually provided by database vendors to allow customers to work with their databases.

The JDBC driver consists of one or multiple jar files. The Jar file is a library which contains program code and some other files. You need to download the driver’s jar files before adding them to DBeaver. Sometimes the jar files are included in the database server distribution — in that case you need to refer to your database documentation or ask your DBA.

Adding driver configuration in DBeaver

Open driver manager dialog

You can open the driver manager from the main menu:

or from Database Navigator drop-down menu.

Add a new driver

Just click the button New and create a new driver. On the driver edit dialog you need to enter all required information:

Main parameters

Parameter Description
Driver Name Name of your driver. It can be any name you like
Driver Type Driver provider. In 99% cases you will need a generic driver (JDBC provider)
Class Name JDBC driver class name. You can get it from the documentation or find it in the jar files (see «Find Class» button description)
URL Template Template of driver URL. You can leave it empty. But in this case you will be ready to set JDBC URL for each your connection. It is better to define a valid template, which will greatly simplify the connections creation. See «URL Templates» for a detailed description
Default Port Default database port. You can get it from the documentation or leave it empty
Embedded Enable it for server-less databases. This flag affects a few config options related to the network/connections management
No Authentication This means that driver does not require authentication (no user/password fields will be shown)
Category Driver category, deprecated
ID Driver unique ID, ignore it
Description Driver description, it is shown in some dialogs/wizards as a hint
Libraries

This is the list of jar files, binary libraries (dll or so) and any other files required by the driver. In most cases you only need the jar files.
Click «Add File» to add a single jar file, «Add Folder» to add to the folder with Java classes/resources and «Add Artifact» to add the Maven artifact (see below).

After you add the jar files you will be able to find all JDBC driver classes which are found in these jars. Just click on the «Find Class» button and DBeaver will show all of them. In most cases there is just one driver class in the driver. If there are many of them, you need to refer to the driver’s documentation.

Maven artifacts

DBeaver can download driver jars directly from the Maven repository (it is a global public repository of Java libraries, usually an open-source). If your database driver is published on some public repository you can use this feature. Maven artifacts are better than plain jar files because you can see all existing driver versions and can change the driver version in runtime without any driver properties reconfiguration.

Saving driver, adding connection

After you have finished configuring your driver, just press the Ok button.
Now you can create connection.

If you need to change some driver properties later you can access them directly from connection properties dialog:

URL Templates

JDBC drivers use URLs to identify remote servers — strings similar to classic web URLs. Usually, URL has form jdbc:vendor:host:port/database , for example `jdbc:postgresql:localhost:5432/postgres’. It is not very convenient to edit such a long and an unobvious string. DBeaver can construct this URL from connection parameters (like host, port, etc).

For example above the URL template is: jdbc:postgresql://:/
Host, port and database are parameters which you will need to enter on the connection configuration page.

Supported URL variables:

Parameter Description
Database server host name
Database server port number
Target database name
Target server name (rarely used)
Folder path (on the local file system). Used for embedded drivers
File path (on the local file system). Used for embedded drivers

Advanced settings

For most drivers you do not need to change any advanced properties. But in some cases you can use this as driver tuning, e.g. for better performance or for structure fixing.

Main parameters
Parameter Description
Driver supports indexes Driver supports table indexes
Driver supports stored code Whether this driver supports stored code (procedures, functions, packages, etc)
Driver supports references Driver supports table references (foreign keys)
Driver supports SELECT count() clause | Driver supports SELECT count() clause
Driver supports views Driver supports table views
Split procedures and functions Show procedures and functions in different folders
Script delimiter Literal for SQL queries separation in scripts
Script delimiter redefiner SQL clause which redefines script delimiter value
Use script delimiter after query Keep SQL script delimiter after each SQL query
Use script delimiter after SQL block Keep SQL script delimiter after SQL script blocks (BEGIN/END)
String escape character Character used to escape special symbols in strings
Meta model type Type of metadata reading model — standard or indexed
All Objects Pattern SQL pattern for all metadata objects
Omit catalog(s) Do not read and use catalog (aka database) information
Omit single catalog Hide catalog (database) if there is only one catalog on server
Omit schema(s) Do not read and use schemas information
Omit single schema Hide schema if there is only one schema on the server
Use schema filters Use JDBC schema filters when the database does not support catalogs. Otherwise just read all database schemas and filter on client-side
Omit type cache Do not use data types provided by driver
Shutdown parameter Database shutdown URL parameter
Create database parameter Database create URL parameter
Driver supports multiple results Driver supports multiple results for a single query
Driver supports result set limit Driver supports multiple result set limit (max rows)
Driver supports structure cache Driver supports structure cache reading. Enables schema columns, keys, etc
Driver supports TRUNCATE operation Driver supports TRUNCATE command. It is much faster than DELETE without criteria
Queries (Custom driver queries)
Parameter Description
Get active database Query to obtain active database name
Set active database Query to change active database
Shutdown database Query to shutdown active database connection. Used for some embedded databases
PING query Query to check connection state
Dual table name Name of dummy ‘DUAL’ table which is used for expressions evaluation
Active object type Type of selectable object (schema, catalog)
Driver supports results scrolling Driver supports resultset scrolling
Quote reserved words Quote columns/table names if they conflicts with reserved SQL keywords
Escape LIKE masks in search queries Use to access JDBC metadata API. Enabled by default but should be disabled for some (broken) drivers
DDL (DDL generation options)
Parameter Description
Drop column short syntax Use ‘ALTER TABLE DROP column-name’ instead of standard syntax
Drop column — use brackets Use ‘ALTER TABLE DROP (column-name)’ instead of standard syntax
Use legacy SQL dialect for DDL Use legacy SQL dialect for DDL
Add COLUMN keyword in alter table query Add COLUMN keyword after keyword ADD and before column name in alter table query
Formatting (SQL values formats)
Parameter Description
Timestamp format Format pattern for timestamp columns
Date format Format pattern for date columns
Time format Format pattern for time columns

Summary

If you have configured some driver, it works well and you think that it makes sense to have this driver configuration in standard DBeaver, please send your configuration to us. Just create a feature request issue on GitHub and copy/paste driver description to the ticket (in any suitable form).

Источник

You may also like...

Adblock
detector