FirebirdSQL logo

DBNAME for Embedded Connections

The DBNAME value for embedded connections and for the “Windows Local” (XNET) style of connection uses just the file path or alias, without host name, IP address or any port number.

Note

From Firebird 3 on, the way we conceptualise non-network connections on all platforms is more unified than for the earlier versions.However, from the point of view of the ODBC/JDBC driver, the expression of the DBNAME value has not changed, regardless of the platform on which we are making our embedded connection.

Local connection on a Windows server using first the file path and next an alias:

DBNAME=C:\db\myDb.fdb

DBNAME=C:dummy

On a POSIX server:

DBNAME=/usr/local/db/myDb.fdb

DBNAME=dummy

DBNAME Using Aliases

It is strongly recommended to define and use aliases to simplify life for you and your users.It makes your DBNAME values completely neutral to the filesystem and so much less cumbersome.In our last pairs of examples, the same alias was used on both Windows and POSIX.The one on the Windows server would be defined thus:

dummy = C:\db\myDb.fdb

while, on the Linux server, it would be defined thus:

dummy = /usr/local/db/myDb.fdb