in reply to Accessing BDB file fails on linux

One thing that may come into play might be architecture differences, if you're using SPARC-solaris and x86-Linux, as the machines differ in endianness and I'm not sure whether BDB handles that. If it doesn't work around, then you have to convert the file one time from the old machine to the new machine.

Replies are listed 'Best First'.
Re^2: Accessing BDB file fails on linux
by vsdeepthi (Initiate) on Feb 21, 2011 at 14:44 UTC
    Actually on both machines the file loads properly and I can see all the keys as well. But on Linux when I try to access value for few keys it returns undef.
    
    
    
      Are either of the processes writing to the database or are they both just reading the database from the SAN drive?

      I'm not that familiar with the Perl API, but what do you mean when you say "When I try to access value for few keys it returns undef."

      BTW: Although Berkeley DB is endian-neutral in terms of it's internal data structures, it makes no attempt to interpret the data payload. Managing endian-ness changes is the responsibility of the embedding application.

        Its only one program run on both Solaris and Linux. And all it does is reading the database file. I meant on Linux it does not return all the records. Though the count says it has loaded the entire file, I can only access few records from the data structure that is populated from this file.
        Its only one program run on both Solaris and Linux. And all it does is reading the database file.
        
        I meant on Linux it does not return all the records. Though the count says it has loaded the entire file, I can only access few records from the data structure that is populated from this file.