Subject Re: [firebird-support] File is in use error in Firebird 2.0.1 SS in Windows Vista HB
Author Helen Borrie
At 04:21 AM 26/10/2007, you wrote:
>Hello.
>
>I have installed a Firebird 2.0.1 SuperServer in Windows Vista (Home
>Basic), and I have problems in concurrent access.
>
>I can connect to a database only from one computer at a time. If I
>connect to a database from one computer, then I can open as many
>connections there as I want, but when I try to open a new connection
>from another computer I get this error : I/O Error for file
>".....\Database.fdb", Error while trying to open file, El proceso no
>tiene acceso al archivo porque esta siendo utilizado por otro proceso
>(File is in use by another process).

With Superserver, this means that your users are not connecting correctly. SS is protected from incorrect connection strings by taking a read-write lock on the file as soon as the first user is connected.

Do NOT let users use a mapped path to this file. It must be ONLY the server-local hard path. Do not share the directory. And make sure that every user connects using exacting the same connection string which, supposing the server-local file path is c:\databases\database.fdb should be:

hostname:c:\databases\database.fdb

-- including ALL of the backslashes.

With the wrong paths, without the file lock, your users would corrupt the database.

>If I close all connections from
>first computer, then I can open with no problems connections to
>database in second computer (but after that, every time I try to
>connect to database in first computer, I will get the File is in use
>Error).
>
>Both computers connects trough TCP/IP.
>
>I have removed Firebird 2.0.1 and installed Firebird 2.0.3 Superserver
>with the same problem. Then I have removed it and installed Firebird
>2.0.3 Classic Server. Now it runs like a charm. But what was the
>problem ?.

Because Classic creates one process for each connection, there is no exclusive file lock on the database file. However, this does NOT remove the problem of corruption through connections being made with wrong connection path strings. It must be fixed before you go any further.

If you don't understand what I'm saying about connection path strings, then study the Quick Start Guide carefully.

>If possible, I prefers 2.0.1 SuperServer, because I don't want to have differents versions and flavours in my costumers.

Use V. 2.0.3. If you are not convinced, study the bug-fix list in the v.2.0.3 release notes.

./heLen