Merging two databases using SQLDMO

  • Hi,

    I am trying to write an application that will compare and merge two databases.  This is required due to the fact that very often, the production database and the development database goes out of sync due to structural changes to the database by the development team.  It is extremely difficult to compare the two DBs manually and make the modifications.  My application compares (in theory) every object (tables, keys, procs, columns etc to name a few) in the source database with the target database and then creates a new database with all the objects (including the new, modified and identical objects) from both databases to the new one.  I am using SQLDMO and C# in VS.NET 2003 to achieve this.

    Is there any sample code available out there that I can use as a reference to do this?  I have done some database manipulations with SQLDMO already, so I am somewhat familiar with SQLDMO.  But there is a lot of gray area in there that I still have difficulty understanding.  Any help pointing me to the right resources will be highly appreciated.

    Babu.

  • This was removed by the editor as SPAM

  • Babu,

    I am also looking for this kind of program, would you please post the code if you solve the problem.

    Thanks

     

  • Hi all,

    I am in the process of writing this application and is about 70% complete.  I don't want to post the code until I can fix all the bugs.  Once I am done with it, I certainly will post the complete code. It is being written in .NET 1.1 C#.

    In the meantime, if anybody is desparate to do the merge, I found one (probably among many) commercial software that does it. Checkout SQLCompare by http://www.red-gate.com.  I only looked at their screen shots and by the look of it, it seems that it will do what I was looking for.  But since I have already done 70% of the work, and also since I wanted to have the experience of developing one on my own, I am going to continue finishing this application.  It may take a few more days (even weeks) before I can post the code.

Viewing 4 posts - 1 through 3 (of 3 total)

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