Synchronising a database on 2 machines.

  • Hi folks,

    I have 2 non-networked machines:

    i)machine1

    ii)machine2

    In order to transfer the database from machine1 to machine2,

    I normally:

    1) copied the mdf and ldf files from machine1 on to cd.

    2) attached them to machine2.

    Now, the databases are not in sync.

    (I am therefore unable to do a direct copy)

    This is because:

    i) machine1 database has new sprocs and updated tables.

    ii)machine2 database has updated tables.

    I would like the database on machine2 to:

    i) keep the changes to its updated tables.

    ii) import the changes that have occurred in the machine1 database.

    Is there any way to achieve this?

    Cheers,

    yogiberr

  • No direct way to do that....

    You can try "log explorer" to generate script for the changes made to one of the database and can implement those changes to other database....

    Cheers..

    Prakash Heda

    Sr Consultant DBA

    Bangalore, India

    Chat: hedafriends@yahoo.com

    Prakash Heda
    Lead DBA Team - www.sqlfeatures.com
    Video sessions on Performance Tuning and SQL 2012 HA

  • Hi Prakash,

    I'll give the free download a try.

    Many thanks for taking the time.

    Cheers,

    yogiberr

  • A second approach could be to attach the machine 1 databases on machine 2 on a different database. If that's done, you can copy only those objects from one database to the other.

    Of course, this is manual labour, so it can be a lot of work and errorprone.

  • Thanks, between the 2 approaches I'll get it done.

    cheers,

    yogi

  • Check out Red Gates product (ad at the bottom). Andy Warren swears by this.

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

    http://www.dkranch.net

  • Hi Steve,

    Will do.

    Thanks bud.

    yogiberr

  • Also have a look at Embarcadero Change Manager.

    Prefer over red gate

    Cheers,

    Crispin

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • Whats the cost on Change Manager? Havent tried it.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply