gfix Command-line Tool
Go Up to Database Configuration and Maintenance
The gfix
tool performs a number of maintenance activities on a database, including the following:
- Database shutdown
- Changing database mode to read-only or read-write
- Changing the dialect of a database
- Setting cache size at the database level
- Committing limbo transactions
- Mending databases and making minor data repairs
- Sweeping databases
- Displaying, committing, or recovering limbo transactions
To run gfix
, you must attach as either SYSDBA
or the owner of the database. Most of these actions can also be performed through IBConsole.
gfix [options] db_name
Options: In the OPTION
column of the following table, only the characters outside the brackets ([ ]) are required. You can specify additional characters up to and including the full option name. To help identify options that perform similar functions, the TASK
column indicates the type of activity associated with an option.
Option | Task | Description |
---|---|---|
|
Activate shadows |
Activate shadows when the database dies. NOTE: syntax is gfix -ac (no database name). |
|
Shutdown |
Used with - |
|
Cache buffers |
Sets default cache buffers for the database to <n> pages. |
|
Transaction recovery |
Commits limbo transaction specified by |
|
Shutdown |
Used with - |
|
Data repair |
Used with - |
|
Sweeping |
Changes automatic sweep threshold to <n> transactions.
|
|
Data repair |
Ignores checksum errors when validating or sweeping; InterBase supports true checksums only for ODS 8 and earlier. |
|
Drop shadows |
|
|
Transaction recovery |
Displays IDs of each limbo transaction and indicates what would occur if |
|
Data repair |
Marks corrupt records as unavailable, so they are skipped (for example, during a subsequent backup). |
|
Set access mode |
|
|
Data repair |
Used with - |
|
Shutdown |
Cancels a - |
|
Remote access |
Checks for password <text> before accessing a database. |
|
Transaction recovery |
Used with |
|
Transaction recovery |
Rolls back limbo transaction specified by |
|
Shutdown |
|
|
Database dialect |
Changes database dialect to <n>.
|
|
Sweeping |
Forces an immediate sweep of the database.
|
|
Shutdown |
Used with - |
|
Transaction recovery |
Performs automated two-phase recovery, either for a limbo transaction specified by |
|
Remote access |
Checks for user <name> before accessing a remote database. |
|
Data repair |
Locates and releases pages that are allocated but unassigned to any data structures; also reports corrupt structures. |
|
Database |
Database writes Enables or disables forced (synchronous) writes.
|
|
Shows version of |
Examples: The following example changes the dialect of the customer.ib
database to 3:
gfix -sql 3 customer.ib
The following example changes the customer.ib database to read-only mode:
gfix -mo read_only customer.ib