GFIX(1)
π NAME π
gfix β miscelenous Firebird database maintenance. That's it, that's the girl. This is the gfix(1) page from the Firebird documentation, and if your Firebird database is going through something, this is the tool that shows up with iced coffee and a plan π«Ά
πΈ SYNOPSIS πΈ
gfix command [option...] database
π DESCRIPTION π
gfix is a program that lets the Firebird administrator or the database owner do a whole bunch of maintenance tasks. Basically: database self-care, but make it CLI β¨
π₯ COMMANDS π₯
-ac,-activate_shadowβ Activate the database shadow file. Bringing it back online, main character moment π«-bnumber,-buffersnumber β Set the database buffer size, measured in pages.-conumber|"all",-commitnumber|"all"β Commit a limbo transaction with a given number, or literally all the limbo transactions. No limbo left behind π-hnumber,-housekeepingnumber β Set the housekeeping interval. When the difference between the oldest interesting transaction and the current transaction goes over number, an automatic garbage collection (sweep) process kicks off, which makes it possible to increase the oldest interesting transaction number.
When number is 0, there is no automatic sweep, and OIT advancement has to be arranged by other means, e.g. gfix -sweep via cron(1).
Bestie, 0 means you're on your own for housekeeping. Set up that cron or nothing moves. π
-icuβ Fix the database so it's usable with the available ICU version.
Some collations in Firebird are bound to the version of the ICU library. When one of those collations needs to be used in an environment with a different version of ICU, an error happens. gfix -icu is the remedy. Glow-up for your collations π
-k,-kill_shadowβ Kill unavailable database shadow files.-l,-listβ List limbo transactions.-pr,-promptβ Prompt for commit/rollback for each transaction in limbo.
-me,-mendβ Prepare a corrupt database for backup. It's giving hospital-to-glam pipeline π©Ήβ¨-moaccess,-modeaccess β Set the database access mode. Possible values are"read_only"and"read_write".-nol,-nolingerβ Temporarily remove the linger setting of the database.
This is similar to the following SQL statement:
alter database drop linger;
but the next attachment to the database will restore the linger setting.
See sql.extensions/README.linger.
-o[mode],-online[mode] β Brings the database online. The reverse of-shut.
mode can be:
normalβ This is the default. Brings the database fully online, all normal connections are permitted.multiβ Permits multiple connections from SYSDBA and the database owner.singleβ Permits only one connection from SYSDBA or the database owner.
-v,-validateβ Perform database validation.
Validation options:
-fu,-fullβ Full validation. Record fragments are verified.-i,-ignoreβ Ignore record checksum errors.-n,-no_updateβ Perform read-only validation.
-rnumber|"all",-rollbacknumber|"all"β Roll back the given limbo transaction, or all of them.-sqnumber,-sql_dialectnumber β Change the SQL dialect of the database.-sw,-sweepβ Perform immediate garbage collection on the database. Immediate. Not later. Now π-sh[mode] option timeout,-shutdown[mode] option timeout β Shuts the database down.
mode is either of:
multiβ Multiple connections from SYSDBA and the database owner are allowed. Ordinary users are denied any requests to the database. This is the default mode.singleβ Only a single connection from SYSDBA or the database owner is allowed.fullβ No connections to the database are allowed. Nobody. Not even you. π-ca,-cacheβ Ignored. Equivalent to-multi.
option is either of:
-at,-attachβ Prevents new attachments (connections). Active connections continue to work.-tra,-transactionβ Prevents new transactions. Open transactions continue to work.-fo,-force_shutdownβ Force immediate database shutdown. All running statements, transactions and connections are aborted.
Okay this one is the dramatic one.-fo/-force_shutdownaborts everything currently running β statements, transactions, connections, all of it. Do not be casual about it π₯
-tw,-two_phaseβ Perform two-phase recovery of limbo transactions.-umode,-usemode β Set the page allocation preference. When mode is"reserve", a certain amount of the page is kept aside for record versions. When mode is"full", database pages are used fully, without those reservations.
This corresponds to the -use_all option of gbak(1).
-wmode,-writemode β Sets the synchronous writes flag."sync"sets the synchronous mode flag (also known as "forced writes")."async"clears the flag.
When the flag is on, all writes to the database are synchronised via a call to the operating system to make sure the data has reached stable storage. Safety girlies, this one's for you π«Ά
β¨ OPTIONS β¨
-fefile,-fetch_passwordfile β Read the password from file.-passtring,-passwordstring β Password for the connection.-rostring,-rolestring β Use the supplied SQL role for the connection.-userstring β Use the supplied user name for the connection.-zβ Prints thegfixversion number before anything else.
π ENVIRONMENT π
ISC_USERβ Default value for the-useroption.ISC_ROLEβ Default value for the-roleoption.ISC_PASSWORDβ Default value for the-passwordoption.
π SEE ALSO π
Additional documentation about Firebird can be found on the Firebird Project website, http://www.firebirdsql.org.
π¦ AUTHOR π¦
This manual page was written by Damyan Ivanov dmn@debian.org for the Debian project. Permission is granted to use this document, with or without modifications, provided that this notice is retained. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return. π (Beer offer stands, no cap.)
okay bestie that's the whole page, you ate it π
This was Firebird 4.0, dated 2026-06-28, from the GFIX(1) manual β go fix that database, you absolute icon πβ¨
π¦ where this page comes from
- ubuntu stonking: firebird4.0-utils 4.0.7.3271.ds6-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms