Subject Re: File is in use error in Firebird 2.0.1 SS in Windows Vista HB
Author Adam
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 05:24 AM 27/10/2007, you wrote:
> >Thank you Helen, as you say the connection strings are not exactly the
> >same.
> >
> >In non-English Windows Vista Microsoft has changed the rules for
> >naming program files path. In older versions there always was
> >"C:\Archivos de Programa", nows it is "C:\Program Files", leaving a
> >kind of symlink for "C:\Archivos de Programa".
> >
> >I was having two different connection strings to access the same
> >database :
> >
> >computer 1 -> "192.168.0.4:C:\Program Files\Almacen\Database\DDBB.fdb"
> >computer 2 -> "192.168.0.4:C:\Archivos de
> >Programa\Almacen\Database\DDBB.fdb"
> >
> >Both connection strings seems valids local paths, so do you still
> >think there is a risk of corruption here ?. I must choose one ?
>
> YES!! These little hidden Windows tricks with paths cause the
condition that the Firebird server regards itself as two (or more)
distinct servers. When more than one server controls the resources
for a single database, corruption occurs.
>
> To protect databases under Superserver (which threads client
connections) the server takes a read-write lock when the database is
opened, i.e., when the first attachment is made. The path used by
that first connection then becomes the only valid path for any
connection.
>
> Classic server (which creates a separate process for each
connection) cannot be protected this way, since each process opens the
database on its own account.
>
> -- Decide **one and only one path** that is to be used always, and
create an alias for it in aliases.conf.
> -- Then, use ONLY the database alias in your connection strings for
all applications (including utility programs).
> -- Always be certain that the path that is used is a "hard" path as
seen by the host machine (no share names or mapped drives) and is in a
directory that is not shared.

Helen,

Could Classic Server not be enhanced to recognise whether a path was
symlinked and use the true path to the server. It seems that the
problem here is that Windows Vista (finally) introduced what *nix file
systems have had for years (ln).

I agree that aliases are preferable regardless.

Adam