Undoubtedly, there are a lot of ready-made products that you can buy (I think several RedGate tools can come in handy here), as well as Visual Studio Team Suite - Database Edition.
In the light of buying something, why not consider using SQL Management Objects (SMOs)?
I have written several utilities that generate T-SQL scripts (using the Scripter class), which creates the same scripts that you get from scripting through SQL Server Management Studio (it uses the same functions).
You can integrate such a utility into the script / build build process, which will allow you to create scripts and then the version and check them in the original repository. In addition, you can load scripts into a single file (if desired), which is superior to hundreds of individual files.
I wrote a note about this approach a while ago.
Read more about SMO Class Scriptor
Here are some more articles that might be helpful:
http://www.sqlteam.com/article/scripting-database-objects-using-smo-updated
http://sqlblog.com/blogs/ben_miller/archive/2007/10/03/table-scripting-with-smo-part-1.aspx
Robs
source share