Monday, June 25, 2018

Portable DBeaver

DBeaver is a most excellent Universal SQL Client
https://dbeaver.jkiss.org

“Free multi-platform database tool for developers, SQL programmers, database administrators and analysts. Supports all popular databases: MySQL, PostgreSQL, MariaDB, SQLite, Oracle, DB2, SQL Server, Sybase, MS Access, Teradata, Firebird, Derby, etc.”

You can also buy and support DBeaver, or if you need more features, at
https://dbeaver.com

“Best multi-platform database tool for developers, database administrators and analysts. Supports all popular relational databases: MySQL, PostgreSQL, SQLite, Oracle, DB2, SQL Server, MariaDB, Sybase, Teradata, Netezza, etc. Supports NoSQL databases: MongoDB, Cassandra, Redis, Apache Hive, etc.”

Note: If you can, install the latest executable DBeaver, which will give you the option to keep the program auto updated.

But if due to your company’s security policies, you are not be able to update to the latest required DBeaver or even install the DBeaver executable (exe), you can often download and use the portable versions of programs, often distributed as zip, tar, or gz files.

Or maybe you just want a portable and easy to backup version of the DBeaver.

Download the latest version of DBeaver
DBeaver
https://dbeaver.jkiss.org/download/

Be sure to download the appropriate OS version and the zip file




Extract either download to a directory, such as
C:\Portable\DBeaver

Note: BandiZip is a good free archive (zip) program

To run DBeaver, you must have a Java JRE installed or a portable copy.
Note: This Blog post will show you how to create a portable copy of the Java JRE
Portable Java


If using a portable version of the Java JRE,
Edit the DBeaver configuration file to tell DBeaver where your portable version of Java JRE is located.

Open the file
C:\Portable\DBeaver\dbeaver.ini




Note: Notepad++ is a good free text editor, which can also be used portable
just download the zip or 7z version.

Add -vm and path to jvm lines in between the -showsplash and -vmargs lines
Make sure -vm is on one line, and the path to jvm.dll on the next line

..
-showsplash
-vm
C:\Portable\jre-10.0.1\bin\client\jvm.dll
-vmargs
..

Create a shortcut to the DBeaver executable, which is in
C:\Portable\DBeaver\



Add to the shortcut the parameter
-data .dbeaver


This will create the DBeaver configuration in the same directory as the dbeaver.exe
C:\Portable\DBeaver\.dbeaver

Else, the DBeaver configuration will be created in your users home directory

Save and close and try to run DBeaver

DBeaver should be up and running.

Query away!




Additional Information

Your company policies may prevent the auto downloads of required Java database drivers, which are often distributed as jar files (compressed java files)

Try to create a new database connection
Right click on the Database Navigation pane
Choose Create New Connection




Choose a database to connect to,
in this example PostgreSQL (Postgres) was chosen

Click either Driver properties or Edit Driver Settings

If you are missing drivers or DBeaver cannot auto download them, DBeaver will notify you and the drivers will be in red



You can try setting the download proxy, if you have that information




If not, you can try to download the drivers directly.

For Postrgres, download the driver jar files from
https://jdbc.postgresql.org/download.html (42.2.2)
https://mvnrepository.com/artifact/net.postgis/postgis-jdbc-jtsparser/2.2.1 (2.2.1)
https://mvnrepository.com/artifact/net.postgis/postgis-jdbc/2.2.1 (2.2.1)

Note: These urls were found by searching for the driver name and version listed by DBeaver

Then click Add File for each jar file.
And also remove the prior entries.




That should get you Querying

End of document. Thanks for reading.

No comments:

Post a Comment