I have a database that I use for all my development and testing and a second database that serves as my production database. What is the best way to script the differences in tables (structure only) between the two? My dev database might have new columns that my production does not have and I need to get the differences into the production side without (obviously) affecting the data in the production database.
If you use Visual Studio 2010 Ultimate/Premium Edition or Visual Studio Team/Database Edition 2008 you will find all you need in the Visual Studio. (See Handling change in a database schema also)
If you can not VS2010 Ultimate or Premium and no VS2008 Team or Database Editions I would you recommend to look at some products of http://www.red-gate.com/ (like http://www.red-gate.com/products/SQL_Compare/index.htm) with the close features.
Many ways to do this, but one of the most popular is with a tool like Red-Gate SQL Compare (www.red-gate.com). Our development group would be lost without a tool like this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With