About this manual
Firebird is a (SQL) relational database management system. In simple use-cases, you can install it and use its default configuration. For more advanced use-cases, or when you want to tune Firebird to get the best performance, you will need to dig into its configuration options.
This manual is a reference for all configuration options that Firebird exposes in its configuration files, and as environment variables.
|
If you’re missing anything or want to make suggestions for improvements, do not hesitate to contact us on firebird-devel or through the firebird-documentation issue tracker. |
Firebird versions
This document covers Firebird 4.0 and Firebird 5.0. Our intent is to keep it up-to-date with new, deprecated or removed configuration options as versions are released.
We do not document configuration options for Firebird 3.0 or older if they no longer exist in Firebird 4.0.
Conventions
This manual covers multiple versions. New Firebird versions may add new configuration options, deprecate configuration options (i.e. use is discouraged but still supported), and even remove configuration options entirely.
For each configuration option, we document the version that added, deprecated or removed an option.
For example, say an option is added in Firebird 4.0, deprecated in 5.0, and removed in 6.0, that would be shown as:
| Added |
4.0 |
| Deprecated |
5.0 |
| Removed |
6.0 |
If an option is added/deprecated/removed in a point release, the point-release version (e.g. 4.0.3) will be used.
For an option which is added in Firebird 5.0, and not deprecated and removed, it just shows:
| Added |
5.0 |
If an option already existed in Firebird 3.0 or older, we do not show an Added item. However, if an option was deprecated in an older version, and still exists in Firebird 4.0, it is listed with the version that deprecated it.
For example:
| Deprecated |
2.0 |
Options which were removed with or before Firebird 4.0.0 are not documented.
Where to get more information
For news and information on Firebird, visit https://firebirdsql.org/.
For more Firebird documentation, go to:
-
-
-
…see full list on Reference Manuals…
-
…see more options on Firebird RDBMS Documentation…
If you’re looking for help on Firebird, subscribe to firebird-support.
Other mailing lists and groups can be found on Mailing Lists.
Reporting errors or missing content
If you find errors, missing content or other problems in this document, please report this in our issue tracker of the firebird-documentation GitHub repository.
Pull requests with changes and fixes are also much appreciated.
Contributing
There are several ways you can contribute to the documentation of Firebird, or Firebird in general:
-
Participate on the mailing lists
-
Report bugs or submit pull requests on the FirebirdSQL GitHub Project
-
Become a developer (contact us on firebird-devel)
-
Donate to the Firebird Foundation
-
Become a paying member or sponsor of the Firebird Foundation
Reference
1. An overview of Firebird configuration
The configuration of Firebird is distributed over a number of files and other configuration methods. In broad strokes, the configuration is split over:
firebird.conf-
Global configuration of Firebird server and/or the client library
databases.conf-
Database aliases, and per-database configuration of Firebird server and/or client library
plugins.conf-
Plugin configuration
replication.conf-
Global and per-database replication configuration
- Trace configuration
-
Global and per-database trace configuration
- Environment variables
-
Environment variables to override parts of server or client configuration
The following chapters will cover each file in detail.
1.1. Shared syntax of configuration files
The configuration files (*.conf) share a common syntax, though not all files use all available syntax options.
1.1.1. Key-value
In its most basic form, configuration is expressed as a list of key-value pairs, or — in some files — keyword-value pairs:
key-name = value
DatabaseAccess = None
Allowed values depend on the specific key, but broadly has the following types:
- integer
-
Integer values, or integers followed by
K(kilo: 1024),M(mega: 10242 or 1,048,576) orG(giga: 10243 or 1,073,741,824). - Boolean
-
Truth values, where
0is false and1(and any other non-zero integer value) is true. Stringstrue,yandyesare also interpreted as true, everything else asfalse.We recommend only using
0/1ortrue/falsefor Boolean values.Currently, a non-numeric suffix of an integer prefix is ignored, so
123textis interpreted as 123 → true, not false. This is an implementation artefact that may change in the future. - string
-
String values; individual properties may require a specific syntax in their string values, or a limited set of values, etc.
- list
-
List of values; a list is a string value with values separated by a space (‘
’), comma (‘,’), or semicolon (‘;’). The order is usually significant. Some lists may use only a subset of separators; this will be mentioned explicitly if relevant. - scoped values
-
Some configuration files (
databases.conf,plugins.conf,replication.conf, trace configuration) allow or require keys with a string value followed by additional key-value pairs enclosed in braces.See Scope for more information.
A (non-scoped) value or the “simple value” of a scoped value can optionally be enclosed in double quotes.
The entire value must be quoted, and anything other than a comment or whitespace after the closing double quote is considered an error.
This can — for example — be used if the value contains a ‘#’ (e.g. Key = "some#value"), or braces (‘{’/‘}’).
Unquoted, the ‘#’ is interpreted as the start of a comment, and the braces as the start or end of a scoped value.
For braces, it’s also possible to escape them by doubling them ({{/}});
doubled braces are always undoubled, even if the value is enclosed in double quotes.
1.1.2. Scope
Some configuration files use scopes.
Scopes are key-value pairs or keyword-value pairs enclosed in braces (‘{’ and ‘}’).
Their exact usage and syntax depend on the specific configuration file.
In general, the syntax is:
<key-or-keyword> [ = <simple-value> ]
{
{ <key> = <simple-value> <new-line> }...
}
We call the part after the = (equals) a scoped value[1].
Some configuration files allow a scoped value without a simple value;
this — for example — establishes a default configuration.
In that case, both the equals (‘=’) and the simple value are absent.
For example, databases.conf has key-value pairs, where the value is either a string (simple value), or a scoped value (string value + scope):
databases.conf# key employee with simple value
employee = $(dir_sampleDb)/employee.fdb
# key security.db with scoped value
security.db = $(dir_secDb)/security4.fdb
{
RemoteAccess = false
DefaultDbCachePages = 256
}
In this example, security.db is the key, and the string $(dir_secDb)/security4.fdb and the key-value pairs between braces are the value of security.db.
The configuration options RemoteAccess and DefaultDbCachePages are applied specifically to the security database (alias security.db).
As another example, trace configuration, plugins.conf and replication.conf have keyword-value pairs, where the value is (always) a scoped value
replication.conf:database = /your/db.fdb
{
journal_source_directory = /your/db/source
}
Here database = /your/db.fdb identifies this as replication configuration specific to the database /your/db.fdb, with the actual configuration listed within the braces.
1.1.3. Comments
A ‘#’ starts a comment, until the end of that line.
Comments are ignored by the configuration parser.
Comments are used in the default configuration files for documentation, and to show default values without explicitly configuring those values.
For your own use, you can use comments to temporarily disable a configuration item or revert to the default. You can also use comments to record why a specific configuration value was chosen (e.g. by specifying a rationale, or a link to an external document, etc.).
If you need to specify a value that contains the ‘#’ symbol, enclose the value in double quotes (e.g. Key = "some#value").
1.1.4. Macro substitution
Firebird provides a number of predefined macros which can be used in configuration values to substitute directory locations.
The syntax to use these macros is $(macro-name) (e.g. $(dir_plugins)).
It is not possible to define your own custom macros.
root
|
root of the Firebird instance |
install
|
directory where Firebird is installed |
this
|
directory containing the current configuration file |
dir_conf
|
directory containing |
dir_secDb
|
directory containing the default security database |
dir_plugins
|
directory containing the plugins |
dir_udf
|
default directory containing UDFs |
dir_sample
|
example directory |
dir_sampleDb
|
directory containing the example DB ( |
dir_intl
|
directory containing international modules |
dir_msg
|
directory containing the messages file ( |
The macro names are case-insensitive.
For replication, additional macros are available for specific configuration items;
these are covered in replication.conf.
1.1.5. Include
The include statement allows you to include the content of another file when the configuration file is read.
include path-expression
Where path-expression is a string identifying the file or files to include. The path-expression supports:
-
Relative paths (resolved against the parent directory of the current configuration file)
-
Absolute paths
-
Wildcards (
*for zero or more characters, and?for one character)
# Relative path include some_file.conf # Which is equivalent to include $(this)/some_file.conf # Absolute path (Windows) include C:\Firebird\default.conf # Absolute path (Linux) include /opt/firebird/default.conf # Path with macro substitution include $(dir_plugins)/some_file.conf # Wildcard to include multiple files include databases/*.conf
|
On Windows you can use either |
2. firebird.conf
The firebird.conf configuration file serves three purposes:
-
Configuring the Firebird server process
-
Configuring client connections made by the Firebird server
For example, for connections made with
EXECUTE STATEMENT … ON EXTERNAL -
Configuring client connections made by other processes.
This is the general case of the second item.
The third item does have a big caveat.
The firebird.conf in the Firebird installation directory will not configure all client connections, only those client connections which
-
use
fbclient.dll/libfbclient.so, and -
where the fbclient library actually reads that
firebird.conffile.
If your application uses its own fbclient, it will read and use the client configuration in the firebird.conf in the same directory as that DLL (Windows), or the directory above it (Linux and other OSes), if it exists;
it will not use the firebird.conf in a Firebird installation directory[2].
The configuration used by a client can also be overridden using the isc_dpb_config DPB item or isc_spb_config SPB item.
Its contents are key-value pairs as used in firebird.conf, and their values take precedence over the client configuration in firebird.conf.
Some server-side configuration items in firebird.conf can also be configured per database in databases.conf.
The value in databases.conf takes precedence over the value in firebird.conf, which takes precedence over the default value.
If a value is user-configurable (e.g. through the database parameter buffer (DPB) or a SET statement), that value will generally take precedence for the current connection, though in some cases the server configuration may establish an upper limit (e.g. for timeouts).
Since Firebird 4.0, it is possible to query configuration settings of the current database for the current connection from the RDB$CONFIG virtual table:
select * from RDB$CONFIG
2.1. Configuration items
The following sections list the configuration items supported in firebird.conf.
If a configuration item is also valid in databases.conf, this is mentioned explicitly.
Unless mentioned otherwise, configuration items are server-side only.
Where applicable, we’ll report the version that a configuration item was added, deprecated, or removed; see also Conventions.
The configuration items are listed in order of appearance in the default firebird.conf file.
2.1.1. DatabaseAccess
Configures the database paths — other than aliases — the server accepts for opening databases.
Global
DatabaseAccess = <database-access-config>
<database-access-config> ::=
None
| Full
| Restrict <path-list>
<path-list> ::= path [; path ...]
Full (see Security recommendation!)
None-
Firebird only accepts database aliases defined in
databases.conf. Full-
Firebird accepts database aliases, and all paths accessible to the Firebird server (i.e. read/write access, or read access for a read-only database).
Restrict <path-list>-
Firebird accepts database aliases, and databases with a path rooted in the directories listed in
<path-list>(that is, the database file is in a listed directory or in a subdirectory of a listed directory).The
<path-list>is a semicolon-separated list of directories. It is possible to use absolute paths (e.g. Windows —C:\Database, Linux —/db), and relative paths. Relative paths are resolved against the root directory of Firebird. Given relative paths are not always obvious, it is recommended to use absolute paths.If environment variable
ISC_PATHis not set, the paths listed are used to resolve filenames without a path component, including a check for existence. The first entry in the list is used as the fallback if no such file exists.
|
Security recommendation
The default value of The most secure option is to use We also recommend that there is no overlap with the directories listed in |
# Only allow aliases DatabaseAccess = None # Full access DatabaseAccess = Full # Restricted (Windows) DatabaseAccess = Restrict C:\Databases;D:\CRM # Restricted (Linux) DatabaseAccess = Restrict /var/db;/var/crm
2.1.2. RemoteAccess
Enables remote access of databases.
Global, and per-database
RemoteAccess = Boolean
true
The Boolean option RemoteAccess controls if databases can be opened remotely — via TCP/IP, or WNET[4], or only locally using embedded or — on Windows — XNET.
Any TCP/IP or WNET connection is considered remote, including connections created from the same machine (localhost).
|
Security recommendation
The security database ( If you have high security requirements, consider setting |
# Enable remote access RemoteAccess = true # Disable remote access RemoteAccess = false
2.1.3. ExternalFileAccess
Configures paths allowed for external table files.
Global, and per-database
ExternalFileAccess = <external-file-access-config>
<external-file-access-config> ::=
None
| Full
| Restrict <path-list>
<path-list> ::= path [; path ...]
None
None-
No paths are allowed as external table file.
Full-
All paths are allowed as an external table file.
Restrict <path-list>-
Files with a path rooted in the directories listed in
<path-list>(that is, the file is in a listed directory or in a subdirectory of a listed directory) are allowed as an external table file.The
<path-list>is a semicolon-separated list of directories. It is possible to use absolute paths (e.g. Windows —C:\ExternalFiles, Linux —/externalfiles), and relative paths. Relative paths are resolved against the root directory of Firebird. Given relative paths are not always obvious, it is recommended to use absolute paths.
This setting does not prevent creation of an external table with a disallowed path, but attempts to query the external table or insert into the external table will fail if the path is not allowed.
Attempts to access (select or insert) an external table file not allowed by the configuration will produce error “Use of external file at location <filename> is not allowed by server configuration” (error code 335544831 or isc_conf_access_denied).
For more information on external tables, see section External Tables in the Firebird 5.0 Language Reference.
|
Security recommendation
Never use External tables use a binary format, and a carefully crafted external table (or multiple external tables pointing to the same file) can be used to read any file, or append data to any file.
For example, an external table with a Obviously, this requires that the user can create an external table in a database, and that the user running the Firebird server process can read and/or write these files, so there are limits to exploitability, but nevertheless, this is a scenario you need to consider when setting For this reason we also recommend you ensure there is no overlap with the directories listed in Overlap between the Overlap between the Where possible, configure |
# No access ExternalFileAccess = None # Full access (DO NOT USE!) ExternalFileAccess = Full # Restricted (Windows) ExternalFileAccess = Restrict C:\ExternalFiles;D:\Temp\ExternalFiles # Restricted (Linux) ExternalFilesAccess = /var/externalfiles;/tmp/externalfiles
2.1.4. UdfAccess
Configures paths allowed for loading UDF — User-Defined Function — libraries.
Global
| Deprecated |
4.0 |
UdfAccess = <udf-access-config>
<udf-access-config> ::=
None
| Full
| Restrict <path-list>
<path-list> ::= path [; path ...]
None
None-
UDF libraries are not loaded.
Full-
All paths are allowed for UDF libraries
Restrict <path-list>-
Files with a path rooted in the directories listed in
<path-list>(that is, the file is in a listed directory or in a subdirectory of a listed directory) are allowed for UDF libraries.The
<path-list>is a semicolon-separated list of directories. It is possible to use absolute paths (e.g. Windows —C:\UdfLibs, Linux —/udflibs), and relative paths. Relative paths are resolved against the root directory of Firebird. Given relative paths are not always obvious, it is recommended to use absolute paths.
UDFs and — by extension — UdfAccess are deprecated.
The recommended replacements are built-in functions, PSQL functions (introduced in Firebird 3.0), or UDR functions (User-Defined Routine, introduced in Firebird 3.0).
|
Security recommendation
UDFs are inherently insecure and can compromise the security of your system and database.
If possible, do not use UDFs and keep We also recommend that there is no overlap with the directories listed in |
# No access UdfAccess = None # Full access (DO NOT USE!) UdfAccess = Full # Restricted (Windows) UdfAccess = Restrict UDF;C:\UDF # Restricted (Linux) ExternalFilesAccess = UDF;/var/udf
2.1.5. TempDirectories
Directories used by the Firebird engine for temporary files.
Global
TempDirectories = <path-list> <path-list> ::= path [; path ...]
Value of environment variable FIREBIRD_TMP (or its fallback).
The <path-list> is a semicolon-separated list of directories.
It is possible to use absolute paths (e.g. Windows — C:\Database, Linux — /db), and relative paths.
Relative paths are resolved against the root directory of Firebird.
Given relative paths are not always obvious, it is recommended to use absolute paths.
Firebird will use the first directory listed until it runs out of disk space, then switch to the next directory in the list, and so on.
This setting does not affect the location of lock files.
# Multiple directories (Windows) TempDirectories = C:\Temp\Firebird;D:\Temp\Firebird # Single directory (Linux) TempDirectores = /tmp/firebird
2.1.6. TempTableDirectory
Directory used for temporary tables and temporary blobs.
Global, and per-database
| Added |
4.0 |
TempTableDirectory = path
Value of environment variable FIREBIRD_TMP (or its fallback).
Contrary to TempDirectories, this setting only accepts a single directory.
If the configured directory does not exist or is not accessible, Firebird will use the directory specified in FIREBIRD_TMP or its fallback.
# Windows TempTableDirectory = C:\Temp\Firebird # Linux TempTableDirectory = /tmp/firebird
2.1.7. AuditTraceConfigFile
Trace configuration file for system audit.
Global
AuditTraceConfigFile = path
No value
The AuditTraceConfigFile sets the configuration file for system-wide auditing using the trace facility.
System audit is only enabled if this configuration item is set to a valid trace configuration file.
It is possible to use absolute paths (e.g. Windows — C:\Firebird\fbtrace.conf, Linux — /fb/fbtrace.conf), and relative paths.
Relative paths are resolved against the root directory of Firebird.
# Relative path AuditTraceConfigFile = fbtrace.conf # Absolute path (Windows) AuditTraceConfigFile = C:\Firebird\customtrace.conf # Absolute path (Linux) AuditTraceConfigFile = /fb/customtrace.conf
2.1.8. MaxUserTraceLogSize
Maximum size in MiB of user trace session log files.
Global
MaxUserTraceLogSize = integer
Megabyte (MiB)
10 (10 MiB)
When the log file of a user trace session reaches the configured size, the trace session is suspended until the trace data is read through the trace service API (which clears/deletes the outstanding log file).
MaxUserTraceLogSize = 15
2.1.9. DefaultDbCachePages
Default number of cached database pages
Global, and per-database
DefaultDbCachePages = integer
Database page
| SuperServer |
|
| SuperClassic |
|
| Classic |
|
Firebird uses the page cache to store recently used database pages in memory. For SuperServer, the page cache is per database, and it’s shared by all connections to that database; for SuperClassic and Classic, the cache is per connection.
On SuperServer, the cache for each database will use (page count) * (page size).
On (Super)Classic, the cache will use (page count) * (page size) * (connection count).
This setting only takes effect if the database has not been configured with an explicit number of page buffers using gfix -buffers.
A backup with gbak will record the current configuration in the backup file — even if it is derived from DefaultDbCachePages and not explicitly set.
After a restore, the database will have this value explicitly configured in its database header, unless overridden with -BUFFERS.
On (Super)Classic the cache can also be overridden for a specific connection using the isc_dpb_num_buffers connection property.
DefaultDbCachePages = 4096
2.1.10. DatabaseGrowthIncrement
Maximum database growth increment in bytes.
Global, and per-database
DatabaseGrowthIncrement = integer
Byte
128M (128 MiB)
When a database has to allocate a database page, and there are no free pages, Firebird will allocate space with the following constraints:
-
Minimum: 128 KiB
-
1/16th of existing allocated space
-
Maximum: value of
DatabaseGrowthIncrement
Preallocation reduces physical file fragmentation, and may improve performance.
If DatabaseGrowthIncrement is set to zero (0), preallocation is disabled, and Firebird will then allocate space per page.
Database shadow files are not preallocated.
DatabaseGrowthIncrement = 512K
2.1.11. UseFileSystemCache
Configures if Firebird uses the filesystem cache for database files.
Global, and per-database
| Added |
4.0 |
UseFileSystemCache = Boolean
true
This setting is ignored if it is not explicitly set, and FileSystemCacheThreshold has been explicitly set.
# Disable filesystem cache UseFileSystemCache = false
2.1.12. FileSystemCacheThreshold
Enables filesystem caching of a database if its page cache size is less than the configured value.
Global, and per-database
| Deprecated |
4.0 |
FileSystemCacheThreshold = integer
Database page
64K (see also note below)
|
This setting is ignored if:
|
If set explicitly and UseFileSystemCache is not set explicitly, the filesystem cache is used if the page cache size configured in the database header — or if not set in the database header, the value of DefaultDbCachePages — is less than FileSystemCacheThreshold.
|
This setting has been deprecated in Firebird 4.0.
The replacement is |
FileSystemCacheThreshold = 8192
2.1.13. FileSystemCacheSize
The maximum percentage of RAM used for the filesystem cache on 64-bit Windows.
Global
FileSystemCacheSize = integer
Percent
0, 10 - 95
0
|
This setting only has effect on 64-bit Windows; it is ignored on 32-bit Windows and other operating systems. |
If 0, Firebird will use the current filesystem cache settings and will not attempt to change the setting.
Values in the range of 10 to 95 specify the maximum percentage of RAM the host will use for the filesystem cache.
Values outside this range — other than 0 — will apply a default value of 30.
|
This setting configures the maximum size of the filesystem cache of Windows, and will not only affect Firebird. The user running the If it has already been set before Firebird was started, a restart may be required for the change to take effect. |
2.1.14. RemoteFileOpenAbility
Configures if Firebird allows opening of database files on mounted network volumes.
Global
RemoteFileOpenAbility = Boolean
0 (false)
|
Enabling this option can cause database corruption
Do not enable this option unless you really know what you’re doing! This option removes an important safety feature of Firebird and can cause irrecoverable database corruption. Do not use this option unless you understand the risks and are prepared to accept the loss of the contents of your database. Unless this configuration option is changed from This restriction prevents two different copies of Firebird from opening the same database without coordinating their activities. Uncoordinated access by multiple copies of Firebird will corrupt a database. On a local system, the system-level file locking prevents uncoordinated access to the database file. NFS does not provide a reliable way to detect multiple users of a file on an NFS mounted disk. If a second copy of Firebird connects to a database on an NFS mounted disk, it will corrupt the database. Under some circumstances, running a Firebird server on the computer that owns NFS mounted volumes is inconvenient or impossible. Applications that use the "embedded" variant of Firebird and never share access to a database can use this option to permit direct access to databases on NFS mounted volumes. The situation for SMB/CIFS is quite similar to NFS, with not all configurations providing file locking mechanisms needed for safe operation. Using SuperServer with the database on a Windows Server file server may be considered relatively safe as file locking protects the database from being used by several engines. The network stack can still change order of writes, so you may get a corrupted database in case of network errors or power outage. The useful and safe case is working with a shared database marked read-only. |
By default, Firebird only opens database files on local disks.
When RemoteFileOpenAbility is enabled, Firebird can also open databases from mounted NFS volumes (Linux) or SMB/CIFS volumes (Windows)
RemoteFileOpenAbility = 0
2.1.15. TempBlockSize
Allocation block size for temporary storage.
Global
TempBlockSize = integer
Byte
1M (1 MiB)
Temporary storage is allocated in increments of TempBlockSize.
TempBlockSize = 2M
2.1.16. TempCacheLimit
Maximum amount of temporary space that is cached in memory.
Global, and per-database
TempCacheLimit = integer
Byte
| SuperServer |
|
| SuperClassic |
|
| Classic |
|
For Classic, the default is lower because the memory is allocated per server process, and this means the memory requirement grows with each connection.
TempCacheLimit = 1G
2.1.17. MaxIdentifierByteLength
Maximum identifier length in bytes.
Global, and per-database
| Added |
4.0 |
MaxIdentifierByteLength = integer
Byte
1 - 252
252
Since Firebird 4.0, identifiers can be a maximum 252 bytes, or 63 characters UTF8.
Set to 31 to use the same limit as in Firebird 3.0 and earlier.
This setting combined with MaxIdentifierCharLength determines the actual maximum length.
For example, if MaxIdentifierCharLength setting is 31, and MaxIdentifierCharLength is not set, or set to 124 or higher, then an identifier can have maximum 31 characters of any UTF8 character.
On the other hand, if MaxIdentifierCharLength is set to 31, and MaxIdentifierCharLength is also set to 31, then you can have 31 characters from the ASCII range, but using characters that require 2, 3, or 4 bytes to be encoded will reduce the actual maximum length in characters (to a minimum of 7 if all characters are 4 bytes in UTF8).
|
Setting this value too low may make databases with longer identifiers inaccessible.
For that reason, do not configure this globally, but only configure it per database in In general, we recommend not to touch this setting and use the default. Only use this for compatibility reasons, for example for applications that break when receiving longer identifiers that you cannot fix in any other way. |
MaxIdentifierByteLength = 31
2.1.18. MaxIdentifierCharLength
Maximum identifier length in characters.
Global, and per-database
| Added |
4.0 |
MaxIdentifierCharLength = integer
Character
1 - 63
63
Since Firebird 4.0, identifiers can be a maximum 252 bytes, or 63 characters UTF8.
Set to 31 to use the same limit as in Firebird 3.0 and earlier.
This setting combined with MaxIdentifierByteLength determines the actual maximum length.
For example, if MaxIdentifierCharLength setting is 31, and MaxIdentifierCharLength is not set, or set to 124 or higher, then an identifier can have maximum 31 characters of any UTF8 character.
On the other hand, if MaxIdentifierCharLength is set to 31, and MaxIdentifierCharLength is also set to 31, then you can have 31 characters from the ASCII range, but using characters that require 2, 3, or 4 bytes to be encoded will reduce the actual maximum length in characters (to a minimum of 7 if all characters of an identifier are 4 bytes in UTF8).
|
Setting this value too low may make databases with longer identifiers inaccessible.
For that reason, do not configure this globally, but only configure it per database in In general, we recommend not to touch this setting and use the default. Only use this for compatibility reasons, for example for applications that break when receiving longer identifiers that you cannot fix in any other way. |
MaxIdentifierCharLength = 31
2.1.19. InlineSortThreshold
Maximum sort record size that can be stored inline in the sort block.
Global, and per-database
InlineSortThreshold = integer
Byte
1000
This controls if non-key fields are stored inside the sort block, or to refetch them from the data pages after sorting. If the sort record size with non-key fields exceeds the configured maximum, only the key fields are stored in the sort block.
A value of 0 (zero) disables storing non-key fields and always refetches non-key fields.
This setting is a balance between the cost of refetching data, and the cost of sorting when including non-key data. If a sort block is very large (e.g. due to a lot of rows and/or large sort record size), the sort will be performed on disk. The I/O cost of sorting including non-key fields may be larger than the I/O cost of refetching data.
# 2000 bytes InlineSortThreshold = 2000 # Disabled InlineSortThreshold = 0
2.1.20. OptimizeForFirstRows
Enables first row optimization strategy.
Global, and per-database
| Added |
5.0 |
OptimizeForFirstRows = Boolean
false (optimize for all rows)
Defines whether queries should be optimized to return the first row(s) as soon as possible rather than returning the whole dataset as soon as possible. By default, Firebird optimize for retrieval of all rows.
This can be overridden at the session level using the SET OPTIMIZE statement, or at the statement level by using the OPTIMIZE FOR clause.
OptimizeForFirstRows = true
2.1.21. OuterJoinConversion
Enables optimizer conversion of outer joins to inner joins.
Global, and per-database
| Added |
5.0 |
| Deprecated |
5.0 |
OuterJoinConversion = Boolean
true (enabled)
Defines whether the optimizer attempts to convert outer joins into inner joins, provided that such a transformation is possible from the query result perspective.
This can be done if — for example — a LEFT OUTER JOIN is used, but the “missing” rows of the right table are filtered out in the WHERE by a condition that excludes NULL for a column of that table.
Enabled by default. Disable to simplify the migration path if outer joins are used intentionally in SQL queries (e.g. as optimizer hints) even if they are known to be semantically equivalent to inner joins.
|
This setting is intended as a temporary backward compatibility option. If you have a reason to disable this, we’d appreciate us if you tell us why on firebird-devel. There is no guarantee that this setting will be available in future Firebird versions. |
# Disable outer join conversion OuterJoinConversion = false
2.1.22. SubQueryConversion
Enables experimental optimizer conversion of subqueries in EXISTS and IN to semi-joins.
Global, and per-database
| Added |
5.0 |
| Deprecated |
5.0 |
SubQueryConversion = Boolean
false (disabled)
Defines whether the optimizer attempts to merge subqueries in EXISTS and IN with the outer query by converting them to semi-joins, provided that such a transformation is possible from the query result perspective.
|
This is an experimental feature in Firebird 5.0, so it’s disabled by default. Enable and give it a try for a possibly improved performance due to subqueries being evaluated just once and then cached. If you run into problems like decreased performance or wrong query results with this option enabled, we’d appreciate us if you tell us on firebird-devel or on the issue tracker. Once this feature is proved to be superior in most use cases, this setting will be removed, and this conversion will become unconditional. There is no guarantee that this setting will be available in future Firebird versions. |
SubQueryConversion = true
2.1.23. AuthServer
Authentication plugins accepted by Firebird server.
Global, and per-database
AuthServer = <plugin-list>
<plugin-list> ::= plugin [<separator> plugin ...]
<separator> ::=
one of <space> (' '), <comma> (','), <semicolon> (';')
Srp256
Authentication plugins have a server-side part and client-side part. The authentication plugins implement how a user is authenticated. Some authentication plugins also generate the encryption key for wire encryption. Generally, users are managed by a user manager that is specific to a plugin or family of plugins.
The authentication plugins the client tries are specified by the AuthClient setting.
A default Firebird installation supports the following authentication plugins:
Srp
|
SRP (Secure Remote Password) with SHA-1 client-proof |
Srp224
|
SRP with SHA-224 client-proof |
Srp256
|
SRP with SHA-256 client-proof |
Srp384
|
SRP with SHA-384 client-proof |
Srp512
|
SRP with SHA-512 client-proof |
Win_Sspi
|
Windows SSPI authentication (a.k.a. trusted authentication); Windows-only. Users are not managed in Firebird, but may require a mapping ( |
Legacy_Auth
|
Legacy authentication (max 8 character password; considered insecure!) |
From these plugins, only Legacy_Auth does not generate an encryption key for wire encryption.
Additional third-party plugins may be available.
|
Secure Remote Password and hashes
Firebird’s SRP implementation internally uses SHA-1 for hashing. The various SrpNNN plugins only change the hash used for the client-proof. See also firebird#6051. |
AuthServer = Srp256, Srp
2.1.24. AuthClient
Authentication plugins tried by Firebird fbclient.
Global, per-database, client-side, and per-connection
AuthClient = <plugin-list>
<plugin-list> ::= plugin [<separator> plugin ...]
<separator> ::=
one of <space> (' '), <comma> (','), <semicolon> (';')
Srp256, Srp, Legacy_Auth (non-Windows)
Srp256, Srp, Win_Sspi, Legacy_Auth (Windows)
The authentication plugins determine how a user authenticates. Some authentication plugins also generate the encryption key for wire encryption.
For a list of plugins supported by a default Firebird installation, see Standard authentication plugins included in Firebird.
When configured server-side (in firebird.conf or databases.conf), this setting controls which plugins are tried when the server creates a connection to another database (e.g. using EXECUTE STATEMENT … ON EXTERNAL).
When configured client-side — in firebird.conf read by the client, or using isc_dpb_config (key/value) or isc_dpb_auth_plugin_list (value only) — it controls which plugins are tried for connecting.
The server and client must agree on the plugins used.
The list of plugins accepted by the server is configured through AuthServer.
However, the client will always try the first plugin listed, even if not supported by the server.
Subsequent plugins will only be tried if they are also listed in the AuthServer setting of the server.
|
Insecurity of
Legacy_AuthThe If |
AuthClient = Srp256
2.1.25. UserManager
Enabled user manager plugins.
Global, and per-database
UserManager = <plugin-list>
<plugin-list> ::= plugin [<separator> plugin ...]
<separator> ::=
one of <space> (' '), <comma> (','), <semicolon> (';')
Srp
User manager plugins manage users, generally in the security database.
The user manager plugins are also used to populate the SEC$USERS and SEC$USER_ATTRIBUTES virtual tables.
The first plugin listed is the default user manager.
The default user manager is used if the USING PLUGIN clause is absent from user management statements.
The default user manager is also used by gsec and the user management service API[5].
Setting UserManager explicitly to an empty value (blank) will disallow management of users.
A default Firebird installation supports the following user manager plugins:
Srp
|
User manager for the SRP-family of authentication plugins |
Legacy_UserManager
|
User manager of the |
The per-database configuration in databases.conf enables which user manager plugins are allowed — and which is the default — when connecting to that specific database.
When configured on a security database, it only manages which user manager plugins are allowed when connecting directly to that security database;
it does not configure which user manager plugins may store data in that security database.
|
Security recommendations
|
# Enable Srp and Legacy_UserManager, with Srp as default UserManager = Srp, Legacy_UserManager # Disable user management UserManager =
2.1.26. DefaultProfilerPlugin
Default profiler plugin
Global, and per-database
| Added |
5.0 |
DefaultProfilerPlugin = plugin
Default_Profiler
Specifies the default profiler plugin used by the RDB$PROFILER package, if no explicit plugin name is specified (parameter PLUGIN_NAME of START_SESSION).
# Set default to MyCustomProfiler # This requires a custom plugin-library with that name DefaultProfilerPlugin = MyCustomProfiler
2.1.27. TracePlugin
The trace plugin used by the Firebird trace facility.
Global
TracePlugin = plugin
fbtrace
The Firebird trace facility can be used to audit or record statements executed on the server. The trace plugin is responsible for writing the data to a log file in a specific format.
Firebird includes a default trace plugin called fbtrace.
There are third-party plugins available which provide different output formats.
TracePlugin = customtrace
2.1.28. WireCryptPlugin
Wire crypt plugins tried by the client and/or accepted by the server.
Global, per-database, client-side, and per-connection
WireCryptPlugin = <plugin-list>
<plugin-list> ::= plugin [<separator> plugin ...]
<separator> ::=
one of <space> (' '), <comma> (','), <semicolon> (';')
ChaCha64, ChaCha, Arc4
Wire crypt plugins allow for encryption of the database connection after authentication. The default plugins included in Firebird use a session-key generated by the authentication plugin[6] to encrypt the connection.
A default Firebird installation supports the following wire encryption plugins:
ChaCha
|
ChaCha#20 (RFC 8439) with 32-bit counter (4 byte counter, 12 byte nonce, 20 (10 + 10) rounds). The session key is stretched (or reduced) to 256-bit using SHA-256. Session keys shorter than 16 bytes are rejected. Due to implementation limitations, this plugin is limited to 256 GiB of data in one direction. |
ChaCha64
|
ChaCha#20 variant with 64-bit counter (8 byte counter, 8 byte nonce, 20 (10 + 10) rounds). The session key is stretched (or reduced) to 256-bit using SHA-256. Session keys shorter than 16 bytes are rejected. |
Arc4
|
Alleged RC4. RC4 is considered insecure these days. |
This configuration property serves multiple purposes:
-
server-side (
firebird.confordatabases.confof the server)-
The plugins accepted for incoming connections
-
The plugins tried for outgoing connections (i.e. server as client)
-
-
client-side (
firebird.confread by client, or key/value inisc_dpb_config)-
The plugins tried for outgoing connections
-
The intersection of server-side and client-side wire encryption plugins decides which plugins are tried. The server-side order of plugins decides in which order they are tried.
# Only enable Arc4 WireCryptPlugin = Arc4
2.1.29. KeyHolderPlugin
Database encryption keyholder plugin
Global, and per-database
KeyHolderPlugin = plugin
No value
A keyholder serves as a temporary storage for database encryption keys. Generally, this plugin will be provided by the third-party database encryption plugin.
Firebird does not include a default plugin.
The Linux distribution includes an example in libCryptKeyHolder_example.so, but this library is intended as an example only, and is not for production use.
KeyHolderPlugin = CustomKeyHolder
2.1.30. AllowEncryptedSecurityDatabase
Enables use of an encrypted security database.
Global, and per-database
AllowEncryptedSecurityDatabase = Boolean
false
With the default setting, it is not possible to authenticate against an encrypted security database.
Depending on the database encryption plugin used and its configuration, the client may hold the encryption key and needs to send it to the server to be able to access the database. With the default configuration, this key exchange will only happen after authentication completed successfully and — if enabled — wire encryption was set up (which depends on the session key of authentication).
However, if the security database is encrypted, this key exchange must occur before authentication. As this needs to happen before wire encryption is established, and could lead to key exposure[7], this must be explicitly enabled.
In general, the security database — assuming use of SRP and long/quality passwords — is pretty good at protecting itself and doesn’t need to be encrypted. One use case of an encrypted security database is if a database is its own security database and needs to be encrypted for other reasons.
|
Please understand what you are doing before enabling this feature. Enabling this feature may expose the database encryption key if it is transmitted from client to server, as the encrypted security database needs to be accessed before wire encryption can be established, as that depends on the successful completion of authentication. Enabling this option may also cause the database encryption handshake to occur before authentication and wire encryption even if the security database itself is not encrypted, but the destination database is. |
Authenticating against an encrypted security database is not supported by the Legacy_Auth authentication plugin.
AllowEncryptedSecurityDatabase = false
2.1.31. Providers
Connection providers used to connect to a database.
Global, per-database, client-side, and per-connection
Providers = <plugin-list>
<plugin-list> ::= plugin [<separator> plugin ...]
<separator> ::=
one of <space> (' '), <comma> (','), <semicolon> (';')
Remote,EngineNN,Loopback (with NN the major ODS of the Firebird version)
Providers are plugins used to connect to a database.
A default Firebird installation supports the following provider plugins:
Remote
|
Connect to a remote Firebird server using TCP/IP, or WNET (Windows-only, removed in Firebird 5.0). This provider expects the legacy URL including a hostname (e.g. TCP/IP |
EngineNN
|
Connect using the Firebird ODS NN database engine (e.g. This provider only expects a database name (filename or alias). |
Loopback
|
Connect to the locally running server.
On Windows, it tries XNET, TCP/IP (using The This provider only expects a database name (filename or alias). |
Additional providers may be added.
For example, copying the Engine12.dll/libEngine12.so from Firebird 3.0 to the plugins directory of Firebird 4.0 or 5.0 and including Engine12 in Providers adds support for opening Firebird 3.0 (ODS 12) databases.
This configuration property serves multiple purposes:
-
server-side (
firebird.confordatabases.confof the server)-
The plugins accepted for incoming connections. However, unless
Redirectionis enabled,Remoteis ignored for incoming connections. -
The plugins tried for outgoing connections (i.e. server as client)
-
-
client-side (
firebird.confread by client, or key/value inisc_dpb_config)-
The plugins tried for outgoing connections
For example, specifying only
Engine13will ensure the client will only make embedded connections.
-
Providers = Engine13
2.1.32. DeadlockTimeout
Timeout for detecting and purging locks held by dead processes in case of a lock conflict.
Global, and per-database
DeadlockTimeout = integer
Second
10
The deadlock timeout is the number of seconds the lock manager will wait in case of a lock conflict before purging locks of dead processes and doing an extra deadlock scan cycle. In normal cases, Firebird will detect deadlocks instantly, so this timeout is only to detect exceptional cases.
Setting this setting too low may increase load and reduce performance.
DeadlockTimeout = 15
2.1.33. StatementTimeout
Statement timeout.
Global, and per-database
| Added |
4.0 |
StatementTimeout = integer
Second
0 (no timeout)
The statement timeout is the maximum duration of statement execution and cursor use.
The engine will automatically cancel the statement after the configured number of seconds.
A value of 0 means that no database-level statement timeout is set.
The statement timeout can be configured on three levels:
-
Database level (through
firebird.confordatabases.conf) -
Connection level (through
SET STATEMENT TIMEOUTor the API)If the database-level timeout is non-zero and lower than the connection-level timeout, the database-level timeout applies instead.
-
Statement level (through the API)
If the database-level timeout is non-zero and lower than the statement-level timeout, the database-level timeout applies instead. A non-zero statement-level timeout takes precedence over the connection-level timeout (i.e. the connection-level timeout is not an upper bound).
The timeout is reported when the client sends a request involving the statement handle.
The request will complete with error isc_cancelled and a secondary error code indicating which timeout expired:
isc_cfg_stmt_timeout
|
Database-level timeout expired |
isc_att_stmt_timeout
|
Connection-level timeout expired |
isc_req_stmt_timeout
|
Statement-level timeout expired |
|
Timeout includes duration of open cursor
In the case of a result set producing statement (e.g. a In other words, be careful with setting this too low. |
|
Notes about statement timeouts
|
# Five minute timeout StatementTimeout = 300
2.1.34. ConnectionIdleTimeout
Connection idle timeout.
Global, and per-database
| Added |
4.0 |
ConnectionIdleTimeout = integer
Minute
0 (no timeout)
The connection idle timeout — or session idle timeout — is the maximum time a connection may be idle (i.e. the engine receives no requests) before it shuts down the connection.
A setting of 0 means that no database-level connection idle timeout is set.
By default, the idle timeout is not enabled. No minimum or maximum limit is imposed, but a reasonably large period — such as a few hours — is recommended.
The connection idle timeout can be configured on three levels:
-
Database level (through
firebird.confordatabases.conf) -
Connection level (through
SET SESSION IDLE TIMEOUTor the API)If the database-level timeout is non-zero and lower than the connection-level timeout, the database-level timeout applies instead.
When a connection is shutdown by the expiration of the idle timeout, the next user API call returns the error isc_att_shutdown with secondary error isc_att_shut_idle.
# One hour ConnectionIdleTimeout = 60
2.1.35. OnDisconnectTriggerTimeout
Timeout of ON DISCONNECT triggers.
Global, and per-database
| Added |
4.0.2 |
OnDisconnectTriggerTimeout = integer
Second
180 (3 minutes)
Firebird will automatically cancel ON DISCONNECT triggers if they run longer than the configured timeout.
A value of 0 means that no timeout is set.
# Five minutes OnDisconnectTriggerTimeout = 300
2.1.36. MaxUnflushedWrites
Maximum number of pending asynchronous writes.
Global, and per-database
MaxUnflushedWrites = integer
Data page/pending write
100 (Windows)
-1 (other platforms)
This parameter determines how frequently pending asynchronous writes are flushed to disk when Forced Writes are disabled (or, asynchronous writing is enabled).
Its value is the number of asynchronous writes that may be pending before a flush is flagged to be done next time a transaction commits.
A setting of -1 disables this (i.e. pending writes are not flushed).
This setting only applies when forced-writes are off.
If the MaxUnflushedWriteTime expires before the maximum number of pending pages is reached, the currently pending pages are flushed as well.
|
Primarily for Windows
This setting was introduced in Firebird 1.5 to address problems on Windows where asynchronous writes were not written to disk until controlled shutdown of Firebird. If Firebird crashed, this could result in data loss. |
MaxUnflushedWrites = 50
2.1.37. MaxUnflushedWriteTime
Maximum time asynchronous writes may be pending.
Global, and per-database
MaxUnflushedWriteTime = integer
Second
5 (Windows)
-1 (other platforms)
This parameter determines how frequently pending asynchronous writes are flushed to disk when Forced Writes are disabled (or, asynchronous writing is enabled).
Its value is the maximum time in seconds an asynchronous write may be pending before a flush is flagged to be done next time a transaction commits.
A setting of -1 disables this (i.e. pending writes are not flushed).
This setting only applies when forced-writes are off.
If the MaxUnflushedWrites is reached before this timeout, the currently pending pages are flushed as well.
|
Primarily for Windows
This setting was introduced in Firebird 1.5 to address problems on Windows where asynchronous writes were not written to disk until controlled shutdown of Firebird. If Firebird crashed, this could result in data loss. |
# 10 seconds MaxUnflushedWriteTime = 10
2.1.38. BugcheckAbort
Enables bugcheck abort.
Global
BugcheckAbort = Boolean
0 (false) — normal builds
1 (true) — debug builds (with DEV_DEBUG)
When enabled, Firebird calls abort() when internal errors or BUGCHECK macros are encountered.
This invokes the post-mortem debugger which can create a core-dump for off-line analysis.
When disabled, the engine tries to minimize damage and continue execution.
Setting this option to 1 will produce traceable core-dumps when something nasty like SIGSEGV happens inside a UDF.
On Windows, enabling this option will invoke the JIT debugger facility when errors happen.
# Enable bugcheck abort BugcheckAbort = 1
2.1.39. ClearGTTAtRetaining
Configures if Global Temporary Tables (GTT) with ON COMMIT DELETE ROWS are cleared on commit/rollback retaining.
Global, and per-database
| Deprecated |
3.0 |
| Removed |
5.0 |
ClearGTTAtRetaining = Boolean
0 (false)
This is a compatibility setting to restore behaviour of Global Temporary Tables as it was in Firebird 2.1.
In the normal behaviour (ClearGTTAtRetaining = 0), a Global Temporary Table with ON COMMIT DELETE ROWS is cleared at a hard commit or rollback, but is retained and the data is accessible after a commit retain or rollback retain.
When enabled (ClearGTTAtRetaining = 1), the table is also cleared on commit retain or rollback retain.
|
This is intended as an interim workaround to be able to run legacy code which relies on the old behaviour. We recommend that you fix such code, so you don’t rely on this workaround. This setting was removed in Firebird 5.0. |
# Enable clearing GTT at commit/rollback retain ClearGTTAtRetaining = 1
2.1.40. RelaxedAliasChecking
Relaxes relation alias checking rules in SQL.
Global
| Deprecated |
2.0 |
RelaxedAliasChecking = Boolean
0 (false)
In Firebird 2.0, stricter parser rules for aliases of relations (e.g. tables, views) were implemented to conform to SQL standard requirements. Enabling this setting relaxes the relation alias checking rules to the Firebird 1.5 and older behaviour.
With the default setting, if a relation is aliased, you are only allowed to reference that relation using its alias.
If RelaxedAliasChecking is set to 1 (true), you can also reference the relation using its original name.
For example:
-- Reference by alias (strict and relaxed) select E.FIRST_NAME from EMPLOYEE as E -- Reference by relation name (relaxed only) select EMPLOYEE.FIRST_NAME from EMPLOYEE as E
|
This is intended as an interim workaround to be able to run legacy code which relies on the old behaviour. We recommend that you fix such code, so you don’t rely on this workaround. There is no guarantee that this setting will be available in future Firebird versions. |
# Relaxed (non-strict) alias checking RelaxedAliasChecking = 1
2.1.41. ReadConsistency
Configures if READ COMMITTED transactions always use READ CONSISTENCY mode.
Global, and per-database
| Added |
4.0 |
ReadConsistency = Boolean
1 (true)
Since Firebird 4.0, READ COMMITTED by default always uses the READ CONSISTENCY mode, even if [NO] RECORD VERSION (isc_tpb_rec_version/isc_tpb_no_rec_version in TPB) is requested.
If ReadConsistency is set to 0 (false), the requested mode is used.
When disabled, READ CONSISTENCY mode must be requested explicitly (e.g. SET TRANSACTION READ COMMITTED READ CONSISTENCY or by including isc_tpb_read_consistency in the TPB).
This setting is intended for backwards compatibility, if your application specifically depends on the behaviour of [NO] RECORD VERSION.
In general, we recommend to leave it at its default value.
|
This is intended as an interim workaround to be able to run legacy code which relies on the old behaviour. We recommend that you fix such code, so you don’t rely on this workaround. There is no guarantee that this setting will be available in future Firebird versions. |
# Disable always using read consistency mode for READ COMMITTED ReadConsistency = 0
2.1.42. DataTypeCompatibility
Configures if newer data types are automatically converted to data types available in an older version.
Global, and per-database
| Added |
4.0 |
DataTypeCompatibility = [{ 2.5 | 3.0 }]
No value
The DataTypeCompatibility setting controls if input parameters (e.g. query parameters) and output columns (e.g. columns of a result set) using new data types are automatically converted to “legacy” data types of the specified older version.
Setting to an empty value will return the data type as is.
This can be used in databases.conf to override (clear) the configuration from firebird.conf.
Configure this setting as a last resort, as it affects all clients to the server — if set in firebird.conf — or database — in databases.conf — even if a client supports the newer data types.
Whenever possible, use the isc_dpb_set_bind connection property or the SET BIND statement instead.
| Source data type | Target data type | Active for |
|---|---|---|
|
|
2.5 |
|
|
2.5, 3.0 |
|
|
2.5, 3.0 |
|
|
2.5, 3.0 |
|
|
2.5, 3.0 |
|
|
2.5, 3.0 |
|
|
2.5, 3.0 |
|
This setting only affects how statement bindings of input parameters and output columns are described to the client, and how values of those parameters and columns are converted between the client and server. It does not change the data types reported by the metadata tables, or on the server itself. |
DataTypeCompatibility = 2.5
2.1.43. ConnectionTimeout
Connection timeout.
Global, client-side, and per-connection
ConnectionTimeout = integer
Second
180 (3 minutes)
The ConnectionTimeout is the number of seconds the client (or the server acting as client to another database) waits before concluding the connection attempt failed.
# Connection timeout of 5 minutes ConnectionTimeout = 300
2.1.44. WireCrypt
Controls if wire encryption is used or even required.
Global, per-database, client-side, and per-connection
WireCrypt = { Disabled | Enabled | Required }
Required (server)
Enabled (client)
By default, encryption is Required for incoming connections and Enabled for outgoing connections (client connections).
To access a server using an older client library which does not support wire encryption, WireCrypt in the server configuration file should be set to Enabled instead of the default Required.
It is recommended to not set WireCrypt to Disabled, because then newer clients will also not encrypt their connections.
The rules are:
-
If one side has
WireCrypt = Disabled:-
If the other side has
WireCrypt = Required, the connection is rejected -
Otherwise, the connection is established without encryption
-
-
If the server and client don’t have matching wire encryption plugins, or the encryption key is missing:
-
If either side has
WireCrypt = Required, the connection is rejected -
Otherwise, the connection is established without encryption
-
-
In all other cases, an encrypted connection is established.
WireCrypt = Enabled
2.1.45. WireCompression
Enables (zlib) wire compression of connections.
Client-side, and per-connection
WireCompression = Boolean
false
This setting is ignored if the client library does not have access to the zlib library (zlib1.dll/libz.so.1).
It is not possible to disable wire compression server-side; if the client requests compression, the server will enable compression.
# Enable wire compression WireCompression = true
2.1.46. DummyPacketInterval
Seconds to wait on a silent client connection before the server sends a dummy packet to request acknowledgment.
Global, per-database, client-side, and per-connection
DummyPacketInterval = integer
Second
0 (disabled)
The dummy packet interval is a way to detect broken connections. If a client is idle for more than the configured interval, the server will send a dummy packet to the client. This packet will result in a TCP/IP-level acknowledgement if the connection is still alive. Otherwise, it will result in detection of the broken connection.
|
Do not set this setting too low: use a value of tens of minutes or even hours, not just a few seconds. A too low value can result in a lot of unnecessary busywork for the server for little gain. |
Configuring this setting should generally be unnecessary as Firebird configures its sockets with SO_KEEPALIVE which will do a similar check at a lower level.
If you do not like the default 2-hour keepalive timeout used by the TCP/IP stack, adjust your server OS settings appropriately.
On UNIX-like OS’s, modify contents of /proc/sys/net/ipv4/tcp_keepalive_* (which also apply to IPv6!).
For Windows, see the KeepAliveTime registry documentation.
# Set interval to 30 minutes DummyPacketInterval = 1800
2.1.47. ClientBatchBuffer
Buffer size (in bytes) used by the client connection to accumulate output messages before sending them to the server using the Batch API.
Client-side, and per-connection
| Added |
4.0 |
ClientBatchBuffer = integer
Byte
131072 (or 128K)
This configuration item governs size of the client-side buffers for statement parameters and blobs for batch execution. Given blob and parameters are stored in separate buffers, the total space allocated is upto twice the configured size, per batch. Irrespective of the configured buffer size, the client will allocate sufficient space to buffer at least one set of statement parameters.
# Buffer two megabyte ClientBatchBuffer = 2M
2.1.48. DefaultTimeZone
Default session or client time zone.
Global, client-side, and per-connection
| Added |
4.0 |
DefaultTimeZone = time-zone-name
No value (for server: derive from OS time zone)
-
If empty, the default time zone for the server is derived from the OS time zone.
The derived time zone uses the rules in the ICU time zone database loaded by Firebird, not the OS time zone database. Additional OS settings, like disabling daylight saving time, have no effect.
-
When set in the server, it defines the default session time zone for attachments that don’t specify
isc_dpb_session_time_zone. -
When set in the client, it defines the default time zone used with client-side API functions and the default value of
isc_dpb_session_time_zone.
The value of time-zone-name is a time zone identifier string, as documented in Time Zone Format in the Firebird 5.0 Language Reference.
# Default to Europe/Berlin DefaultTimeZone = Europe/Berlin
2.1.49. RemoteServiceName
The TCP service name/port number to be used for database connections.
Global, client-side, and per-connection
RemoteServiceName = service-name
gds_db
If service-name is defined in the services definition file (e.g. /etc/services or C:\Windows\System32\drivers\etc\services), it is used to determine the TCP port to use.
If service-name is not found, the value or default of RemoteServicePort is used.
- Server-side
-
Determines the port that the server listens for connections
- Client-side and per-connection
-
Determines the port to use if none is specified in a TCP/IP connection URL
The order of precedence is explicitly set values before defaults, and RemoteServiceName — if an entry is found in the services file — before RemoteServicePort.
In other words, if RemoteServiceName is not explicitly set, and RemoteServicePort is explicitly set, the value of RemoteServicePort is used.
RemoteServiceName = gds_db
2.1.50. RemoteServicePort
The TCP service port number to be used for database connections.
Global, client-side, and per-connection
RemoteServicePort = integer
1 - 65535
3050
Configures the TCP port to use.
- Server-side
-
Determines the port that the server listens for connections
- Client-side and per-connection
-
Determines the port to use if none is specified in a TCP/IP connection URL
The order of precedence is explicitly set values before defaults, and RemoteServiceName — if an entry is found in the services file — before RemoteServicePort.
In other words, if RemoteServiceName is not explicitly set, and RemoteServicePort is explicitly set, the value of RemoteServicePort is used.
# Use port 3051 instead of 3050 RemoteServicePort = 3051
2.1.51. RemoteAuxPort
The TCP port number to be used for server event notification messages.
Global, and per-database
RemoteAuxPort = integer
0 - 65535
0 (use random port)
When a client listens for events, it establishes a secondary connection to the Firebird server, using a port number the server sends to the client. By default, a random port is used.
This setting can be used to specify a fixed port number, for example one that can be allowed through the firewall.
# Use port 3051 instead of a random port RemoteAuxPort = 3051
2.1.52. TcpRemoteBufferSize
Buffer size for send and receive buffers of both the client and server for TCP/IP connections.
Global, client-side, and per-connection
TcpRemoteBufferSize = integer
Byte
1448 - 32767
8192
The engine reads ahead of the client and can send several rows of data in a single packet. With a larger buffer size, more data can be sent per request (e.g. per fetch).
The server-side configuration only configures the server buffer sizes, and the client-side (and per-connection) configuration only configures the client buffer sizes.
|
Set The buffer size influences — among other things — how many rows a single fetch can return. Current Firebird versions will return at most 10 rows, or however many rows fit into 16 packets (whichever is higher), even if a larger number of rows is requested by the client. Using |
# Use maximum buffer size of 32767 TcpRemoteBufferSize = 32767
2.1.53. TcpNoNagle
Enables the TCP_NODELAY socket option (which disables “Nagle’s algorithm”).
Global, client-side, and per-connection
TcpNoNagle = Boolean
1 (enabled)
Disabling “Nagle’s algorithm” (enabling TCP_NODELAY, the default) can improve the responsiveness of network connections, as the socket will not try to coalesce small packets.
# Disable TCP_NODELAY (so, use Nagle's algorithm) TcpNoNagle = 0
2.1.54. TcpLoopbackFastPath
Enables the “TCP Loopback Fast Path” feature (SIO_LOOPBACK_FAST_PATH).
Global, client-side, and per-connection
| Deprecated |
3.0.11, 4.0.3 |
| Removed |
5.0 |
TcpLoopbackFastPath = Boolean
0 (disabled) — since Firebird 3.0.11 and 4.0.3
1 (enabled) — in older versions
|
This setting only has effect on Windows 8 and higher and Windows Server 2012 and higher. Microsoft now discourages its use and advises not to use it as it can cause problems with kernel-level filter drivers on socket connections. In response, Firebird has deprecated this setting in Firebird 3.0.11 and 4.0.3 — changing its default to |
The “TCP Loopback Fast Path” can improve performance of localhost connections on Windows systems.
For it to work, both the client and the server need to enable the SIO_LOOPBACK_FAST_PATH option on the socket before connecting.
As this option is now deprecated, and Microsoft advises not to use it, exercise caution with this option, and leave or set it disabled.
# Disable the "TCP Loopback Fast Path" TcpLoopbackFastPath = 0
2.1.55. IPv6V6Only
When enabled, sets the IPV6_V6ONLY socket option on the listener socket.
Global
IPv6V6Only = Boolean
0 (disabled)
By default, the Firebird server listens on the zero IPv6 address (::) and accepts all incoming connections, whether IPv4 or IPv6, and IPv6V6Only is set to false (0).
If it is set to true (1), the server, still listening implicitly or explicitly on the zero IPv6 address, will accept only IPv6 connections.
A different listening address, either IPv4 or IPv6, can be set using the RemoteBindAddress parameter.
If an IPv4 address or a non-zero IPv6 address is used, the IPv6V6Only setting has no effect.
When enabled, this will also reject IPv4-mapped IPv6 addresses as a value of RemoteBindAddress.
# Enable IPV6_V6ONLY IPv6V6Only = 1
2.1.56. RemoteBindAddress
Network interface of the TCP/IP listener.
Global
RemoteBindAddress = string
Empty (bind to ::)
The setting accepts an IPv4, IPv6 address, or a hostname; the value may optionally be enclosed in square brackets.
By default — when not specified, or explicitly empty — Firebird listens on :: (the zero IPv6 address).
The exact behaviour of the zero IPv6 address depends on IPv6V6Only:
-
if disabled (the default), Firebird listens on all IPv4 and IPv6 network interfaces of the host.
-
if enabled, Firebird only listens on all IPv6 network interfaces of the host (not IPv4).
It is not possible to specify multiple bind addresses.
If IPv6V6Only is enabled, IPv4-mapped IPv6 addresses are rejected.
When using a hostname, that hostname is used to resolve an IP address, preferring IPv6 over IPv4; the resolved address is then used to bind the server. So, make sure the hostname resolves to one IP address only (i.e. not be multihomed or otherwise multiplexed, nor be both IPv4 and IPv6). Otherwise, the server may bind to a different IP address on each restart (e.g. if the DNS resolution does a round-robin), and clients may have connection failures when they resolve a different IP address than the one the server was bound to.
# listen on IPv4 localhost RemoteBindAddress = 127.0.0.1 # listen on IPv6 localhost RemoteBindAddress = ::1 # listen on all IPv4 network interfaces of the host RemoteBindAddress = 0.0.0.0 # listen on the IP address of fbserver.local RemoteBindAddress = fbserver.local
2.1.57. LockMemSize
Allocation size of the shared memory of the lock manager table.
Global, and per-database
LockMemSize = integer
Byte
64K (64 KiB)
The lock manager table is allocated per database.
The value of LockMemSize is the initial size and the allocation unit.
The shared memory will grow dynamically as needed in increments of this allocation unit, up to 2 GiB - 1, or when the system runs out of memory.
# Allocate lock memory in increments of 2 MiB LockMemSize = 2M
2.1.58. LockAcquireSpins
The number of times that the lock manager will try acquiring a lock in a loop before waiting.
Global, and per-database
LockAcquireSpins = integer
0
The lock table of a database can only be accessed by one server process or thread at a time, and this is governed by a mutex. This mutex can be requested conditionally or unconditionally. A conditional request either succeeds immediately or fails and must be retried. An unconditional request will make the process or thread wait (block) until the request succeeds.
This setting is only relevant for SuperClassic and Classic.
It is hard to give specific advice for configuring LockAcquireSpins.
On multicore machines — when using Classic and SuperClassic — it can be advantageous to spin on the lock a few times before waiting unconditionally, on the other hand if the lock table is heavily contested, this is likely to “burn” CPU cycles.
As such, the advice is to experiment with it, and tune it per database in databases.conf.
# Spin 5 times while acquiring lock LockAcquireSpins = 5
2.1.59. LockHashSlots
Number of hash slots for locks.
Global, and per-database
LockHashSlots = integer
101 - 65521
8191
Use of prime numbers is highly recommended. Setting out of range values will use the boundary values.
The number of hash slots determines how locks are distributed in the lock hash table. If two or more locks are assigned to the same hash slot, they are chained together, and the server must “walk” this chain to find the right lock in the slot.
If the average length of lock chains is very long (e.g. 20 locks on average), performance of the server may be affected.
In that case, you can increase the number of LockHashSlots to a higher prime number.
You can use fb_lock_print to determine the average lock chain length (called “Hash lengths” in the lock print output).
# Use 9001 hash slots LockHashSlots = 9001
2.1.60. EventMemSize
Allocation size of the shared memory for the event manager.
Global, and per-database
EventMemSize = integer
Byte
64K (64 KiB)
The memory for the event manager is allocated per database.
The value of EventMemSize is the initial size and the allocation unit.
The shared memory will grow dynamically as needed in increments of this allocation unit, until the system runs out of memory.
# Allocate event manager memory in increments of 128 KiB EventMemSize = 128K
2.1.61. SnapshotsMemSize
Allocation size of shared memory for snapshot management.
Global, and per-database
| Added |
4.0 |
SnapshotsMemSize = integer
Byte
64K (64 KiB)
The memory for snapshots is allocated per database. Each active snapshot uses 16 bytes of memory.
The value of SnapshotsMemSize is the initial size and the allocation unit.
The memory will grow dynamically as needed in increments of this allocation unit, until the system runs out of memory.
Snapshots are used to provide a stable view on data within a transaction or during statement execution. See also Commit Order for Capturing the Database Snapshot in the Firebird 4.0 Release Notes.
# Allocate snapshot memory in increments of 128 KiB SnapshotsMemSize = 128K
2.1.62. TipCacheBlockSize
Block size of shared memory allocated for TIP cache.
Global, and per-database
| Added |
4.0 |
TipCacheBlockSize = integer
Byte
4M (4 MiB)
The TIP cache is a list of all known transactions with associated Commit Numbers (CN), which are used to determine record visibility of active transactions.
The memory for the TIP cache is allocated per database. Each transaction uses 8 bytes of memory. The default size of a TIP cache block is 4 MiB, providing capacity for 512 * 1024 transactions.
A reason to reduce this value is if you have a small TIP cache (or, a small difference between OIT and Next Transaction) and want to conserve memory. A reason to increase this value is if you need a very large TIP cache (or, a very large difference between OIT and Next Transaction) and approach limits on kernel objects allocated for each block (files, mutexes, etc).
The TIP cache is implemented as an array indexed by transaction ID, with as value the corresponding Commit Number.
This array is split into blocks of TipCacheBlockSize bytes containing the CN’s for all transactions between the OIT and Next Transaction markers.
When Next Transaction moves beyond the range of the highest block, a new block is allocated.
The oldest block is released when the OIT moves beyond the range of that block.
# Block size of 1 MiB (128 * 1024 transactions per block) TipCacheBlockSize = 1M
2.1.63. OutputRedirectionFile
File to redirect stdout and stderr output of server.
Global
OutputRedirectionFile = path
/dev/null (Linux and other Unix-like OSes)
nul (Windows)
By default, stdout and stderr are redirected to the “null-device” to suppress any output.
When set to empty or -, the stderr and stdout are not redirected.
When set to a file, it is redirected to that file.
This can be helpful when debugging plugins, UDRs, or UDFs that write to stdout or stderr.
# Disable default redirect OutputRedirectionFile = # Redirect to file /var/tmp/firebirdoutput.log OutputRedirectionFile = /var/tmp/firebirdoutput.log
2.1.64. CpuAffinityMask
Which CPUs should be used (Windows Only)
Global
CpuAffinityMask = integer
0 (all CPUs)
Sets which processors can be used by the server.
The value is taken from a bitmap in which each bit represents a CPU.
Thus, to use only the first processor (CPU 0), the value is 1.
To use both CPU 0 and CPU 1, the value is 3 (binary 11).
To use CPU 1 and CPU 2, the value is 6 (binary 110).
The default value is 0 - no affinity will be set.
In Firebird 5 and later, on Windows 10 and later, if affinity is not set by CpuAffinityMask, nor by the caller process, then the server tries to exclude efficiency cores from its own affinity mask, i.e. default affinity mask includes performance cores only.
On 32-bit Windows, this can configure at most 32 CPUs; on 64-bit Windows, at most 64 CPUs. On systems with more than 64 processors, it can only configure the processors in the processor group assigned to the Firebird process.
For technical information, see the Microsoft documentation of SetProcessAffinityMask.
# Use CPU 7 only (binary 10000000) CpuAffinityMask = 128 # Use CPU 15 and CPU 7 (binary 1000000010000000) CpuAffinityMask = 32896
2.1.65. GCPolicy
Garbage collection policy.
Global, and per-database
GCPolicy = { cooperative | background | combined }
combined (SuperServer)
cooperative (Classic/SuperClassic)
The garbage collection policy configures how Firebird SuperServer performs garbage collection. For Classic and SuperClassic, this setting is ignored; they always use the cooperative policy.
| cooperative |
When a connection encounters garbage — old record versions that are no longer interesting — while reading a record, it will collect that garbage immediately. If there is a lot of garbage, this can reduce performance of statement execution and fetching. |
| background |
When a connection encounters garbage while reading a record, it will queue the record for the garbage collector. The garbage collector will — at a later time — collect garbage on that record. |
| combined |
A combination of cooperative and background. Some types of garbage will be queued for the garbage collector, while others will be collected by the connection itself. |
# Use background garbage collection policy GCPolicy = background
2.1.66. MaxStatementCacheSize
Maximum amount of memory per connection for the statement cache.
Global, and per-database
| Added |
5.0 |
MaxStatementCacheSize = integer
Byte
2M (2 MiB)
The statement cache is a per-connection cache of previously compiled SQL statements.
Setting the value to 0 disables the cache.
The cache is maintained automatically;
cached statements are invalidated when required, e.g. when a DDL statement is executed, or when the cache size exceeds MaxStatementCacheSize.
# Disable statement cache MaxStatementCacheSize = 0 # Cache 5 MiB MaxStatementCacheSize = 5M
2.1.67. SecurityDatabase
Location of the security database.
Global, and per-database
SecurityDatabase = { path | alias }
$(dir_secDb)/securityN.fdb (with N the major version of Firebird)
The security database is used for authentication and certain global configuration and user privileges (e.g. global authentication mapping, and CREATE DATABASE privileges).
When using embedded mode, no authentication is performed.
The SecurityDatabase can be configured per database in databases.conf.
Such a security database can be created as a normal database.
Initialization as a security database happens per authentication plugin, the first time that authentication plugin is used to create a user.
This initialization must be done with an embedded connection otherwise you cannot connect, or authenticated with a SYSDBA or RDB$ADMIN user of an already initialized authentication plugin.
It is possible to configure a database as its own security database, but only after the database has been created.
databases.conf# Configure employee example database as its own security database
employee = $(dir_sampleDb)/employee.fdb
{
SecurityDatabase = employee
}
2.1.68. MaxParallelWorkers
Maximum number of parallel workers per database per process.
Global
| Added |
5.0 |
MaxParallelWorkers = integer
1 - 64
1 (no parallelism)
Values higher than 1 configure the total number of parallel workers that can be created within a single Firebird process for each attached database.
Workers are accounted for each attached database independently.
Parallel workers are used to parallelize certain database operations. In Firebird 5.0, that includes index creation and rebuilding, and sweep.
In SuperServer, worker attachments are implemented as light-weight system attachments, while in Classic and SuperClassic they look like normal user attachments. All worker attachments are embedded into the creating server process, so in Classic there are no additional server processes. Worker attachments are present in monitoring tables. Idle worker attachments are destroyed after 60 seconds of inactivity. In Classic, worker attachments are destroyed immediately when the user connection detaches from the database.
Setting out of range values will use the boundary values.
|
This number is per database and per process. This means that if you use SuperServer or SuperClassic, and set |
MaxParallelWorkers = 8
2.1.69. ParallelWorkers
Default number of parallel workers for a connection.
Global
| Added |
5.0 |
ParallelWorkers = integer
1 (no parallelism)
This configures the default number of parallel workers that can be created by a single connection.
This default can be overridden with the isc_dpb_parallel_workers connection property (up to the maximum MaxParallelWorkers).
For accounting purposes, the user connection itself is counted as a worker, which is why value 1 means no parallelism, and a value of 2 means 1 additional worker connection next to the user connection.
Parallel workers are allocated on a first come, first served basis, so — in SuperServer and SuperClassic — when multiple connections to a database ask for parallel workers, at most MaxParallelWorkers workers can be created.
For example, if ParallelWorkers is 3 and MaxParallelWorkers is 4, and three connections ask for parallel workers, only 4 are allocated, e.g. two workers for the first, two for the second, and none for the third connection.
A connection only asks for parallel workers when performing a parallel operation. Once the operation is complete, the worker is released.
Parallel workers are used to parallelize certain database operations. In Firebird 5.0, that includes index creation and rebuilding, and sweep.
Setting out of range values will use the boundary values.
ParallelWorkers = 4
2.1.70. GuardianOption
Configures behaviour of the Firebird Guardian service (Windows only).
Global
GuardianOption = integer
1 (always restart)
0
|
only start the engine/service once |
1
|
always restart the engine/service if it terminates |
This setting only has effect when the Firebird Guardian service is installed and running.
|
The Firebird Guardian service is deprecated, and its use is not recommended. The normal service recovery options provided by Windows should be preferred. |
GuardianOption = 0
2.1.71. ProcessPriorityLevel
Priority level/class for the server process (Windows only).
Global
ProcessPriorityLevel = integer
0 (normal priority)
< 0
|
low priority (sets |
0
|
normal priority (sets |
> 0
|
high priority (sets |
Configures the process priority on Windows, which is used by the CPU scheduler to decide how and when to schedule threads of the Firebird process(es).
Setting a negative value may reduce responsiveness of the Firebird server if the system is otherwise busy, and setting a positive value may result in Firebird starving other process of CPU cycles.
In general, do not set this to anything other than 0, and if you do set it, carefully test if your system responds correctly.
For technical information, see the Microsoft documentation of SetPriorityClass.
# Set high priority ProcessPriorityLevel = 1 # Set idle priority ProcessPriorityLevel = -1
2.1.72. IpcName
Name of the shared memory area used as the transport channel for the XNET (a.k.a. local) protocol (Windows only).
Global, client-side, and per-connection
IpcName = string
FIREBIRD
Server-side, the configuration is used to create the shared memory to accept XNET connections, and for creating XNET connections to other servers. Client-side, the configuration is used to open the shared memory to make XNET connections to the server.
The user running the server process should have the SE_CREATE_GLOBAL_NAME privilege (or SeCreateGlobalPrivilege), so the shared memory area can be registered in the Global\ namespace.
If the user does not have this privilege, it will be registered in the local namespace, and only processes running in the same session will be able to connect using XNET.
If you’re running Firebird as a service, and the user does not have SeCreateGlobalPrivilege, processes on the same machine will not be able to connect with XNET, as the service runs in its own session.
You can configure this value if you have multiple Firebird servers running on the same machine which all need to be able to accept XNET connections.
In that case, clients will need to be configured with that IpcName as well, either in their firebird.conf, or through isc_dpb_config.
IpcName = FIREBIRD_2_5
2.1.73. RemotePipeName
Name of the pipe used as a transport channel in the WNET (a.k.a. NetBEUI) protocol (Windows only).
Global, client-side, and per-connection
| Removed |
5.0 |
RemotePipeName = string
interbas
Server-side, the configuration is used to create the pipe to accept WNET connections, and for creating WNET connections to other servers. Client-side, the configuration is used to open the pipe to make WNET connections to the server.
You can configure this value if you have multiple Firebird servers running on the same machine which all need to be able to accept WNET connections.
In that case, clients will need to be configured with that RemotePipeName as well, either in their firebird.conf, or through isc_dpb_config.
RemotePipeName = FIREBIRD_2_5
2.1.74. UseLegacyKernelObjectsNames
Configures how Firebird creates named Windows kernel objects, such as events, memory mapped files, etc. (Windows only).
Global
| Added |
4.0.3 |
| Deprecated |
4.0.3 |
| Removed |
5.0 |
UseLegacyKernelObjectsNames = Boolean
false
Since version 4.0.3, Firebird creates named kernel objects in a private namespace. This allows processes to interact within different Windows sessions, such as a user session and a service session. Also, it uses the engine version in some shared event names; this allows a single process to host Firebird engines of different versions.
This setting is for backward compatibility between Firebird 4.0 releases only, and is not present in Firebird 5.0 and higher. Enabling it allows simultaneous running of processes of newer (>= 4.0.3) and older (< 4.0.3) subreleases of Firebird 4.0.
# Enable legacy behaviour UseLegacyKernelObjectsNames = true
2.1.75. Redirection
Allow multi-hop connections to other Firebird servers.
Global
| Deprecated |
5.0 |
Redirection = Boolean
0 (false)
A multi-hop connection allows you to redirect a connection to a database through intermediate servers.
|
Deprecated in Firebird 5, to be removed in Firebird 6
This feature was partially broken in Firebird 3 with early (in remote listener) user authentication, and some plugins cannot be used with |
With this setup, a connection string specifies a list of servers to connect through, where the last server is the server that actually hosts the database.
For example, with the connection string host1:host2:database, the client will connect to host1 with the database host2:database.
If host1 has redirection enabled, it will — without authentication on host1 — forward the connection to host2 to open database database — where the connection will be authenticated.
Packets will be routed through host1 between host2 and the client.
In effect, host1 serves as a pass-through proxy to host2.
|
Security recommendation
Do not enable this feature unless you really know what you’re doing! Careless use of this feature may allow for circumventing security measures like firewalls and other access control measures.
For example if |
# Explicitly disable redirection Redirection = 0
2.1.76. ServerMode
Configures database access, process, and caching behaviour of the Firebird engine.
Global
ServerMode =
{ Super | ThreadedDedicated
| SuperClassic | ThreadedShared
| Classic | MultiProcess }
Super
Super/ThreadedDedicated-
Databases are opened by a single server process with exclusive access. User attachments are processed by threads launched from a common pool, and all share a single database page cache inside the process.
Generally known as “SuperServer”.
SuperClassic/ThreadedShared-
Databases are opened by a single server process with shared access. Databases may be opened by multiple processes (including embedded). User attachments are processed by threads launched from a common pool, each having its own database page cache.
Generally known as “SuperClassic”.
Classic/MultiProcess-
For each attachment to the server, a separate process is started. Databases are opened with shared access, and may be opened by multiple processes (including embedded). Each attachment (process) has its own database page cache.
Generally known as “Classic”.
The ServerMode affects how Firebird opens databases, and the memory use per attachment.
There is no single “best” choice.
|
Historically, for Firebird 2.1 and older, SuperServer did not scale well with multiple CPU cores. This was improved in Firebird 2.5, and fully addressed in Firebird 3.0. In other words, CPU scalability is no longer a reason to not use SuperServer. |
ServerMode = SuperClassic
2.1.77. ExtConnPoolSize
Maximum number of inactive (idle) connections in the external connections pool.
Global
| Added |
4.0 |
ExtConnPoolSize = integer
0 - 1000
0 (disabled)
The external connections pool is a connection pool for the external data source (EDS) subsystem. For details, consult Pooling of External Connections in the Firebird 3.0 Release Notes.
As the connection pool is per process, for Classic this means it is effectively per connection.
ExtConnPoolSize = 20
2.1.78. ExtConnPoolLifeTime
The number of seconds a connection can be idle in the external connections pool before it is closed.
Global
| Added |
4.0 |
ExtConnPoolLifeTime = integer
Second
1 - 86400 (1 second to 24 hours)
7200 (2 hours)
When an external connection is returned to the idle list of the pool, a timer is started.
At or after this timer reaches ExtConnPoolLifeTime, the connection will be closed and removed from the pool.
The timer is stopped and cleared when the connection is returned to the active list of the pool.
The external connections pool is a connection pool for the external data source (EDS) subsystem. For details, consult Pooling of External Connections in the Firebird 3.0 Release Notes.
# 1.5 hours ExtConnPoolLifeTime = 5400
3. databases.conf
The file databases.conf defines aliases for databases, and — optionally — database specific configuration.
It can be used both server-side, and client-side.
You can define multiple aliases for a single database, but only one of those aliases can be a scoped value (that is, have configuration between braces).
3.1. Server-side usage
When used server-side, the file defines aliases that the server redirects to a specific database file, and — if specified — database-specific configuration used by the server for the database file.
The configuration specified in the scoped value applies for all connections to that database, not just connections using that specific alias.
Only per-database configuration items are supported, other configurations items are ignored.
3.2. Client-side usage
When used client-side, the file defines aliases that the client can use as alternative connection strings, and the configuration the client uses for the connection if the connection string matches that alias, or the value of that alias, exactly.
The value of the alias can only be a filename, or a legacy connection string. At this time, modern URL connection strings are not supported. See also firebird#8302.
Only per-database and client-side configuration items are supported, other configurations items are ignored.
|
It is possible some connection properties are only per-database server-side, and global client-side, or vice versa. If you find such a case, please report it on the firebird-documentation repository so we can update the documentation. |
3.3. Configuration items
The details of the configuration items allowed in databases.conf are documented in chapter firebird.conf.
The following configurations items are supported:
4. plugins.conf
The file plugins.conf contains the configuration for various plugins to Firebird.
The file has two types of configuration items with scoped values:
4.1. Plugin
The Plugin item contains the registration information of a plugin.
Plugin = plugin-name
{
[ Module = module-name ]
[ RegisterName = register-name ]
[ Config = config-name ]
[ ConfigFile = config-filename ]
}
| Parameter | Description |
|---|---|
plugin-name |
Name of the plugin used by Firebird to look up — or, load — the plugin. |
module-name |
Name of the dynamic library containing the plugin. If not specified, plugin-name is used. |
register-name |
Name of the plugin in the dynamic library. If not specified, plugin-name is used. |
config-name |
Name of the |
config-filename |
Name of the configuration file with the plugin-specific configuration.
The file should use simple key-value syntax as used by |
If both Config and ConfigFile are specified, Config will be used.
If neither Config nor ConfigFile are specified, the configuration will be resolved as follows:
-
If a file
module-name.confexists, that will be used asConfigFile -
Otherwise,
Configis set to plugin-name.
These rules also apply to implicitly loaded plugins.
|
Registration in
plugins.conf is optionalFor simple cases, the presence of the plugin library in the Registration in
|
4.2. Config
The Config item contains the configuration of a specific plugin.
Config = config-name
{
{ key-name = value <new-line> }...
}
| Parameter | Description |
|---|---|
config-name |
Configuration name, as referenced from a |
key-name |
Configuration key; plugin-specific |
value |
Value for configuration key key-name; plugin-specific |
Each key-value pair must be on a line of its own.
Supported values of key-name and value are plugin-specific.
5. replication.conf
|
The author has little experience with Firebird replication, so it’s possible that the descriptions here are lacking in detail or practicality. Feedback, additions, or corrections are highly appreciated. Do not hesitate to contact us on firebird-devel or through the firebird-documentation issue tracker, or submit a pull request to the firebird-documentation repository. |
The replication.conf file configures replication between databases.
This section serves as a reference for the configuration items in replication.conf;
it does not cover — nor is it intended to cover — all aspects of Firebird replication.
At time of writing, only the Firebird 4.0 Release Notes and doc/README.replication.md[8] in a Firebird installation document replication.
5.1. Syntax
The syntax of replication.conf has two types of configuration:
-
server level (applies to all databases)
database { [<key> = <value>]... }This is essentially a scoped value without an equals (‘
=’) and simple value -
database level (applies to a specific database)
database = database-path { [ <key> = <value> <new-line> ]... }This is a scoped value.
The database-path must be a valid absolute or relative path; aliases or wildcards cannot be used.
The database-level settings override those set on server-level.
5.2. Configuration items
The following sections list the configuration items supported in the scoped values of replication.conf.
The configuration items are listed in order of appearance in the default replication.conf file.
Primary side
The following configuration items only affect the primary side (a.k.a. master) of replication.
5.2.1. plugin
Plugin used to perform replication.
Synchronous, asynchronous
| Added |
4.0 |
plugin = plugin
empty (use built-in replication)
Leaving/setting this empty will use the built-in (default) replication.
# Use plugin CustomReplication for all databases
database
{
plugin = CustomReplication
}
# Revert to default replication for a specific database
database /path/to/example.fdb
{
plugin =
}
|
The |
5.2.2. include_filter
Pattern for tables to include in replication.
Synchronous, asynchronous
| Added |
4.0 |
include_filter = [ <sql-regular-expression> ] <sql-regular-expression> ::= !! See Syntax: SQL Regular Expressions !!
empty (all tables of publication set)
By default, all tables in the publication set of the database are replicated.
The include_filter can be used to reduce this to a subset (only those matching the include_filter — and not matching the exclude_filter).
The publication set of the database can be configured with ALTER DATABASE, CREATE TABLE and ALTER TABLE.
This is not covered by this reference.
For further details, see Setting Up Replication in the Firebird 4.0 Release Notes.
The include_filter uses the SQL regular expression syntax, described in Syntax: SQL Regular Expressions in the Firebird 5.0 Language Reference.
database /path/to/example.fdb
{
# Only replicate tables with prefix DAT_, and tables CUSTOMER and ORDER
include_filter = DAT\_%|CUSTOMER|ORDER
}
5.2.3. exclude_filter
Pattern for tables to exclude in replication.
Synchronous, asynchronous
| Added |
4.0 |
exclude_filter = [ <sql-regular-expression> ] <sql-regular-expression> ::= !! See Syntax: SQL Regular Expressions !!
empty (exclude nothing)
By default, all tables in the publication set of the database are replicated.
The exclude_filter can be used to reduce this to a subset (exclude those matching the exclude_filter — possibly already limited to those matching the include_filter).
The publication set of the database can be configured with ALTER DATABASE, CREATE TABLE and ALTER TABLE.
This is not covered by this reference.
For further details, see Setting Up Replication in the Firebird 4.0 Release Notes.
The exclude_filter uses the SQL regular expression syntax, described in Syntax: SQL Regular Expressions in the Firebird 5.0 Language Reference.
database /path/to/example.fdb
{
# Do not replicate tables with prefix DAT_, and tables CUSTOMER and ORDER
exclude_filter = DAT\_%|CUSTOMER|ORDER
}
5.2.4. log_errors
Configures if all errors and warnings are logged to replication.log.
Synchronous, asynchronous
| Added |
4.0 |
log_errors = Boolean
true
This setting only affects error logging on the primary side.
For error logging on the replica side, see verbose_logging.
5.2.5. report_errors
Configures if replication errors are reported to the client application.
Synchronous, asynchronous
| Added |
4.0 |
report_errors = Boolean
false
5.2.6. disable_on_error
Configures if a replication error disables replication.
Synchronous, asynchronous
| Added |
4.0 |
disable_on_error = Boolean
true
Primary configuration items of built-in replication
The following configuration items are specific to configure the primary side of the built-in (default) replication. If you use a third-party replication plugin, consult the documentation of your replication plugin for its configuration items.
5.2.7. buffer_size
Size of in-memory buffer to accumulate changes that can be deferred until transaction commit/rollback.
Synchronous, asynchronous
| Added |
4.0 |
buffer_size = integer
Byte
1048576 (1 MiB)
The bigger this value, the less concurrent disk access (related to journal IOPS) happens.
For synchronous replication, it also affects number of network round-trips between primary and replica hosts. However, a larger buffer results in a longer replication “checkpoint” (delay to synchronize the original database with its replica at commit).
5.2.8. journal_directory
Directory to store replication journal files.
Asynchronous
| Added |
4.0 |
journal_directory = path
The journal directory is a working directory where the Firebird server stores its journal files for the primary for asynchronous replication.
This setting should not be specified when only using synchronous replication.
The journal directory is for use by the primary only; this directory and its contents should not be referenced, accessed or modified by the replica (or anything else).
When asynchronous replication is used, journal files (or, replication segments) are moved to the journal archive directory or using a custom archiving command when they are ready to be replicated to (consumed by) the replica.
5.2.9. journal_file_prefix
Prefix for replication journal file names.
Asynchronous
| Added |
4.0 |
journal_file_prefix = string
empty (use database filename)
The journal filename is generated by concatenating the prefix with a sequential number.
If not specified, the database filename (without path) is used as a prefix.
5.2.10. journal_segment_size
Maximum allowed size for a single replication segment.
Asynchronous
| Added |
4.0 |
journal_segment_size = integer
Byte
16777216 (16 MiB)
5.2.11. journal_segment_count
Maximum allowed number of full replication segments pending archiving.
Asynchronous
| Added |
4.0 |
journal_segment_count = integer
Replication segments
8
Once this limit is reached, the replication process is temporarily delayed to allow the archiving to catch up. If any of the full segments are not archived within one minute, replication fails with an error.
Zero (0) means an unlimited number of segments pending archiving.
5.2.12. journal_group_flush_delay
Delay, in milliseconds, to wait before the changes are synchronously flushed to the journal (usually at commit time).
Asynchronous
| Added |
4.0 |
journal_group_flush_delay = integer
Millisecond
0 (no delay)
This setting allows multiple concurrently committing transactions to amortise I/O costs by sharing a single flush operation.
Zero (0) means no delay, i.e. “group flushing” is disabled.
5.2.13. journal_archive_directory
Directory to store archived replication segments.
Asynchronous
| Added |
4.0 |
journal_archive_directory = path
The journal archive directory is used to store replication segments (journal files) that are ready to be consumed by a replica using asynchronous replication.
Firebird will automatically move replication segments to this directory, unless journal_archive_command is defined.
If you have a single replica, the journal archive directory can be used directly by the replica (in journal_source_directory).
This can — for example — be done by mounting or otherwise sharing the directory between both hosts.
If you have multiple replicas, each replica must have its own copy of the journal archive.
Replicas will delete journal files they no longer need, which can conflict with the needs of another replica.
Make sure that each journal file created by Firebird in this directory is copied to a location unique to a replica, or use the journal_archive_command instead.
The value of this configuration item also defines the $(archpathname) macro used in journal_archive_command.
This configuration item can be omitted when journal_archive_command is specified without the $(archpathname) macro.
5.2.14. journal_archive_command
Program (complete commandline with arguments) that is executed when a replication segment is full and needs archiving.
Asynchronous
| Added |
4.0 |
journal_archive_command = string
This program must return exit-code zero only if archiving has been performed successfully. In particular, it must return a non-zero exit-code if the target archive already exists.
Special predefined macros are available:
$(filename)-
filename (without path) of the journal segment being archived
$(pathname)-
full path of the journal segment being archived; same as
journal_directory+$(filename) $(archivepathname)-
suggested full path for the archived segment; same as
journal_archive_directory+$(filename)
If journal_archive_command is used without the $(archivepathname) macro, the configuration item journal_archive_directory can be omitted.
# Linux journal_archive_command = "test ! -f $(archivepathname) && cp $(pathname) $(archivepathname)" # Windows journal_archive_command = "copy $(pathname) $(archivepathname)"
5.2.15. journal_archive_timeout
Timeout, in seconds, to wait until an incomplete (not full) segment is scheduled for archiving.
Asynchronous
| Added |
4.0 |
journal_archive_timeout = integer
Second
60 (1 minute)
This configuration item can be used to minimize the replication gap if the database is modified rarely.
Zero (0) means no intermediate archiving, i.e. segments are archived only after reaching their maximum size (defined by journal_segment_size).
5.2.16. sync_replica
Connection information to the replica database (for synchronous replication).
Synchronous
| Added |
4.0 |
sync_replica = <connection-specification>
<connection-specification> ::=
[username[:password]]@<database-url>
| <database-url>
'{'
[ <key> = <value> <new-line> ]...
'}'
<database-url> ::=
!! Normal Firebird database URL formats !!
Multiple entries are allowed (for different synchronous replicas).
The value of sync_replica is either:
-
a simple value with the database URL, optionally prefixed with a username and an optional password, or
-
a scoped value where the simple value is only a database URL, and configuration of username and password is done through key-value items within the scope.
To specify a username or password containing : or @, you must use a scoped value.
| Item | Value |
|---|---|
|
Username for connecting to the replica |
|
Password for connecting to the replica |
|
Path of a file containing the username for connecting to the replica; the first non-empty line is the username |
|
Path of a file containing the password for connecting to the replica; the first non-empty line is the password |
|
Name of an environment variable containing the username for connecting to the replica |
|
Name of an environment variable containing the password for connecting to the replica |
At most one username* and one password* key may be specified.
If username_file or password_file have a relative path, the path is resolved against the Firebird root directory.
# As simple value
sync_replica = john:smith@server2:replica
# As scoped value
sync_replica = server2:replica
{
username = john
password = smith
}
# Password sourced from file
sync_replica = server2:replica
{
username = john
password_file = /path/to/password.txt
}
# Username and password sourced from environment
sync_replica = server2:replica
{
username_env = REPLICA_USERNAME
password_env = REPLICA_PASSWORD
}
Replica side
The following settings only affect the replica side (a.k.a. secondary or slave) of replication.
5.2.17. cascade_replication
Configures if changes applied to the replica will be subject to further replication (if any configured).
Synchronous, asynchronous
| Added |
4.0 |
cascade_replicaton = Boolean
false
This setting only has an effect if the replica is also configured as a primary.
If disabled (the default), changes applied from incoming replication are not replicated. Only changes directly applied to the (read-write) replica (i.e. changes to the database by means other than replication) will be replicated to the “next” replica(s).
If enabled, the changes applied from incoming replication and changes directly applied to the replica will be replicated to the “next” replica(s).
5.2.18. journal_source_directory
Directory to search for the journal files to be applied to the replica.
Asynchronous
| Added |
4.0 |
journal_source_directory = path
The replica searches the journal source directory for files to apply.
If there is only a single replica, the directory specified in this configuration item can be the same directory as specified in journal_archive_directory of the primary.
This can — for example — be done by mounting or otherwise sharing the directory between both hosts.
If you have multiple replicas, each replica must have its own copy of the journal archive, and use its own directory. Replicas will delete journal files they no longer need, which can conflict with the needs of another replica.
5.2.19. source_guid
Filter to limit replication to a particular source database (based on its GUID).
Asynchronous
| Added |
4.0 |
source_guid = <quoted-guid>
<quoted-guid> ::= '"{' guid '}"'
By default, asynchronous replication will (try to) apply all journal files — from any primary — that shows up in the journal_source_directory.
This setting can be used to only apply journal files from a specific primary, using its database GUID (e.g. as shown on the header page of gstat -h).
|
The double quotes and braces around the GUID are required! |
source_guid = "{8FA6D945-BE7E-4376-86D7-E4AAF3889FAF}"
5.2.20. verbose_logging
Configures if replication.log contains a detailed log of operations performed by replication.
Asynchronous
| Added |
4.0 |
verbose_logging = Boolean
false
If disabled (the default), only errors and warnings are logged.
This setting only affects logging on the replica side.
For error logging on the primary side, see log_errors.
5.2.21. apply_idle_timeout
Timeout (in seconds) to wait before scanning for new replication segments.
Asynchronous
| Added |
4.0 |
apply_idle_timeout = integer
Second
10 (10 seconds)
When all existing journal files have been applied, replication waits for the specified duration before checking if new files have arrived in journal_source_directory.
5.2.22. apply_error_timeout
Timeout (in seconds) to wait before retrying queued replication segments after an error.
Asynchronous
| Added |
4.0 |
apply_error_timeout = integer
Second
60 (1 minute)
After an error when applying a replication segment, replication is paused for the specified duration before retrying.
The server disconnects from the replica database, sleeps for the specified timeout, then reconnects and tries to reapply the latest segments from the point of failure.
6. Trace configuration
The trace facility of Firebird can be used to trace (record) various types of actions (e.g. connect, prepare, execute, commit) for databases and services. See also Trace and Audit Services in the Firebird 2.5 Release Notes. Beware, the configuration syntax changed between Firebird 2.5 and Firebird 3.0.
Server administrators can use the system trace to trace actions for services, all databases, or a subset of databases.
The system trace can be configured in a configuration file, whose path is set in configuration item AuditTraceConfigFile in firebird.conf.
A default Firebird installation contains a file fbtrace.conf that shows the layout and configuration items for a system trace;
this file is not used by default (the default value of AuditTraceConfigFile is empty, meaning no system trace).
Any user can start and manage a user trace using the services API.
An ordinary user — not an administrator, and without the TRACE_ANY_ATTACHMENT system privilege — can request a trace only on their own connections, and cannot manage trace sessions started by other users.
Administrators can manage any user trace session.
The configuration of a user trace is sent as a string to the services manager, with the same syntax as the system trace configuration file.
The actual trace output is handled by a plugin, configured in TracePlugin in firebird.conf.
This documentation assumes the default trace plugin included with Firebird, fbtrace.
6.1. Trace configuration syntax
The trace configuration has two main keywords.
services-
The
serviceskeyword only has a Scope; that is, it does not have= simple-value. This default section contains the entire trace configuration for all services. database-
The
databasekeyword is a scoped value. It is used to configure tracing databases.The
databasekeyword can occur without= simple-valueand only a scope — the default section. The default section contains the trace configuration items for all databases, and establishes defaults that can be overridden by a later occurrence of adatabasesection with a simple value.
The simple value of a non-default database section is either a database filename without path or a SQL regular expression pattern which is matched against the absolute path of the database file.
|
Firebird 2.5 used a different syntax for trace configuration. This reference does not cover that syntax. The order of evaluation and description of configuration items (but not their syntax) are generally the same — assuming the configuration item existed in that version. |
6.1.1. Order of evaluation
A trace configuration has the following order of evaluation rules to match a database or service
-
the configuration is processed from top to bottom
-
configuration items of a default section are applied for all databases or services
-
only one default section of each type is allowed
-
for a service, search ends
-
for a database, search continues
-
-
if a database name matches the pattern of a non-default section
-
its configuration items are applied
-
search ends
-
In other words, there can only be one (default) services section, and one default database section.
At most one other database section (with value) is used for a database, the first one to match.
6.2. Trace configuration items
The following are the configuration items available for trace configuration.
Some configuration items apply to both trace types (database and services), others are specific to a type.
The applicable types are listed under Trace type in each configuration item section.
The configuration items are listed in order of first appearance in the example fbtrace.conf.
6.2.1. enabled
Enables tracing.
database, services
enabled = Boolean
false
6.2.2. log_filename
Path of trace log file (system trace only).
database, services
log_filename = path
path is the absolute or relative path of the log file. This configuration item is only available for system trace configuration.
A backslash must be escaped as \\, or — on Windows — you can also use / as the path separator.
For database sections, regular expression references (sed-like) for substitutions based on the matched pattern (simple value of the section) are supported.
\0 — whole matched string, \1 … \9 — regular expression groups (parenthesized subexpressions).
6.2.3. max_log_size
Maximum size of log files (in megabytes).
database, services
max_log_size = integer
Megabyte (MiB)
0 (unlimited)
When the maximum log file size is reached, the log is rotated by renaming it to include the current date and time.
A new log file with the name configured by log_filename is created.
A value of 0 (zero, the default) means that the file size is unlimited, and no rotation will occur.
This configuration item is only available for system trace configuration.
For limiting user trace sizes, specify MaxUserTraceLogSize in firebird.conf.
6.2.4. include_filter
Pattern for inclusion of trace events in a trace.
database, services
include_filter = [ <sql-regular-expression> ] <sql-regular-expression> ::= !! See Syntax: SQL Regular Expressions !!
What is matched depends on the trace type:
database
|
Statement text of a query-related event. |
services
|
Service name of a service-operation-related event. Supported service names
|
Other event types are not subject to inclusion or exclusion.
6.2.5. exclude_filter
Pattern for exclusion of trace events in a trace.
database, services
include_filter = [ <sql-regular-expression> ] <sql-regular-expression> ::= !! See Syntax: SQL Regular Expressions !!
What is matched depends on the trace type:
database
|
Statement text of a query-related event. |
services
|
Service name of a service-operation-related event. |
Other event types are not subject to inclusion or exclusion.
6.2.6. log_connections
Enables logging of database attach and detach events.
database
log_connections = Boolean
false
6.2.7. connection_id
Limits the trace to a specific connection.
database
connection_id = integer
0 (all connections)
The value 0 (zero, the default) traces all connections.
A non-zero value traces the connection with that specific connection id.
The connection id is the value reported by — for example — CURRENT_CONNECTION, and in column MON$ATTACHMENT_ID of MON$ATTACHMENTS.
It’s not possible to specify multiple connection ids.
6.2.8. log_transactions
Log start and end of transactions.
database
log_transactions = Boolean
false
6.2.9. log_statement_prepare
Log statement prepare.
database
log_statement_prepare = Boolean
false
6.2.10. log_statement_free
Log statement free (close cursor, unprepare statement, drop statement handle).
database
log_statement_free = Boolean
false
6.2.11. log_statement_start
Log statement execution start.
database
log_statement_start = Boolean
false
6.2.12. log_statement_finish
Log statement execution finish.
database
log_statement_finish = Boolean
false
For statements with a cursor (e.g. SELECT), a statement is only finished when the last record has been fetched or the cursor is closed.
6.2.13. log_procedure_compile
Log procedure compilation.
database
| Added |
5.0 |
log_procedure_compile = Boolean
false
6.2.14. log_procedure_start
Log procedure execution start.
database
log_procedure_start = Boolean
false
6.2.15. log_procedure_finish
Log procedure execution finish.
database
log_procedure_finish = Boolean
false
6.2.16. log_function_compile
Log function compilation.
database
| Added |
5.0 |
log_function_compile = Boolean
false
6.2.17. log_function_start
Log function execution start.
database
log_function_start = Boolean
false
6.2.18. log_function_finish
Log function execution finish.
database
log_function_finish = Boolean
false
6.2.19. log_trigger_compile
Log trigger compilation.
database
| Added |
5.0 |
log_trigger_compile = Boolean
false
6.2.20. log_trigger_start
Log trigger execution start.
database
log_trigger_start = Boolean
false
6.2.21. log_trigger_finish
Log trigger execution finish.
database
log_trigger_finish = Boolean
false
6.2.22. log_context
Log context variable change (through RDB$SET_CONTEXT).
database
log_context = Boolean
false
6.2.23. log_errors
Log errors.
database, services
log_errors = Boolean
false
6.2.24. log_warnings
Log warnings.
database, services
log_warnings = Boolean
false
6.2.25. include_gds_codes
List of GDS codes of errors and warnings to include in trace.
database, services
include_gds_codes = [<error> [ ',' <error> ]... ] <error> ::= <gdscode> | <gdscode-symbol> <gdscode> ::= integer !! see column GDSCODE in SQLCODE and GDSCODE Error Codes and Descriptions !! !! This table only contains Firebird errors with a symbol !! <gdscode-symbol> ::= string !! see column Symbol in SQLCODE and GDSCODE Error Codes and Descriptions !!
Empty (include all errors and warnings)
If include_gds_codes is not set or set to empty, all errors and warnings — not excluded by exclude_gds_codes — are logged.
If include_gds_codes is non-empty, only errors or warnings that contain one of the specified GDS codes in their status vector will be logged.
# Include deadlock (335544336), req_sync (335544364), and 335544321 (arith_except) include_gds_codes = deadlock, req_sync, 335544321
6.2.26. exclude_gds_codes
List of GDS codes of errors and warnings to exclude from trace.
database, services
exclude_gds_codes = [<error> [ ',' <error> ]... ] <error> ::= <gdscode> | <gdscode-symbol> <gdscode> ::= integer !! see column GDSCODE in SQLCODE and GDSCODE Error Codes and Descriptions !! !! This table only contains Firebird errors with a symbol !! <gdscode-symbol> ::= string !! see column Symbol in SQLCODE and GDSCODE Error Codes and Descriptions !!
Empty (do not exclude any error or warning)
If exclude_gds_codes is not set or set to empty, no errors or warnings are excluded — though include_gds_codes can apply its own restrictions.
If exclude_gds_codes is non-empty, any error or warning that contains one of the specified GDS codes in their status vector will not be logged.
# Exclude deadlock (335544336), req_sync (335544364), and 335544321 (arith_except) exclude_gds_codes = deadlock, req_sync, 335544321
6.2.27. log_initfini
Log trace session init (start) and finish.
database, services
log_initfini = Boolean
false
6.2.29. print_plan
Print access path (plan) with SQL statement.
database
print_plan = Boolean
false
The type of plan — legacy or explained — can be controlled with explain_plan.
6.2.30. explain_plan
Print legacy plan (false) or explained plan (true).
database
explain_plan = Boolean
false (legacy plan)
This setting only has effect when print_plan is enabled.
6.2.31. print_perf
Print detailed performance info when applicable.
database
print_perf = Boolean
false
6.2.32. log_blr_requests
Log BLR (Binary Language Representation) compilation and execution.
database
log_blr_requests = Boolean
false
6.2.33. print_blr
Print BLR (Binary Language Representation) requests.
database
print_blr = Boolean
false
6.2.34. log_dyn_requests
Log dyn compilation and execution.
database
log_dyn_requests = Boolean
false
6.2.35. print_dyn
Print dyn requests.
database
print_dyn = Boolean
false
6.2.36. time_threshold
Only logs XXX_finish events if their timing exceeds the threshold.
database
time_threshold = integer
Millisecond
100 (100 milliseconds)
6.2.37. max_sql_length
Maximum length of SQL strings in a log record.
database
max_sql_length = integer
Byte
300
Beware when adjusting max_XXX parameters!
The maximum length of a log record for one event should not exceed 64KiB.
6.2.38. max_blr_length
Maximum length of BLR (Binary Language Representation) in a log record.
database
max_blr_length = integer
Byte
500
Beware when adjusting max_XXX parameters!
The maximum length of a log record for one event should not exceed 64KiB.
6.2.39. max_dyn_length
Maximum length of dyn in a log record.
database
max_dyn_length = integer
Byte
500
Beware when adjusting max_XXX parameters!
The maximum length of a log record for one event should not exceed 64KiB.
6.2.40. max_arg_length
Maximum length of an individual string argument in a log record.
database
max_arg_length = integer
Byte
80
Beware when adjusting max_XXX parameters!
The maximum length of a log record for one event should not exceed 64KiB.
6.2.41. max_arg_count
Maximum number of query arguments in a log record.
database
max_arg_count = integer
Argument (parameter)
30
Beware when adjusting max_XXX parameters!
The maximum length of a log record for one event should not exceed 64KiB.
7. Environment variables
Firebird supports a number of environment variables to configure Firebird server and/or fbclient.
7.1. Standard environment variables
The following are the environment variables Firebird supports in normal builds. This documentation does not cover environment variables for debug builds.
7.1.1. EDITOR
Default text editor for isql.
Client
On Linux and other non-Windows OSes, EDITOR is only used if VISUAL is not set.
VISUAL nor EDITOR is set:| Windows |
|
| Linux and other OSes |
|
This is not a Firebird-specific environment variable, but a common convention for applications.
7.1.2. FB_EXPECTED_DB
Default value of the “expected database” for Services Manager connections for use of a non-default security database.
Client
The value of this environment variable is a database alias or path.
It is used — client-side — to set the value of SPB item isc_spb_expected_db if it was not explicitly set.
When establishing a Services Manager connection, the server looks up the databases.conf entry of the “expected database”, and uses its value of SecurityDatabase as the security database.
If there is no databases.conf entry, or the entry has no value for SecurityDatabase, the value from firebird.conf is used.
7.1.3. FIREBIRD
Overrides the Firebird root directory.
Client, Server/Embedded
The Firebird root directory determines where the server or client reads other configuration (e.g. firebird.conf) from.
It also serves as the default location for firebird.msg[9], if not overridden by FIREBIRD_MSG or ISC_MSGS
In general, this should only be set or changed to configure clients and embedded instances, not servers. An incorrect root directory for the server may result in the server using incorrect configuration, or not being able to load required plugins and other components.
7.1.4. FIREBIRD_LOCK
Overrides the location of the Firebird lock files and other shared memory files.
Server/Embedded
The value must be set to an absolute path on the physical filesystem of the host. The user running Firebird (or its embedded engine) needs to have sufficient privileges to create and delete files and subdirectories.
If there are multiple processes and/or different OS users accessing the same database files, they all need to use the same lock directory, and they all need sufficient privileges to this lock directory.
On Linux, this is generally achieved by giving the permissions to the firebird group and adding the users to this group.
|
Incorrect use of FIREBIRD_LOCK can result in database corruption or other forms of data loss.
Database corruption can happen when multiple processes and/or multiple OS users open the same database with different lock directories. When using different lock directories, these processes cannot coordinate their access. When in doubt, do not set this and use the server defaults. This risk exists primarily when using Classic or SuperClassic (see also |
The default lock directory is:
- Windows
-
Subdirectory
firebirdin the common appdata directory (CSIDL_COMMON_APPDATA) — for exampleC:\ProgramData\firebird— with a fallback to the Firebird root directory[10]. - Android
-
/data/local/tmp/firebird. - macOS
-
/tmp/firebirdof or — if sandboxed — subdirectoryfirebirdof the temporary directory of the current user. - Linux and other OSes
-
/tmp/firebird
7.1.5. FIREBIRD_MSG
Location of Firebird message files.
Client, Server/Embedded
This setting is primarily a client-side setting, but may get used by the server if it formats and prints messages itself.
-
File specified by
ISC_MSGS -
Locale-specific file with relative path
intl/locale.msgin the Firebird message directory (see The Firebird message directory)The value of locale is derived from the first 10 characters of the last segment of environment variable
LC_MESSAGES(after the last/, or otherwise after the last\, otherwise the entire value) -
File
firebird.msgin the Firebird message directory (see The Firebird message directory)
-
The directory specified by environment variable
FIREBIRD_MSG, or -
the default Firebird message directory (if
FB_MSGDIRwas defined in the build configuration), or -
the Firebird root directory (see
FIREBIRD).
7.1.6. FIREBIRD_TMP
Default location for temporary files.
Server/Embedded
The directory specified in the FIREBIRD_TMP environment variables is used as the default location for temporary files.
The values of configuration items TempDirectories and TempTableDirectory take precedence.
The specified directory must exist. The user of the Firebird process — or the process running embedded — must have sufficient privileges to create, write, and delete files and directories in that directory.
If FIREBIRD_TMP is not specified, Firebird will fall back as follows:
-
TMP(environment variable) -
Use
/data/local/tmp
-
TMP(environment variable) -
Use
/tmpor — if sandboxed — the temporary directory of the current user
-
TMP(environment variable) -
Use
/tmp
-
Result of
GetTempPathAccording to the Microsoft documentation, this determines its location on the first path found in:
-
TMP(environment variable) -
TEMP(environment variable) -
USERPROFILE(environment variable) -
The Windows directory
-
-
Use
C:\temp\[11]
7.1.7. ICU_TIMEZONE_FILES_DIR
Override location of ICU timezone data files.
Server/Embedded, Client
Most Firebird builds will look for the ICU timezone data files in directory tzdata in the Firebird root directory (on Android, in the root directory itself).
Builds can have overridden this default location with the FB_TZDATADIR define in their build configuration.
If for some reason you need to use an alternative location for these files, you can configure this with environment variable ICU_TIMEZONE_FILES_DIR.
In general, updating the timezone database should be done by replacing the *.res files in this tzdata directory.
For more information, see Updating the Time Zone Database in the Firebird 5.0 Language Reference.
7.1.8. ISC_INET_SERVER_HOME
Sets the current working directory of the server (non-Windows only).
Server
|
Use of ISC_INET_SERVER_HOME is not recommended
The exact use case of this environment variable is unclear. It may affect how some relative paths are resolved. We recommend not to set it. The Firebird sources (
— David Schnepper
remote/inet.cpp The Firebird Book (Second Edition) by Helen Borrie says about this environment variable:
— Helen Borrie
The Firebird Book (Second Edition) We can’t corroborate that this is for Classic only, but it will reset the current working directory on each connection received by the server, which seems odd to say the least. |
7.1.9. ISC_MSGS
Path of the Firebird message file.
Client, Server/Embedded
This setting is primarily a client-side setting, but may get used by the server if it formats and prints messages itself.
The ISC_MSGS — if set — must point to a Firebird message file, not to a directory.
For details on resolution of Firebird message files, see How Firebird resolves a message file in FIREBIRD_MSG.
7.1.10. ISC_PASSWORD
Default password for a connection.
Client
The value of ISC_PASSWORD is used by fbclient as the default value for isc_dpb_password and isc_spb_password when no explicit password was set and isc_dpb_trusted_auth/isc_spb_trusted_auth is not included.
7.1.11. ISC_PATH
Path for resolving databases with a filename without a path component.
Server/Embedded
Firebird will resolve filenames without a path component in the directory specified by ISC_PATH.
This is done only when the name did not match an alias.
To determine if a file has a path component, Firebird checks if a file contains a :, / or \.
If ISC_PATH is not set, and DatabaseAccess is set to Restrict, filenames without a path component are resolved against its list of directories.
7.1.12. ISC_USER
Default user for a connection.
Client
The value of ISC_USER is used by fbclient as the default value for isc_dpb_user_name and isc_spb_user_name when no explicit username was set and isc_dpb_trusted_auth/isc_spb_trusted_auth is not included.
7.1.13. VISUAL
Default text editor for isql (non-Windows OSes only).
Client
If VISUAL is not set, the value of EDITOR is checked before using the default.
The environment variable VISUAL is ignored on Windows.
VISUAL nor EDITOR is set:| Windows |
|
| Linux and other OSes |
|
This is not a Firebird-specific environment variable, but a common convention for applications.
Appendices
Appendix A: License notice
The contents of this Documentation are subject to the Public Documentation License Version 1.0 (the “License”); you may only use this Documentation if you comply with the terms of this License. Copies of the License are available at https://firebirdsql.org/pdfmanual/pdl.pdf (PDF) and https://firebirdsql.org/manual/pdl.html (HTML).
The Original Documentation is titled Firebird Configuration Reference.
The Initial Writer of the Original Documentation is: Mark Rotteveel.
Copyright © 2023-2025. All Rights Reserved. Initial Writer contact: mrotteveel at users dot sourceforge dot net.
Appendix B: Document History
The exact file history is recorded in our git repository; see https://github.com/FirebirdSQL/firebird-documentation
| Revision History | |||
|---|---|---|---|
0.7 |
23-Dec-2025 |
MR |
Initial revision for Firebird Configuration Reference covering |
