How to corrupt a database
The following sections constitute a summary of things not to do if you want to keep your Firebird databases in good health.
Server configuration and management
The following sections constitute a summary of things not to do if you want to keep your Firebird databases in good health.
Firebird is installed with forced writes (synchronous writes) enabled by default.Modifications are written to disk immediately upon posting.
It is possible to configure a database to use asynchronous data writes — whereby modified or new data are held in the memory cache for periodic flushing to disk by the operating system’s I/O subsystem.The common term for this configuration is forced writes off (or disabled).It is sometimes resorted to in an attempt to improve performance during large batch operations.
The big warning here is: do not disable forced writes on a Windows server.It has been observed that the Windows server platforms do not flush the write cache until the Firebird service is shut down.Apart from power interruptions, there is just too much that can go wrong on a Windows server.If it should hang, the I/O system goes out of reach and your users' work will be lost in the process of rebooting.
Linux servers are safer for running an operation with forced writes disabled temporarily.Still, do not leave it disabled once your large batch task is completed, unless you have a very robust fall-back power system.