3 Replies Latest reply: Feb 21, 2014 4:24 PM by userBDBDMS-Oracle RSS

    cross platform issue with journals

    user12622756

      Hello.

       

      We are using BDB 5..1.25.  We observed that the journals cause issues when a database is accessed or attempted to be accessed across different platforms.

      For instance, if I create and access a new Berkeley db from Linux (x86_64), I see journals created along with the database file.  If I do not remove journals, I see

      issues when accessing the database file from a different platform like Solaris-Sparc.  My access is through sqlite3  (3.7.0.1).

       

      Primarily, my questions are:

       

      1. Is there a fix for that or is this how things are setup to work. That is no support for multiple access to db from maybe couple users at once.

      2. If that is the way how the system is setup to work, what is the high level mechanism is dealing with mentioned scenario?

      I assume removing journals are not recommended for that could interfere in case someone else is writing to same db.

       

      In terms of the error I get, here is the text when db is created and accessed from Solaris-Sparc, and then attempted to be read from x86_64 (linux). Note that journals are not removed.

       

      cad_env.20131029_scalx1:1:205 >  sqlite3 my.db

      Berkeley DB 11g Release 2, library version 11.2.5.1.25: (January 28, 2011)

      Enter ".help" for instructions

      Enter SQL statements terminated with a ";"

      dbsql> .tables

      /home/bazar/test/1/my.db: Program version 5.1 doesn't match environment version 83886080.16777216

      Error: SQL logic error or missing database

      dbsql>

       

       

      Thank you.

        • 1. Re: cross platform issue with journals
          userBDBDMS-Oracle

          from the error message it looks like you are running into an endianness problem.  SPARC is big-endian and linux X86 is little endian.    We do not support the case where the same set of database and log files are accessed by machines of 2 different endianness.   You take a db that is on a little endian machine, move it to a big endian machine, start it up and access it from just the big endian machine . 

           

          thanks

          mike

          • 2. Re: cross platform issue with journals
            user12622756

            Thanks Mike.

             

            In our scenario, moving it may not be a suitable solution in a sense that others may want to access that at original location.

            Let me give  little bit more details...

            If I am not doing any in memory write or reads  (i.e. directly accessing db file) would it be OK to remove journals when db is being updated?

            I thought of removing the journals....

            Thank you.

            • 3. Re: cross platform issue with journals
              userBDBDMS-Oracle

              Log files are for recovery.    If you are not concerned with recovering transactions then you can remove them.   If you are not concerned with transaction recovery, then maybe you can run without transactions all together.     This change would be made by changing the flags on the db open.

               

              thanks

              mike