<< ChangeDBAPassword | Firebird shell scripts | fb_config >>


The script allows the creation of a new database to be carried out, and an alias for that database to be created in the file /opt/firebird/aliases.conf.

Note: The script must be run as the root user.

If your system is not set up properly, the database creation step may fail but the alias will still be added to the aliases file. This could leave you subsequently unable to add the alias properly, as the script checks to ensure that you do not overwrite an existing alias. You will have to manually edit the alias file to remove the broken alias.

All databases must be owned by the firebird user, and by the firebird group. The following shows a new directory being created by the root user to allow Firebird databases to be created.

 # cd /u01
 # mkdir databases
 # chown firebird:firebird databases

At this point the directory /u01/databases is available for use as a repository for one or more Firebird databases. Obviously, in the above example, the /u01 directory already existed. parameters

To run the script, use a command line similar to the following:

 # <new_alias> <database_name>

The script takes two parameters on the command line, both of which are mandatory:

  • new_alias
The first parameter is the new alias you wish to create. This alias must not already exist in the alias file, or an error will be displayed and no further action taken.
  • database_filename
The second parameter specifies the full path to the database file. You must not specify a relative path as this could lead to incorrect database filenames being used at connection time. The script will reject any attempt to pass a relative pathname instead of a full pathname.

A brand new empty database will be created provided that the name passed to the script doesn't already exist. If the database already exists, only the alias will be created and added to the alias file.

See also:
Firebird security
Security in Firebird 2
Firebird service configuration
Firebird 2 migration to Linux platforms

back to top of page
<< ChangeDBAPassword | Firebird shell scripts | fb_config >>