This discussion is archived
5 Replies Latest reply: Sep 13, 2012 8:21 AM by 961972 RSS

Oracle Database Mobile Server 11 sync

934626 Newbie
Currently Being Moderated
Hi,

I have two simple tables in the back-end oracle database in order to create a meeting-room android application with and embebbed SQLite database on the client devices. I have written all the functionality to register, authenticate, create a new appointent, show it, and delete it and it works fine on my smartphone, but I did all these steps against the local sqlite db.

Now I would like to share the reserves info with all the clients by synchronization using Oracle Database Mobile Server 11.

Tables:
Employees(ID, username, password, firstname, lastname, phone, email)
Reserves(ID, subject, firstname, lastname, start_date, end_date, meeting_room, alarm)

I have configured all the publications required (app , item, users, grants...) with the Workbench tool, like i have read from the official documentation and i added the lines to invoke the sync functionality. My problem is that when i launch the first sync the sqlite database in created on the device but the few records on the back-end are not replicated in the sqlite db. ¿is this process automatic or have I to write some code to catch this info?

Another problem is that the records of the sqlite database is neither replicated to the back-end database. I have to say that th sync process ends succesfully but I can see nothing on the in-queue and out-queue queues in the mobile manager console. So, what´s about this incomind and outcoming data? Th only thing i can see is a set of dirty records, these records are records on the back-end db, but I dont know what means...

Could you help me please?

Thank you very much.
  • 1. Re: Oracle Database Mobile Server 11 sync
    rxtaylor Newbie
    Currently Being Moderated
    Hi,

    Can you confirm that you have given the user you are syncing as access to your Application in the Mobile Server ?

    The steps involved in being able to sync data between the Client and Server are as follows

    1. In Mdw define your Publication and Publication Items

    2. Create your Application in the Mobile Server using the packaging wizard (from MDW)

    3. Create your User in the Mobile Server

    4. Give your user access to the Application you created

    5. Install the Andoid Sync App on the Client device, run it putting username etc to Sync the data

    Let me know if you have performed all these steps

    regards

    Richard
  • 2. Re: Oracle Database Mobile Server 11 sync
    934626 Newbie
    Currently Being Moderated
    Yes, I did all of them. The only thing I didn´t is data subset at publication step, nor sequence. Is this mandatory?

    I would like a client may see reservations from other clients. So, i don´t have to filter anything. Is this correct?

    Thanks a lot.
  • 3. Re: Oracle Database Mobile Server 11 sync
    rxtaylor Newbie
    Currently Being Moderated
    Hi

    Data Subsetting is to restrict the data each Client sees based on values you specify i.e.

    If you only wanted a Client to see data for a specific Dept you could specify the following in the Publication Item

    Select * from emp where DEPTNO = :DEPTNO

    You can define what DEPTNO should be for each Client in the Mobile Server

    So in your case if you want ALL Client to see ALL records for a Publication Item then you should not specify any Data Subsetting i.e.

    Select * from emp - This would retrieve all rows


    There is no specific need to use Sequences in your Application unless you want to. Obviously you must make sure that any new records created on the Client will not conflict with a record created on a different Client otherwise conflicts will occur after the data is synchronized with the server

    With regards to you actual issue can you confirm the following ( NO NOT CHANGE ANY VALUES )

    1. Check the table mobileadmin.applications in the Repository DB and confirm there is a row there for your Application and that the 'Publication' column contains the correct Publication you created in MDW.

    2. Check the Table C$ALL_CLIENT_ITEMS, this should contain one row for each Publication Item you created in MDW i.e.

    Select PUBLICATION_ITEM, DIRTY, CRR From C$ALL_CLIENT_ITEMS Where CLIENTID = '<Your Client Name>';

    regards

    Richard
  • 4. Re: Oracle Database Mobile Server 11 sync
    Harry Newbie
    Currently Being Moderated
    Hey,

    I have one table in my HR.COMMENTS and same definition table in Android sqllite.
    In my Android application i have Add,Delete functionality.


    I tried your steps but it is not helpful to me.

    Can you give me all steps in detail?

    How can i use Mobile server for my Android application?

    Thanks
  • 5. Re: Oracle Database Mobile Server 11 sync
    961972 Newbie
    Currently Being Moderated
    ( If you only wanted a Client to see data for a specific Dept you could specify the following in the Publication Item

    Select * from emp where DEPTNO = :DEPTNO

    You can define what DEPTNO should be for each Client in the Mobile Server )


    Please help me i want to use this Methode but i can't understand what i must t do ??


    this is my question : syncronisation with 2 devices and more

    Please

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points