Firebird Documentation IndexFirebird 1.5.6 Release NotesNew Configuration Files → Database File Aliasing
Firebird Home Firebird Home Prev: Server Configuration File--firebird.confFirebird Documentation IndexUp: New Configuration FilesNext: Firebird 1.5 Project Teams

Database File Aliasing

Aliases.conf
Connecting using an aliased path

Firebird release 1.5 introduced database file aliasing to improve the portability of applications and to tighten up control of both internal and external database file access.

Aliases.conf

Configure database file aliases in the text file aliases.conf, located in the root directory of your Firebird server installation. The installed aliases.conf looks similar to this:

  #
  # List of known database aliases
  # ------------------------------
  #
  # Examples:
  #
  #   dummy = c:\data\dummy.fdb   
  #
    

As in all of Firebird's configuration files, the '#' symbols are comment markers. To configure an alias, simply delete the '#' and change the dummy line to the appropriate database path:

  # fbdb1 is on a Windows server:
  fbdb1 = c:\Firebird\sample\Employee.fdb
  # fbdb2 is on a Linux server
  fbdb2 = /opt/databases/killergames.fdb
  #
    

You can edit aliases.conf whilst the server is running. There is no need to stop and restart the server in order for new aliases.conf entries to be recognised.

Connecting using an aliased path

The modified connection string in your client application looks like this:

    Server_name:aliasname

With the example above, the following connection string will ask the Firebird server running on a Linux box named "myserver" to find and connect the client to the database at the path identified in aliases.conf as "fbdb2":

    myserver:fbdb2

Note

Because the gstat tool does not use a database connection to read the database file, a full path is still required for using gstat. (This may change).

Prev: Server Configuration File--firebird.confFirebird Documentation IndexUp: New Configuration FilesNext: Firebird 1.5 Project Teams
Firebird Documentation IndexFirebird 1.5.6 Release NotesNew Configuration Files → Database File Aliasing