Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2003
    Posts
    127

    Unanswered: Summary Table Replication

    Hi, I'm running DB2 7.2 with fix9. I don't see anyway of replicating summary tables. Only way was to replicate all base tables and define the summary table on the target. We are trying to avoid that as the base tables have lot of data. Any suggestions appreciated.

    Thanks,
    Srinivas

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Srinivas,

    Why not create a view over the summary table and replicate that?

    Andy

  3. #3
    Join Date
    Jun 2003
    Posts
    127
    Hello, Thanks for the response. Creating a view still points to the summary tables. Don't u think so? Even if it doesn't, don't I have to create triggers when deletes,inserts ,updates occur. The deletes,inserts,updates cannot be figured out as every refresh dumps compete data. Its like full delete and inserting into the table. Correct me if I'm missing something.

    Thnx again.

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Srinivas,

    I tried just setting up replication straight from a summary table, and it allowed me to set it up no problem (I did not try to actually replicate the data though). Create you target table to be a normal table that looks like the summary table.

    HTH

    Andy

  5. #5
    Join Date
    Jun 2003
    Posts
    127
    Hey Andy, I already tried creating the summary tables as regular tables on the target side. When I did the capture, zero records were going into CD tables. I'll check that again. All other tabs were being captured. Can u please let me know in case u replicate successfully. I want to make sure I'm not missing anything.
    Is this the sequence you followed:
    Create a view for the summary table data on source
    Create the summary table as a regular table.

    Thanks
    Srinivas

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Srinivas,

    I currently do not have a working replication environment, so I cannot test if the replication actually works. What I did was create a summary table. Defined it as a replication source. Then created a subscription set that included it. That is it. I just wanted to see it DB2 would let me do that much.

    How did you create the summary table (DDL)? This may have an impact on the replication.

    Andy

  7. #7
    Join Date
    Jun 2003
    Posts
    127
    Andy, If I understood your question right, I guess this is what you are asking me. I created it with REFRESH DEFERRED.

    Thnx
    Srinivas

  8. #8
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    That is what I was asking. Refresh deferred summary tables are only updated manually (whenever the REFRESH TABLE SQL is executed).
    Try creating it with REFRESH IMMEDIATE instead. Then see what happens.

    Andy

  9. #9
    Join Date
    Jun 2003
    Posts
    127
    Let me try doing that way. Thanks Andy...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •