1 Reply Latest reply on Feb 8, 2014 2:29 PM by Winnie.Hu-Oracle




         I am trying to create a DataCollectionQueue below are the steps i am following to creating  it


      1. createPublication(PUBLICATON_NAME, Consolidator.SQLITE_CREATOR_ID, CLIENT_DATABASE_NAME, null);

      2.createDataCollectionQueue(PUBLICATON_ITEM_NAME, Schema_owner, PUBLICATON_ITEM_NAME, null, null, false, true);

      3.addPublicationItem(PUBLICATON_NAME, PUBLICATON_ITEM_NAME, null,  null, "S", null, null);


      but i am finding difficulty in

      a.Passing select statement(Data subsetting) to DataCollectionQueue.(As in case of regular publication item we used to pass through "Consolidator.PubItemProps.select_stmt").

      b.Is these are the correct step to create DataCollectionQueue.



      vikas rao

        • 1. Re: DataCollectionQueue



          Customers cannot use parameter binding in DCQ's in the same way as they are used in non-queue based publications, however, customers can replace the default out queue query that Mobile Server software create for the DCQs with their own that uses whatever client specific subsetting that they need to implement.


          For example, if their current out queue view is:



          CREATE OR REPLACE VIEW "CTM$TABLE_01" ("CLID$$CS", "TRANID$$", "DMLTYPE$$", "PK", "USERID", "COL_0001", "COL_0002", "COL_0003") AS



          They can replace it with user specific query:


          CREATE OR REPLACE VIEW "CTM$TABLE_01" ("CLID$$CS", "TRANID$$", "DMLTYPE$$", "PK", "USERID", "COL_0001", "COL_0002", "COL_0003") AS

               SELECT cons_ext.get_curr_client,-1,'I',PK,USERID,COL_0001,COL_0002,COL_0003

               FROM "MASTER"."TABLE_01"

              WHERE userid = cons_ext.get_curr_client;


          We are using cons_ext.get_curr_client to get the current synchronization client id and use it to sub-set the data in the client's out queue.


          Winnie Hu

          Oracle Database Mobile Server Development