views:

143

answers:

3

I have two SQL Server (2000) databases. Both are used for the same project, but different versions. Basically, the old database is from our TEST environment. The new database is from the DEVELOPMENT environment. We also have an ACCEPTANCE, PRODUCTION and MAINTENANCE environment and they all contain the same project. (It's our development street, moving versions from D to T to A to P and finally M.)

Now, the development database structure has changed. A few tables have been added, indices are added or removed, fields have changed in type and nullable fields have become non-nullable, things like that. The test database needs to be upgraded with the new structure but without any loss of data. Right now, I'm doing this with a lot of manual labor. I keep a list of structural changes and once everything is ready, I write an update script to patch the old test database.

But as a software engineer, I'm just lazy by design. So, is there some easy tool somewhere which will compare the two database structures and generate an update script by itself?

(Only to change the structure, btw. No data manipulation!)

+2  A: 

Take a look at Red Gate's SQL Compare..a complete live safer

SQLMenace
+1  A: 

At work we've used a few tools; AdeptSql Diff and we were trialing Redgate-something-something. AdeptSql was significantly cheaper than Redgate, and while Redgate had a lot of very nice bells and whistles, since we already owned Adept we decided to stay with it.

http://www.adeptsql.com/

I'm sorry that I don't know any free tools offhand; I know that Redgate at least has a trial period.

Amos Robinson
No worries. It doesn't have to be free. It just needs to match the budget that my team has for acquiring new software licenses. :-)
Workshop Alex
+3  A: 

Yes, the best one in my opinion is by Red Gate

The SQL Toolbelt they offer is very good, which includes a bundle of tools, or you can just get SQL Compare on it's own. Not free (except for 14 day trial I think), but well worth the money

AdaTheDev
+1, we use all the time too.
AlexKuznetsov