Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2002
    Location
    Lawrence, KS
    Posts
    14

    Unanswered: replicated DB question

    Please correct me if I am wrong, but as I understand it, replication is accomplished by applying the transactions that occur on the source DB to the replicated DB.

    If I were to update a column on my replicated DB and never issue any transactions that modify that same column on my source DB, would my replicated DB keep that value?

    For example, I have a source DB (called source) that is replicated for reporting purposes to a replicated DB (called target). I have a common table, Reports, in both DBs that I use to trigger reports at the end of the day. I update the SystemDate column on the Reports table in my source DB, and when that date is replicated over to my target DB I know that I can start my reporting. When reporting is finished, I update the Finished column in the Reports table on my target DB. If I never update the Finished column on my source DB, will the Finished on my target DB ever be changed by replication?

  2. #2
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    Replication is based on primary key that is specified in your Replication Definitions(Rep defs). Assuming this is not a bi-directional replication, if you have changed anything on the replicate, then there is a likely chance that the replication from the primary will fail because of primary key constraints.

    If you intend to perform transactions at the replicate then you can do something called primary key pools and allocate keys from say 1-100000 to the primary and transactions on the replicate will have keys starting from 1000001 - 2000000 etc...

    In bi-directional replication this pooling is compulsory.

  3. #3
    Join Date
    Aug 2002
    Location
    Lawrence, KS
    Posts
    14
    Does this mean that I can accomplish what I described in my original message or not?

    I was not involved in setting up replication but I'm assuming that replication is only one-way. I might be able to convince the DBAs to do "primary key pools" and bi-directional replication sounds even better, but I'm not sure how much I can get the DBAs to do. I guess another soultion (with the one-way replication) would be to use a stored procedure triggered by the target DB to update the source DB after reporting is completed to ensure that reports are only run once.

  4. #4
    Join Date
    Aug 2002
    Location
    Madrid, Spain
    Posts
    97

    Re: replicated DB question

    Originally posted by tkofford
    Please correct me if I am wrong, but as I understand it, replication is accomplished by applying the transactions that occur on the source DB to the replicated DB.

    If I were to update a column on my replicated DB and never issue any transactions that modify that same column on my source DB, would my replicated DB keep that value?

    For example, I have a source DB (called source) that is replicated for reporting purposes to a replicated DB (called target). I have a common table, Reports, in both DBs that I use to trigger reports at the end of the day. I update the SystemDate column on the Reports table in my source DB, and when that date is replicated over to my target DB I know that I can start my reporting. When reporting is finished, I update the Finished column in the Reports table on my target DB. If I never update the Finished column on my source DB, will the Finished on my target DB ever be changed by replication?
    It will work as you pretend, assumed these requirements are met:
    - The update against the replicate doesn't alter any column of
    the primary key. Otherwise, further updates wouldn't be able to
    reach the target row, as they'll query by the primary key
    - The replication definition has the option "replicate minimal columns"
    or the origin table is not updated at all, no matter which column
    - Of course, the source row is not deleted either

    Regards,
    Mariano Corral

Posting Permissions

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