compare tables in dbs

  • I want to compare all the tables in 2 databases (production and development) and if there are any differences like for example tables have been added or columns have been added or altered in anyway in the development database is there any way to update the production tables using DTS or if not TSQL?

    I've tried copying of the objects accross to the production db in a DTS package from the dev db but there seems not to be anyway to do this without first dropping the objects and the problem here is that when the objects are dropped so is the data and naturally I want to retain the data in the production db.

    Is there some sort of strategy I should be following for this or am I missing something in DTS..?

    any help appreciated

  • Or once you ID the differences you can then use ALTER TABLE to make the changes via script to production. (See SQL BOL for more detail). Also to help compare the two the best thing I have heard of was a product by RedGate Software called SQL Compare, check it out at http://www.red-gate.com/sql_tools.htm. You will see it in the ad banner often here on SQLServerCentral.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • I like the RedGate tools - I've got reviews of a couple of them posted here on the site. One will compare structures, the other with some limitations will compare data.

    Andy

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

  • thanks for all the replies, I am sure I will find what I need from this

    thanks again

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

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