-
-
Notifications
You must be signed in to change notification settings - Fork 23
JDBC URLs
Jaybird provides different JDBC URLs for different usage scenarios
jdbc:firebirdsql://host[:port]/<database>
jdbc:firebird://host[:port]/<database> (since Jaybird 4)
The default URL, will connect to the database using the Type 4 JDBC driver using the Java implementation of the Firebird wire-protocol. This URL is best suited for client-server applications with a dedicated database server. The port can be omitted (default value is 3050
), the host name must be present.
The <database>
part should be replaced with the database alias or the path to the database. In general it is advisable to uses database aliases instead of the path to the file.
On Linux the root /
should be included in the path. A database located on /opt/firebird/db.fdb should use the URL below (note the double slash after port!).
jdbc:firebirdsql://host:port//opt/firebird/db.fdb
Deprecated but still available alternative URL:
jdbc:firebirdsql:host[/port]:<database>
jdbc:firebird:host[/port]:<database> (since Jaybird 4)
jdbc:firebirdsql:native:host[/port]:<database>
jdbc:firebird:native:host[/port]:<database> (since Jaybird 4)
The Type 2 driver, will connect to the database using client library (fbclient.dll
on Windows, and libfbclient.so
on Linux). Requires correct installation of the client library.
jdbc:firebirdsql:local:<database>
jdbc:firebird:local:host[/port]:<database> (since Jaybird 4)
The Type 2 driver in local mode. Uses client library as in previous case, however will not use socket communication, but rather access database directly. Requires correct installation of the client library.
jdbc:firebirdsql:embedded:<database>
jdbc:firebird:embedded:<database> (since Jaybird 4)
Similar to the Firebird client library, however fbembed.dll
on Windows and libfbembed.so
on Linux are used. Requires correctly installed and configured Firebird embedded library.