Database recovery level in daily build mode

I am developing a daily build program for my project. We are using Flex 3 and SQL Server 2005. I'm not sure to what extent I should rebuild the database for daily builds. Should I drop all tables and stored procedures and add them back? Then I will have to have a script that returns all default data to tables.

Or should I have Alter scripts to write to the DBA that are only triggered when changes are made and concentrate on generating code on a daily basis?

+1


source to share


2 answers


It really depends on your current stage of project development.

In active development without any production deployments, it's a simple task to simply drop and re-create your database every time. This way your code and database need to be in sync, especially if you're unit testing. This basically makes the trunk assembly, i.e. the latest and greatest. It's much easier to maintain. Scripting your data by default is a simple and great way to have a clean customization when you need it. Check out the sp_ generate_inserts

stored procedure for a good utility to script data from an existing database.



Once you have production databases and are modifying the database using code releases, it is important to check the change scripts as well. Change scripts tend to be a little harder to write due to dependencies and data management considerations.

+1


source


Uncheck and re-create them. With alter it is always possible to forget intermediate changes.



0


source







All Articles