Scroll to navigation

GFIX(1) Firebird documentation GFIX(1)

NAME

gfix -- miscelenous Firebird database maintenance

SYNOPSIS

gfix command [option...] database

DESCRIPTION

gfix is a program that allows the Firebird administrator or database owner to perform various maintenance tasks.

COMMANDS

Activate database shadow file.
Set database buffer size, in pages.
Commit a limbo transaction with a given number or all limbo transactions.
Set the housekeeping interval. When the difference between the oldest interesting transaction and the current transaction exceeds number, an automatic garbage collection (sweep) process is started to make possible increasing of the oldest interesting transaction number.

When number is 0, there is no automatic sweep and OIT advancement should be arranged by other means, e.g. gfix -sweep via cron(1).

Fix the database to be usable with the available ICU version.

Some collations in Firebird are bound the the version of the ICU library. When such a collation needs to be used in an environment with a different version of ICU, an error occurs. gfix -icu is the remedy.

Kill unavailable database shadow files.
List limbo transactions.
Prompt for commit/rollback for each transaction in limbo.
Prepare corrupt database for backup.
Set database access mode. Possibla values are "read_only" and "read_write".
Temporary remove linger setting of the database.

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.

Brings the database online. The reverse of -shut.

mode can be:

This is the default. Brings the database fully online, all normal connections are permitted.
Permits multiple connections from SYSDBA and the database owner.
Permins only one connection from SYSDBA or the database owner.
Perform database validation.

Validation options:

Full validation. Record fragments are verified.
Ignore record checksum errors.
Peform read-only validation.
Rollback given limbo transaction or all limbo transactions.
Change the SQL dialect of the database.
Perform immediate garbage collection on the database.
Shuts the database down. mode is either of
Multiple connections from SYSDBA and the database owner are allowed. Ordinary osers are denied any requests to the database. This is the default mode.
Only a single connection from SYSDBA or the database owner is allowed.
No connections to the database are allowed.
Ignored. Equivalent to -multi.

option is either of

Prevents new attachments (connections). Active connections continue to work.
Prevents new transactions. Open transactions continue to work.
Force immediate database shutdown. All running statements, transactions and connections are aborted.
Perform two-phase recovery of limbo transactions.
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 such reservarions.

Corresponds to the -use_all option of gbak(1).

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 ensure that the data has reached stable storage.

OPTIONS

Read password from file.
Password for the connection.
Use supplied SQL role for the connection.
Use supplied user name for the connection.
Prints the gfix version number before anything else.

ENVIRONMENT

Default value for the -user option.
Default value for the -role option.
Default value for the -password option.

SEE ALSO

fbstat(1).

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.

2024-03-05 Firebird 3.0