Using gfix - Firebird

The gfix utilities can be run only from the command line and you must be the database owner or SYSDBA to use the utilities. To run gfix, open a command shell and cd to the \bin directory beneath the Firebird root directory.

The syntax pattern for gfix commands is

gfix [options] db_name

db_name must be the full name of the primary file of the database on which you want the operations to be performed.

The primary file of a single-file database is the database file itself. For multiple-file databases, the primary file is first file in the set.

options are valid combinations of switches and, in some cases, arguments. They are listed later in Table. Abbreviations can be used for most option switches. Optional characters are shown in square brackets ([ ]).

Getting Database Access with gfix

If you are connecting to the server remotely, the user name and password of either the SYSDBA user or the database owner must be included among the switches you supply. The switches are

-pas[sword] <password> -u[ser] <name>

The following example of a gfix command sets Forced Writes. POSIX:

bin]$ ./gfix -w sync customer.fdb -pas heureuse -user SYSDBA


bin> gfix -w sync customer.fdb -pas heureuse -user SYSDBA

User and Password on a Local Connection

Before starting up the server in order to do extended work locally on a copy of a damaged database or on transaction recovery, you can add the two operating system variables ISC _USER and ISC _PASSWORD to avoid having to type the SYSDBA or owner user name and password in every command:

shell prompt> SET ISC_USER=SYSDBA shell prompt> SET ISC_PASSWORD=heureuse

For security reasons, you should remove these environment variables as soon as you finish your task. It is not recommended that you configure these variables beyond the scope of your current shell or make them permanent on the system.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Firebird Topics