Subject Error executing SQL (was Re: Generator)
Author Adam
> Dear Alan
>  

Please do not hijack threads. Start a new message if you are not
answering a previous question. Also, new questions should be directed
at the entire group not a specific person, especially when the person
you are addressing is answering a question with not a shred of
similarity to yours.

> I am having an occational error in my fdb while executing sql saying
'gds internal error Software consistency check',
> 1. What does this error mean and why does it happens occassionaly

It means your database file is corrupt.

> 2. Is there any way we can correct the FDB so that this error does
not occur in future

It depends on how bad the corruption is. There would have been more
information in that error but you decided not to post it.

Firstly, take the database offline, shutdown the firebird service and
take a file copy of the database while the service is not running.
Store it somewhere in case one of the repair steps causes damage.

You can use gfix to attempt to repair the database.
Sometimes a backup with -g option, then restore of that backup is
enough. Other times you need to use a data pumping tool to copy what
is left, or engage a professional data recovery company.

You need to work out how the database became corrupt. The most likely
causes are:
* Other programs working with the database file directly (eg file
copying the fdb or virus scanners etc)
* Connecting to the database before during a restore (before it is
complete)
* Hardware

But first things first, see if gfix is enough.

Adam