Replicating data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave

    #1

    Replicating data

    Hi all,

    I have two databases at different locations.

    Database 1 (local) is emptied say, once per week and re-populated.

    Database 2 (remote) is updated from local.

    What I want to do is to update the remote without deleting it first, so here
    are the actions...

    Compare the content of remote against local.
    Delete from remote where no longer in local
    add to remote where not exist in remote but exist in local.

    I have an ID field as the key field. I don't want to disturb this really as
    I want to be able to do a form of tracking (nothing complex and not to be
    relied upon) though I want to be able to allow the remote user to be able to
    come back based on the ID.

    What I am currently doing is dropping the remote and recreating from the
    local.

    Is there a tool that will allow me to do this or am I going to have to rely
    on a multiple sql statement to manage it. If SQL, can you give me some idea?

    Thanks.
    Dave Colliver.
    --
    ~~
    All I ask is a chance to prove that money can't make me happy.

    Your community connected. http://www.ashfieldfocus.com
    Get your business on the net, http://www.clickprovince.com
    Collectible dolls from http://www.collectorsdolls.com
    Web design, hosting, domain registration? http://www.revilloc.com is the
    answer.
    Tips, tricks and articles for programmers of all languages on

    Planning a wedding? http://www.bmcweddings.com
    Advertise your car on http://www.drivingseat.com


Working...