1 Reply Latest reply: Feb 8, 2014 8:29 AM by winnie.hu RSS

    DataCollectionQueue

    4dd630b5-9066-4a1d-870a-52a811ed3cfb

      Hi,

         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.

       

      Thanks

      vikas rao

        • 1. Re: DataCollectionQueue
          winnie.hu

          Hi,

           

          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

             SELECT NULL,NULL,NULL,PK,USERID,COL_0001,COL_0002,COL_0003 FROM "MASTER"."TABLE_01";

           

          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.

           

          Thanks,
          Winnie Hu

          Oracle Database Mobile Server Development