Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# and SQL Server 2008 - script differences between dev and production database?

Tags:

c#

sql-server

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.

like image 653
Unknown Coder Avatar asked Mar 09 '26 22:03

Unknown Coder


2 Answers

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.

like image 187
Oleg Avatar answered Mar 11 '26 12:03

Oleg


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.

like image 38
Randy Minder Avatar answered Mar 11 '26 11:03

Randy Minder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!