Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2004
    Posts
    3

    Lightbulb Unanswered: Pervasive caches too mach!?

    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

  2. #2
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    Closing the files before you copy them should address this problem. Any time a file is open, it is likely to have incorrect data if you try to copy it over the open file.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  3. #3
    Join Date
    Feb 2004
    Posts
    78

    Re: Pervasive caches too mach!?

    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.

  4. #4
    Join Date
    Jan 2004
    Posts
    3
    Yes. I do so. But on Novell I can simply copy a new file and I don't have any problems. This problem is Linux specific.

    As I have tested it is possible :
    1-delete the file
    2-copy a new one file
    3-Pervasive notices that this file is new and works ok

    Thanks for answers

  5. #5
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    Pervasive on Linux and NetWare (and Windows) share a common code base. I would expect the engines to act very similarly. JUst out of curiosity, are the NetWare and Linux boxes running the same version of the Pervasive Engine? I know that that Pervasive had to change some of it's memory techniques on NetWare because of the TurboCache and false corruption of files but I don't think it would have the effect you are seeing. If the file is closed when it's deleted and recreated, it should work.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  6. #6
    Join Date
    Jan 2004
    Posts
    3
    Yes Pervasive 2000i

    As I said - I have this problem only on: Linux+Samba+Pervasive
    Maybe Pervasive uses functions that relay on Samba, and the error (or bad documented function) is in Samba.
    I'm sure that some important functions differ on Novell and Linux. I don't trust Pervasive, that everything acts in the same way.

  7. #7
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    Having worked extensively with Pervasive for 8+ years, I've seen a lot of Pervasive behavior. FOr the most part, if a problem exists in one platform, it exists in all platforms.

    Have you tried Pervasive.SQL V8? Does it behave the same way? Pervasive 2000i is going unsupported soon and isn't even being fixed if bugs are reported to Pervasive.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •