Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Copying tables and other objects using SQLDMO

Author  Topic 

babuman
Starting Member

5 Posts

Posted - 2005-02-04 : 14:30:16
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.

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-02-04 : 19:16:33
There are a lot of tools available to do this. You may want to investige buying one before spending a lot of time developing one.

quote:
Originally posted by babuman

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.




Codo Ergo Sum
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2005-02-04 : 19:58:13
Have a look at
http://www.red-gate.com/SQL_Compare.htm


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

babuman
Starting Member

5 Posts

Posted - 2005-02-05 : 09:54:34
Thanks all,

SQL_Compare seems to be exactly what I am looking for.

Babu.
Go to Top of Page
   

- Advertisement -