Subject Strange (to me) Alias/Database file behaviour
Author reg_hill_labs

I have come across a strange situation, which I haven't seen before.
Might be due to my lack of understanding of Linux or Aliases?

The situation occurred as follows:

Running FB SS 1.5.3 on Suse 9.2.
Have DatabaseAccess = None and have two Aliases setup, say DBLive and
DBTest, pointing to say, /someplace/DBLive.fdb live and
/someplace/DBTest.fdb file.

I intended to replace the test file with the latest live.

I shutdown the test db, renamed it (DBTest2.fdb), backed up the live
DB and attempted to restore it to the old dbs location and filename.
This caused an error message saying the file existed and to use 'C' to
create or overwrite the DB (or some such error).

I checked and the file did not exist (as I had renamed it). I moved
DBTest2.fdb, deleted it to the trash, still no go, finally gave up,
and named the db to restore to something else (say DBTest3.fdb)… It

The file system then let me rename DBTest3.fdb to DBTest.fdb… what was
Firebird talking about I wondered?

I then looked at some data in my new DBTest.fdb, and hello, it did not
contain the data from 'DBLive.fdb' as I expected, but was in fact data
from the old 'DBTest.fdb'… the one that I had renamed, moved and then
deleted, and that the alias did NOT point to.

I then restored from the trash and 'shift-deleted' the file… still, I
could access this deleted file, I could read and write data to it…
don't know where it was writing to, as I had physically deleted the file.

While accessing it, I renamed 'DBTest.fdb' and it let me, so for some
reason the database server was accessing another db file somewhere (no
idea where, remember, the alias is pointing to the correct file).

I then kicked everyone off the other databases in use, shut down the
server and restarted it, and finally the server was reading the
correct file.

I then tried renaming that file, thinking the system would say, hay,
it is in use, you can't do that, but it didn't… it let me rename it…

I am now confused… is this something to do with Linux, Windows does
not seem to have the same behaviour, it locks the file...

Sorry for the long description… any info appreciated.