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 πŸ’«
  • -b number, -buffers number β€” Set the database buffer size, measured in pages.
  • -co number|"all", -commit number|"all" β€” Commit a limbo transaction with a given number, or literally all the limbo transactions. No limbo left behind πŸ’ƒ
  • -h number, -housekeeping number β€” 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 🩹✨
  • -mo access, -mode access β€” 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.
  • -r number|"all", -rollback number|"all" β€” Roll back the given limbo transaction, or all of them.
  • -sq number, -sql_dialect number β€” 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_shutdown aborts 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.
  • -u mode, -use mode β€” 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).

  • -w mode, -write mode β€” 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 ✨

  • -fe file, -fetch_password file β€” Read the password from file.
  • -pas string, -password string β€” Password for the connection.
  • -ro string, -role string β€” Use the supplied SQL role for the connection.
  • -user string β€” Use the supplied user name for the connection.
  • -z β€” Prints the gfix version number before anything else.

🌈 ENVIRONMENT 🌈

  • ISC_USER β€” Default value for the -user option.
  • ISC_ROLE β€” Default value for the -role option.
  • ISC_PASSWORD β€” Default value for the -password option.

πŸ’œ 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