Subject Re: RES: [firebird-support] Copy of the current db not updating generators
Author Mark Rotteveel
On Thu, 31 May 2012 13:23:55 +0200, Kjell Rilbe <kjell.rilbe@...>
> Den 2012-05-31 13:19 skrev Mark Rotteveel såhär:
>> On Thu, 31 May 2012 08:09:33 -0300, "Fabiano" <fabianoaspro@...
>> <>>
>> wrote:
>> > Never copy the FDB file! You WILL corrupt both FDB and copy file!
>> Although I agree with your advice, in general copying the file can
>> corrupt
>> the target file, but it cannot corrupt not the source file. Usually for
>> copying a file the copy program will acquire a read lock, so nothing is
>> changed and the database process can continue writing to the file
>> being hindered by the copy process.
> But won't the copy program's read lock cause problems for FB trying to
> write to the file?

It shouldn't, for Classic Firebird doesn't open the file exclusively, so
other files reading it is perfectly allowed (readers don't block writers
here), not 100% sure for SuperServer, but then Firebird would already have
the lcok so you wouldn't be able to copy it at all (and otherwise Firebird
cannot obtain a lock so you will not be able to attach to the DB to make