Update schema
-
I have an existing SQL production database. During new developments, new fields/tables/stored procs etc have been added. Now I want to merge these changes into the production server (without loosing data). I could write a program to do it, but is there an easy way?
-
I have an existing SQL production database. During new developments, new fields/tables/stored procs etc have been added. Now I want to merge these changes into the production server (without loosing data). I could write a program to do it, but is there an easy way?
We use SQL Compare[^]. The alternative is of course to save a script every time you make a modification, or simply to make the changes using a script in the first place, but that's not really an option for you now. The only other free alternative - the way we used to do it - is to export the database schema to a file using the Generate Script feature from both the old database and the new, and use a diff tool (such as WinDiff) to compare them. This will at least show what's changed. Then you write another script which uses ALTER DATABASE/ALTER TABLE/etc as appropriate to make the necessary changes.
Stability. What an interesting concept. -- Chris Maunder