Reference

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

-ac
-activate_shadow

Activate database shadow file.

-b number
-buffers number

Set database buffer size, in pages.

-co number|"all"
-commit number|"all"

Commit a limbo transaction with a given number or all limbo transactions.

-h number
-housekeeping number

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).

-icu

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.

-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 corrupt database for backup.

-mo access
-mode access

Set database access mode. Possibla values are "read_only" and "read_write".

-nol
-nolinger

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.

-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

Permins 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

Peform read-only validation.

-r number|"all"
-rollback number|"all"

Rollback given limbo transaction or all limbo transactions.

-sq number
-sql_dialect number

Change the SQL dialect of the database.

-sw
-sweep

Perform immediate garbage collection on the database.

-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 osers 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.

-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.

-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 such reservarions.

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

OPTIONS

-fe file
-fetch_password file

Read password from file.

-pas string
-password string

Password for the connection.

-ro string
-role string

Use supplied SQL role for the connection.

-user string

Use 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

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 [email protected] 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.

History

-ac since Debian 9 (Stretch); -activate_shadow since Debian 9 (Stretch); -at since Debian 9 (Stretch); -attach since Debian 9 (Stretch); -b since Debian 9 (Stretch); -buffers since Debian 9 (Stretch); -ca since Debian 9 (Stretch); -cache since Debian 9 (Stretch); -co since Debian 9 (Stretch); -commit since Debian 9 (Stretch); -fe since Debian 9 (Stretch); -fetch_password since Debian 9 (Stretch); -fo since Debian 9 (Stretch); -force_shutdown since Debian 9 (Stretch); -fu since Debian 10 (Buster); -full since Debian 9 (Stretch); -h since Debian 9 (Stretch); -housekeeping since Debian 9 (Stretch); -i since Debian 9 (Stretch); -icu since Debian 9 (Stretch); -ignore since Debian 9 (Stretch); -k since Debian 9 (Stretch); -kill_shadow since Debian 9 (Stretch); -l since Debian 9 (Stretch); -list since Debian 9 (Stretch); -me since Debian 9 (Stretch); -mend since Debian 9 (Stretch); -mo since Debian 9 (Stretch); -mode since Debian 9 (Stretch); -n since Debian 9 (Stretch); -no_update since Debian 9 (Stretch); -nol since Debian 9 (Stretch); -nolinger since Debian 9 (Stretch); -o since Debian 9 (Stretch); -online since Debian 9 (Stretch); -pas since Debian 9 (Stretch); -password since Debian 9 (Stretch); -pr since Debian 9 (Stretch); -prompt since Debian 9 (Stretch); -r since Debian 9 (Stretch); -ro since Debian 9 (Stretch); -role since Debian 9 (Stretch); -rollback since Debian 9 (Stretch); -sq since Debian 9 (Stretch); -sql_dialect since Debian 9 (Stretch); -sw since Debian 9 (Stretch); -sweep since Debian 9 (Stretch); -tra since Debian 9 (Stretch); -transaction since Debian 9 (Stretch); -tw since Debian 9 (Stretch); -two_phase since Debian 9 (Stretch); -u since Debian 9 (Stretch); -use since Debian 9 (Stretch); -user since Debian 9 (Stretch); -v since Debian 9 (Stretch); -validate since Debian 9 (Stretch); -w since Debian 9 (Stretch); -write since Debian 9 (Stretch); -z since Debian 9 (Stretch).

-f until Debian 9 (Stretch).