Subject Re: [firebird-support] What is ForcedWrites default?
Author Martijn Tonies
Hello,

> If I deploy embedded firebird without options file, what will be then
> ForcedWrites value?

On new databases, on Windows, it's "on".

> My client used my program (written with delphi and dbexpress) with
> embedded FB (without conf file) on Win95 and database got corrupted
> (cheksum error on database page X, it's still possible to connect and
> select from some tables, but can't backup)
>
> What could have caused this? (My client admits having turned power
> off when the program hanged but I believe there was no db request in
> progress at that time; im not sure, though).

Hmmm - that's a pretty dumb thing to do :-)

>Actually, none of the
> methods described in FB getting started guide ("How to corrupt a
> database": modify medatata, disable forced writes (???), restore over
> a running db, log in during restore) were available to my client.

With "embedded", if your program hangs, how do you know if
the datapages are written to disk? Turning the power off is inviting
disaster to your home.

Then again, Win95 might be as well.

> I tried to "gfix -m database.fdb" but it did not help. Does it mean
> that it's not possible to recover database from this corruption? Is
> it possible to recover only the tables/rows that are not corrupted?
>
> What to do to avoid this kind of corruption? Any special setting or
> something?

First, verify that ForcedWrites is ON.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com