Results 1 to 11 of 11
  1. #1
    Join Date
    Sep 2006
    Location
    Czech Republic
    Posts
    82

    Unanswered: Synchronizing two databases

    Hello,

    I think it is still same question (how to migrate, how to copy database...)... So, maybe there is better way. We have two databases... One is original and other is older copy... Is there tool how to simply synchronise them?

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    The best way to copy the database is to just use dump and load
    dump database original to 'compress::/mydumps/originaldump'
    load database older from 'compress::/mydumps/originaldump'

  3. #3
    Join Date
    Jul 2006
    Posts
    115
    i have an idea, would like ask for advise to sync 2 tables images..
    if there are 2 large tables who contain 2 days images(e.g table A hold today image & table B hold yestersday image)
    i would like to add "timestamp" to both tables & create index for it ... at dayend, by comparing timestamps values against 2 tables to extract the differenence... to delete "missing" records from table B from A .. add & update to table B from A ... is it works? what pro & cons?

    thx

  4. #4
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    Quote Originally Posted by ymho
    i have an idea, would like ask for advise to sync 2 tables images..
    if there are 2 large tables who contain 2 days images(e.g table A hold today image & table B hold yestersday image)
    i would like to add "timestamp" to both tables & create index for it ... at dayend, by comparing timestamps values against 2 tables to extract the differenence... to delete "missing" records from table B from A .. add & update to table B from A ... is it works? what pro & cons?

    thx
    Im not sure what exactly are you trying to do here.

    Are you

    A) trying to sync 2 tables
    B) trying to find a good archive process ?

  5. #5
    Join Date
    Jul 2006
    Posts
    115
    should be "A"

  6. #6
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    Ok. What do you do about a few days old data?

    If you just need to maintain today and yesterday, then you can just drop yest table, rename today table to yest table and create today table.

    If you have an archive table which you need to maintain, then yah what you said probably makes sense.

  7. #7
    Join Date
    Jul 2006
    Posts
    115
    Quote Originally Posted by trvishi
    Ok. What do you do about a few days old data?

    If you just need to maintain today and yesterday, then you can just drop yest table, rename today table to yest table and create today table.

    If you have an archive table which you need to maintain, then yah what you said probably makes sense.
    em ... actually, i have some master large tables (around 10,000,000 rows & 4GB size) and want to sync to child tables daily. other than repserver, i am looking for the faster ways to do so...

    thx

  8. #8
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    Quote Originally Posted by ymho
    em ... actually, i have some master large tables (around 10,000,000 rows & 4GB size) and want to sync to child tables daily. other than repserver, i am looking for the faster ways to do so...

    thx
    ok. sorry it wasnt clear from your previous postings.

    Yeah the only options I can think of are
    a) day-end sync based on time
    b) triggers
    c) two phase commit. when inserting in tablea, insert in tableb too

  9. #9
    Join Date
    Jul 2006
    Posts
    115
    Quote Originally Posted by trvishi
    ok. sorry it wasnt clear from your previous postings.

    Yeah the only options I can think of are
    a) day-end sync based on time
    b) triggers
    c) two phase commit. when inserting in tablea, insert in tableb too
    for a) cant trigger to delete child table rec if master table rec is deleted ...
    for b) cant, afraid of deadlock
    for c) tables will be updated by many sources ... cant make sure they r sync

    that why i want to use "timestamp" to compare the tables values as timestamp is uniqueness across db. is it possible?
    just want to know the pros & cons

  10. #10
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    kewl, originally i got confused because of the subject and I just realised you have extended someones else post.

    Anyways, timestamp sounds good and in future, please start a new thread if you have any specific issues. Theres a big difference b/w database resync and table resync.

  11. #11
    Join Date
    Jul 2006
    Posts
    115
    thx for ur suggestion. i will start a new thread about this.

Posting Permissions

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