Tuesday, 21 August 2012

Example Step6:Test Synchronization

Finally, I recommend that you get a sense for how synchronization works between the Oracle Server and the device. Depending on the conflict resolution and other rules that you have set for your Publication and Publication items, it is pretty cool to see that synchronization does work! Since I had a rooted device, here is how I verified that two-way data synchronization was working as expected.

Step 1: Data Modified on Oracle Server
  • I logged in to the database as user AA using a SQL client
  • Issued a simple update to change one record in the ITEMS table
SQL> UPDATE items SET ITEM_DESCRIPTION = 'Sorry Grass is dark Green' WHERE ITEM_ID = 10;

On my device, I fired up the Mobile Sync application and clicked 'Sync' and the verified that the data did get refreshed on my device.  Check out the screenshots provided if you are not sure how to do this.

Step 2: Data Modified on Device
  •  Use SQLite client on the device to modify a record using an UPDATE statement
  • Perform a manual sync and you should see the modification on the Server-side. I have provided a screenshot

    Download Screen Shots


  1. Hello Double A,
    Your post is really helpful. However, we couldnot follow two points:
    1. Did you not deploy the js in the form of a jar?
    2. The js needs to refer to sqlite or ORACLE database? As per the demo the sqlite gets created automatically on deployment. So, this question.

    1. Hi Som! I am not sure which js you are referring to. Assuming you are referring to the app.js in my Titanium project, my responses would be:

      - Titanium installs application by creating an APK file
      - The sqlite database is 'opened' using


      Please let me know if I misunderstood your question.

  2. Hello Double A,
    Thanks for your reply.I am however confused with certain points.
    Just wanted to know how the simple_sync_android application is actually creating the sqlite_db. I read the files FileManager.java,MainAct.java,TextFileEditor.java in details. But nowhere does it refer to any Oracle Database. As far as I know, the sync is supposed to take place between a back-end XE or so database and the sqlite_db. How is the sqlite_db thus created in this case? How and what is it syncing?

    1. I have not taken the time to inspect the Java sources included with simple_sync_android because I didn't need to (also I am disinterested in Java), but here is what I have observed.

      1. After I ran installed Mobile Sync app and sync'd it the first time, it created a database called default.db in the directory pointed to by DATA_DIRECTORY parameter (in my case I had changed the path to SD card)
      2. Additionally, I had packaged my publication and publication items into an app called TEST. After I installed the application TEST (from Oracle Update), it created a database named TEST.db which contained my publication and items. I verified this by running SQLITE3 and was able to see the tables and run queries on them.

    2. Just to add..the Default.db and TEST.db are both SQLite databases as far as I can tell.

  3. Hello Double A,
    Sorry but,here's few more questions
    1> What did you write in ose.ini to point to SDCard.?
    2> You created ose.ini for the TEST app? How did you read it?
    3> How did you sync the sqlite table with backend database??Did you write any sync logic??
    Thanks in advance

  4. 1) OSE.INI

    This entry needs to be /sdcard and some path. I used /sdcard/. Mobile Sync appends the username automatically to the path provided here. So the database is created in /sdcard/net.adkoli.dbtest/AA. Also note that /mnt/sdcard/ did not work for me

    2) In Mobile Sync app, click Settings on your device and you can see it. I already knew the path to the database. So in my Titanium app I have hardcoded path to Ti.Database.open

    3) Mobile Sync is the app that does it. Comes out of the box. I have not tried to poke around with Java sources to see what exactly it does.

  5. I will try this.

  6. Hi, I just read all of your posts and it seems that you have a real huge knowledge about Oracle DB. But from what I've read at your blog setting mobile projects with Oracle DB can be pain in the ass. Did you check other solutions as well? Do you have any experience with them?

  7. Actually, it is not that complex. I got most of it installed and working within 48 hours of starting. There were some glitches (mostly the documentation was unclear in a few areas), but once I got around these...works like a charm.

    I did not try any other solutions simple because we already deploy 6 large apps in production around Oracle technology and I have comfort in this space due to my background.

    Suggest you try it out if you are starting afresh. You should be able to get a test environment going in 4-5 hours with these instructions from Step 1-6, good luck

    1. Yes, using your instructions should speed the process very much. But what I've read from your first posts it took you some time to have it up and running.
      Wasn't even the consideration for you to try some of more modern solutions offered in SaaS? The setup time nearly zero, and the learning curve is quit fast if you know Java or .Net. Of course it has to provide all the enterprise features like Oracle do and obviously should be able to talk Oracle DB without any problems. That combining could gain a lot of time savings.
      I have to say that I'm from mobeelizer.com - a company that is providing Enterprise Synchronization-as-a-Service solution.

  8. All downloaded file is not exist could you help me to get it /

  9. I am on the road for several weeks and do not have access to my dev environment. Exactly which screens are you looking for? For which Step? I will try to get one of my colleagues to post them.

  10. rely I am need all attaches , I am learning it . specially this application can`t opent in my tablet http://oracledms.blogspot.com/2012/08/sample-app-step-2-install-mobile-sync.html . my tablet is android 4.2.2

  11. Path Infotech is in the field of oracle training program from past several years.

    For more info : Oracle 10g Certification

  12. Your information about oracle is really very informative and useful for me..Thanks for sharing this great blog..keep posting..

    Oracle Training Chennai

  13. The real issue for me is are all three apps "Oracle Setup", "Oracle DMAgent", and "Oracle Update" NECESSARY?
    MUST I install them in order to use DMS on Android (or any device)??

    Another way of asking this is, can I incorporate the functionality of "Oracle Setup", "Oracle DMAgent", and "Oracle Update" into my own app?
    I think this is a highly relevant and very important question.



Note: only a member of this blog may post a comment.