1 Reply Latest reply: May 10, 2013 12:25 PM by user548068 RSS

    Oracle Mobile Server 11g - BerkelyDB corrupt.

    user548068
      We have a client that currently uses Oracle Database Lite 10.3.0.3.0 to synce an olite database that interacts with a Win32 application. Due to the support being dropped they are in the process of migrating to Oracle Mobile Server 11g, however I have run into an issue with the BerkeleyDB files created by the sync agent.

      We have installed Oracle Mobile Server 11gR2 onto a linux environment, hosted on WebLogic 11. As a test I created a publication item for BerkeleyDB (Win32) with the workshop tool with a single table from our main database. Our developers are able to connect to the database using the System.Data.SQLite.dll and SQLite.Interop.dll files that came with the Windows MSI file, however any queries against a primary key column result in a "database disk image is malformed" error message. Queries against non-PK columns work fine.

      Whenever I attempt to use the dbsql.exe file to connect to the database file, I am presented with the following:


      "
      C:\mobileclient\bdb\data\TESTUSER>dbsql.exe TEST.db
      Berkeley DB 11g Release 2, library version 11.2.5.3.21: (May 11, 2012)
      Enter ".help" for instructions
      Enter SQL statements terminated with a ";"
      dbsql> .database
      Error: SQL logic error or missing database
      "

      Attempting the command again will proceed with:
      "
      dbsql> .database
      Error: out of memory
      "

      Enough connections/disconnections will eventually break though, but I doubt this is how it was meant to work. Once it is "working", this is the kind of errors our developers are running into:

      "
      dbsql> select * from tbl1;
      PKCOL|VALCOL
      1|ONE1
      2|ONE2
      3|ONE3
      4|ONE4
      5|ONE5
      6|ONE6
      dbsql> select * from tbl1 where valcol = 'ONE1';
      PKCOL|VALCOL
      1|ONE1
      dbsql> select * from tbl1 where pkcol = 1;
      Error: database disk image is malformed
      dbsql>
      "

      We can create a table through this sql interface and it works just fine. So I'm thinking the issue is either with how the Sync Agent creates the database, or its with how the Workshop tells the server to build the tables. I have attempted to use the workshop on both Windows and Linux environments to see if that would help, but unfortunately it does not.

      Does anyone have any ideas of where I should start looking? Am I just missing something that needs to be set on the client's (where the berkeleyDB is deployed) environment, or on the server side?

      Thanks,

      Nathan