Sunday, March 11, 2012

Database Diff?

I have 2 databases:
1 from production and 1 from development.
None of the developers kept a changelog so i need to know what has changed (or what is different between the 2).
Any Ideas on how to do this?A quick method is to compare selects from sysobjects, syscolumns, and sysindexes.

blindman|||Then give the output of those queries to the developers so they can sift through them. Only proper, I would imagine.|||A quick, first run is to compare the date modified of the objects. Of course this does not compare contents. I've done it this way and it wasn't as bad as it sounds. Good luck.|||...and a quick way to identify modified procedure code is to compare checksum(syscolumns.text) between the two databases.

blindman|||if this is recurring task and if your department has a few dollars to spare (as we all have ...), you can use software for this, e.g. http://www.red-gate.com/sql/summary.htm|||SQLDiff by ApexSQL is a good tool too. There are some free database compare scripts at http://www.sqlservercentral.com/. Just look in their script section on the site.|||Another way - create db scripts (use DMO) and compare by FC.exe (included in W2000).

No comments:

Post a Comment