SecurityGateway uses a database management system called Firebird to store configuration settings and most data. Under certain circumstances, you may be advised by support to check your SecurityGateway database file for corruption. This may occur if you have problems backing up the database, if SecurityGateway is experiencing crashing issues, or if errors are being written to the logs that indicate corruption. In order to check for and possibly fix corruption in your SecurityGateway database, you can use a Firebird utility called gfix, which is included in the SecurityGateway installation.
If you have a good backup of the SecurityGateway database, we would recommend restoring the database from that backup, as the process below can result in losing data that is corrupted. If restoring from a backup is not possible however, attempting to fix the database using gfix is an option. To determine if corruption has occurred:
- Stop the SecurityGateway service
- Make a manual backup of the SecurityGateway database file - securitygateway.fbd, located by default in the C:\Program Files\ALT-N Technologies\SecurityGateway\appdirectory.
- Stop the SecurityGateway service
- Copy the securitygateway.fbd file to another location through Windows Explorer
- Open a command prompt
- Click Start
- Click Run
- Type 'cmd'
- Press Enter
- Change to the SecurityGateway directory
- Type 'cd C:\Program Files\ALT-N Technologies\SecurityGateway\app'(or the correct path for your environment, if you've installed to a different location)
- Press Enter
- Type 'gfix -user SYSDBA -password masterkey -validate -full -no_update securitygateway.fbd'
- Press Enter
If the command returns no output, then the database structures are good. If you receive errors however, you will need to repair the database. To repair the database, follow these steps:
- If you have not yet done so, make a backup of the file securitygateway.fbd
- Return to the command prompt window and the C:\Program Files\ALT-N Technologies\SecurityGateway\app directory
- Type'gfix -user SYSDBA -password masterkey -mend -full -ignore securitygateway.fbd'
- Press Enter
At this point, corrupted data records will be flagged. In order to remove this flagged data, create a full database backup, and import it back. To do, you will need to start the SecurityGateway service and follow the steps in article KBA-01874 below. Next, you will need to restore the backup following article KBA-01980 below. This means that the flagged data will be lost.
Additional Comments
For more information on the gfix tool and its various switches, please see the Database Validation and Recovery topic in the Firebird documentation website.
Related Articles