Quote:
Originally posted by alfer
HI
I have Samba on Linux with Pervasive. I have problems with quite small (from one record files to 150 records).
Sometimes I want to replace such a file on Samba. I simply overwrite an existing database file with a new one. I expect, that my application will see the new contents of a file (table). But applications use the old contents.
It looks like Pervasive uses its own cache, where such small tables are holded. Changing a file on disk, does not influence this cache. Applications, requiering access to this table, receive the old contens from the cache.
Am I right? How to disable this mechanism? My client needs to send database files from other cities via internet. Replacing files on other platforms (Novell) has always worked for me.
Thanks in advance
Rafal
|
Do you have a window of time (during the night) where you could just update the table files nightly? Then you could have a batch job stop the pervasive services (or daemons in linux?), copy in the new files, then start up the DBMS. This is what we do nightly and it works great if you don't mind restarting your DBMS every day.
Instead of stopping/starting the DBMS, you could also write a script that attempts to rename the working file, if that fails then it is open. Once the rename is successful, rename the new file to what the working file was.
OR you could clear out the table and then use butil -copy to load in the new data whenever you need to put new data in.