Subject Re: [firebird-support] file-system access to firebird database file denied
Author Helen Borrie
At 10:55 AM 12/01/2009, you wrote:
>does the firebird server in some way lock database files?

It sure does (Superserver). As soon as *any* client is connected to a database the server takes a write lock on it. That will hold until every last client is logged out *and* any running transactions complete.

>i need to move a fdb file to a new directory location using the
>windows explorer. however, i'm getting access denied errors (even for
>read only access), which i do not understand. according to the
>explorer my permissions are "full control". stopping the server does
>not make a difference.

Stopping the server would "make a difference" eventually, if you had no guardian service running; but you don't need to stop the server in order to move a database.

To clear the write lock, close all connections cleanly and wait until the write lock is lifted. That won't always happen immediately the last connection is closed: the engine may be busy for a while completing the work from uncompleted transactions; and/or a garbage collection might be in process.

A good way to determine whether the write lock is clear is to attempt to rename the database file. If it works, you know there is no lock and you're good to go with your move.