Subject Re: [firebird-support] Validating a database
Author Ann W. Harrison
Fabiano Bonin wrote:
> Is there some way to validate a database while there are users connect to it?
>
> -> FB 2.0.1 CS Linux
> [root@server1 firebird]# gfix -v -full replication.fdb
> lock time-out on wait transaction
> -bad parameters on attach or create database
> -secondary server attachments cannot validate databases
>

The error message isn't completely obvious. Validation is actually
an option on the attach database call. gfix is a simple front end to
specialized engine functions. The final line is trying to say that
validation is a standalone activity.

Validation is a physical check of the consistency of pointers within
the database. It can't be done while other actions continue to
change those pointers. For example, it checks to see that pages
that are used in a table aren't on the free page list. If the
page is released between the time the validation finds it in the
table and the time it checks the free list, the validation
reports a spurious error.

An alternative is to run a gbak, which does a logical validation
of data pages and the structures that control access to data
pages. Gbak does not check user defined indexes, except during
garbage collection, so it's not a reliable check of index
structures.


Regards,


Ann