title: How do you track database changes in source control?
body: <p>We use SQL Server 2000/2005 and Vault or SVN on most of our projects. I haven't found a decent solution for capturing database schema/proc changes in either source control system.</p>
  
  <p>Our current solution is quite cumbersome and difficult to enforce (script out the object you change and commit it to the database).</p>
  
  <p>We have a lot of ideas of how to tackle this problem with some custom development, but I'd rather install an existing tool (paid tools are fine).</p>
  
  <p>So: how do you track your database code changes? Do you have any recommended tools?</p>
  
  <hr>
  
  <p><strong>Edit:</strong></p>
  
  <p>Thanks for all the suggestions. Due to time constraints, I'd rather not roll my own here. And most of the suggestions have the flaw that they require the dev to follow some procedure.</p>
  
  <p>Instead, an ideal solution would monitor the SQL Database for changes and commit any detected changes to SCM. For example, if SQL Server had an add-on that could record any DML change with the user that made the change, then commit the script of that object to SCM, I'd be thrilled.</p>
  
  <p>We talked internally about two systems: 
    1. In SQL 2005, use object permissions to restrict you from altering an object until you did a "checkout". Then, the checkin procedure would script it into the SCM.
    2. Run a scheduled job to detect any changes and commit them (anonymously) to SCM.</p>
  
  <p>It'd be nice if I could skip the user-action part and have the system handle all this automatically.</p>