FirebirdSQL logo

Using a Database Alias

You can use aliases instead of the full path to the primary database file.Aliases are defined in the databases.conf file in the following format:

alias = filepath
Note

Executing a CREATE DATABASE statement requires special consideration in the client application or database driver.As a result, it is not always possible to execute a CREATE DATABASE statement.Some drivers provide other ways to create databases.For example, Jaybird provides the class org.firebirdsql.management.FBManager to programmatically create a database.

If necessary, you can always fall back to isql to create a database.

Creating a Database on a Remote Server

If you create a database on a remote server, you need to specify the remote server specification.The remote server specification depends on the protocol being used.If you use the TCP/IP protocol to create a database, the primary file specification should look like this:

host[/{port|service}]:{filepath | db_alias}

Firebird also has a unified URL-like syntax for the remote server specification.In this syntax, the first part specifies the name of the protocol, then a host name or IP address, port number, and path of the primary database file, or an alias.

The following values can be specified as the protocol:

INET

TCP/IP (first tries to connect using the IPv6 protocol, if it fails, then IPv4)

INET4

TCP/IP v4

INET6

TCP/IP v6

XNET

local protocol (does not include a host, port and service name)

<protocol>://[host[:{port | service}]/]{filepath | db_alias}