Subject Re: [firebird-support] How to test for forced writes?
Author Martijn Tonies
Hello Steffen,

>> > I only get this:
>> > Database header page information:
>> > ...
>> > Creation date Oct 8, 2010 9:58:08
>> > Attributes
>>
>> Attributes lists "forced writes" if forced writes is enabled.
>
> In an older mail to this list (2010-10-01 09:28) Norman Dunbar wrote:
>
>> Note, if gfix hasn't been used against this database, then the above
> command will not display "Attributes".

I don't know anything about this, which of course does not mean it's not
true.

> So does the absence of that line in the output say "gfix was not used, so
> no
> information" or does is say "forced writes is off" ?

Alternatively, you could write a small Delphi program that checks for this,
via several components you can check the flag.

> My problem: This database is part of one of our products and I need to be
> sure, it always works in forced writes mode.
> I always thought it would, but now I want to be sure.



> Your statement above indicated, we are wrong, but what now?
>
> Can we "simply" run " gfix -user sysdba -pass XYZ -write sync
> /path/to/database.fdb" ?
>
> What about backups? If they are restored, do we need to run that command
> again?

The "forced writes" flag is persistent across backup/restore cycles, as far
as I know,
but it should be easy to test.

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!