Subject Re: [firebird-support] the way Firebird writes records to disk
Author Christian Gütter
Hi Brad,

> What is the best way to get Forced Writes activated?

The tool for activating it is gfix:

gfix -w sync /path/to/database/db.fdb -user blubb -password blah
gfix -w async /path/to/database/db.fdb -user blubb -password blah

-sync = FW on
-async = FW off

> Can you set it by
> database when you create the database?

AFAIK you can't.
My Firebird server (1.03) automatically creates
databases with forced writes on.

> Do you set it by connection when
> connecting to a database?

FW is a database setting, you cannot have two connections
for the some database and the one has FW turned off and
the other FW turned on.

AFAIK, IBO has a Forced Writes setting in its connection
component, so it must be possible to toggle forced writes
when connecting to a database. Anyway, I have never used
it. And I wonder wether one must have exclusive database
access to do this.

But all this does IMHO not matter - using FW is a decision
you have to make once and then you normally leave it as it
is and don't toggle it every two hours.

> Can I do it in my own code without calling out to
> an external program?

IMHO this is possible using the services manager. IBX can
do this and there are some other Delphi implementations
for accessing FB's service manager.


HTH,
Christian