Introduction
Delft-FEWS has currently three flavours of local datastores all of which can be inspected with DBVisualizer.
- MS-Access (32-bit, Windows only)
- Firebird (32-bit)
- Derby
For inspecting a Delft-FEWS local datastore it is recommended to install DBVisualizer and the appropriate Jdbc driver that matches the local datastore format.
Note that only one program can access the local datastore simultaneously. The Delft-FEWS client has to be disconnected first before DBVisualizer can open it, and vice versa, otherwise exceptions will occur.
Installation of DBVisualizer
Download the latest 32-bit DBVisualizer from the download section of http://www.dbvis.com/. For Windows it is recommended to download the DBVisualizer 32-bit with embedded JRE. This way it is guaranteed that the firebird driver is always started with 32-bit java. Install DBVisualizer in a directory that preferrably does not contain any spaces. For Windows and Linux it is required to use a 32-bit JRE.
On this page from now we will refer from now on to $DBVIS_DIR as the DBVisualizer installation directory.
Also the following settings in the Windows Environment variables are required.
DBVIS_DIR=$DBVIS_DIR PATH=.;%DBVIS_DIR%;%PATH%
For linux the following settings are recommended.
#!/bin/bash # Point $DBVIS_DIR to the directory where DBVisualizer has been installed DBVIS_DIR=/opt/DBVisualizer # Start the application $DBVIS_DIR/dbvis $*
Installation of the MS Access driver
Select the Jdbc/ODBC bridge and specify the windows jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=d:\datastores\region_home\localDataStore\local.mdb
where d:\datastores\local.mdb is where the MSAccess file is located.
Installation of the Derby Jdbc Driver
If needed copy the latest derby driver from the Delft-FEWS bin dir, e.g. derby-10.8.1.2.jar to the $DBVIS_DIR/jdbc/derby directory.
Specify the database url as where the derby local datastore is located, e.g. jdbc:derby:D:/datastores/region_home/localDataStore/local.derby
Installation of the Firebird Jdbc Driver
For using DBVisualizer with Firebird under Windows specify following environment variable.
LD_LIBRARY_PATH=$DBVIS_DIR/jdbc/firebird
For using DBVisualizer with Firebird under Linux include the following in the shell profile.
# Setting the variables export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DBVIS_DIR/jdbc/firebird
Copy java libraries (Windows and Linux)
- create the directory
$DBVIS_DIR/jdbc/firebird
- copy
connector.jar
from the FEWS bin dir to$DBVIS_DIR/
jdbc/firebird
(can also be put globallyin $DBVIS_DIR/
lib done in see above) - copy
jaybird-2.1.6p.jar
from the FEWS bin dir to$DBVIS_DIR/jdbc/firebird
In the driver manager create a firebird driver with the two firebird jars.
and the URL format jdbc:firebirdsql:embedded:
Copy native libraries (Windows)
Copy the following files to the $DBVIS_DIR
directory:
fbembed.dll
icudt30.dll
icuin30.dll
icuuc30.dll
ib_util.dll
jaybird21.dll
NB fbembed.dll
depends on MSVCR80.dll
while jaybird21.dll
depends on MSVCR71.dll
. On
some computers you must need to include those also when not available. See the Fews binary or the attachments)
All in one zip file firebird_jdbc_win.zip for Windows.
Copy native libraries and additional files (Linux)
Copy the following files to the $DBVIS_DIR/jdbc/firebird
directory:
firebird.conf
firebird.msg
libfbdrop.so
libfbembed.so
libib_util.so
libicudata.so.30
libicui18n.so.30
libicuuc.so.30
libjaybird21.so
security2.fdb
All in one tgz file firebird_jdbc_linux.tgz for Linux.
Firebird connection properties
jdbc:firebirdsql:embedded:d:\datastores\region_home\localDataStore\local.fdb username: sysdba password: masterkey
Tips and tricks
- The wildcard for texts when using the LIKE statement is % (e.g. SELECT * FROM TimeSeries WHERE moduleInstanceId LIKE '%Import%')
- When looking for a date in an SQL string - use CAST('yyyy-MM-dd HH:mm:ss' as TIMESTAMP)
(this is equivalent to the ORACLE to_Date command)