Subject Re: [firebird-support] Cannot backup because file is being used
Author Daniel Rail

At August 26, 2005, 11:18 AM, Raith, Daniel wrote:

> I'm using, super server, and when I try to perform a backup
> I'm getting an error:

> "Error while trying to open file"
> "The process cannot access the file because it is being used by another
> process."

You can't access the same database file, via 2 different pathnames.
In your case, your application references the file via the long
pathname, and you are trying to use GBAK with the short pathname,
which Firebird will recognize as 2 different databases. But, when
trying to access the second pathname, it will find out that it can't
because the file is in use by another application(which could be
itself). This is a safeguard against data corruption.

> Another funny thing about this setup is that the database is in a
> directory that has spaces in the name. Originally I couldn't get the
> backup to work because of it. For example: "c:\my
> data\program\data\database.fdb" which I had to create a backup batch
> file which read something like this.

> Gbak.exe -b "c:\mydata~1\program\data\database.fdb"
> "c:\mydata~1\program\data\database.fbk"

> Otherwise I kept getting an error about specifying multiple sources or
> something. Now I'm getting this other error.

> Any ideas?

I never had a problem with using the pathnames with spaces in them.

Do you have the same error when running GBAK directly from the
command-line, instead of from within a batch file?

Also, which version of Windows are you using?

Best regards,
Daniel Rail
Senior Software Developer
ACCRA Consultants Inc. (
ACCRA Med Software Inc. (