DotNetFirebird.org DotNetFirebird
Using Firebird SQL in .NET.
Sunday, January 09, 2005

XCOPY Data Deployment

One of the cool Firebird features is that the database can be deployed just by copying the database file (although you can have a database in multiple files, by default it is in a single one). This works not only with the embedded Firebird, but also with the server.

The convention is that the database files have .fdb extenstion but you can use any filename you want. You are probably not going to change that but it's nice to have the possibility.

Comments:

Just make darn sure that the database server is not running (against the database file in question) if you copy the .fdb file... this is a sure way to database corruption.
Yes, before you copy the .fdb file. Shutdown your Firebird server first or make sure nobody connect to the .fdb database. Otherwise ... the database maybe currupt.
OK, i'm the third in row but this needs warning:

You really really need to shut donw the _server_ before copying a database. I've seen many programmers (and application managers and sysadmins) mistake that for shutting down the application. Even if you're sure that all clients are down it still not OK. FireBird may still be doing some interanl housekeeping (sweeping) and it's not a good idea to interrupt that ...
Is there a programatic way to test if any servers may be accessing the database?

Is there also any such way to programatically suspend such activity to enable the database file to be copied?
Blog comments are closed.



Previous

Archives