<p>I'm looking for some "Best Practices" for automating the deployment of Stored Procedures/Views/Functions/Table changes from source control. I'm using StarTeam &amp; ANT so the labeling is taken care of; what I am looking for is how some of you have approached automating the pull of these objects from source - not necessarily StarTeam.</p>

<p>I'd like to end up with one script that can then be executed, checked in, and labeled.</p>

<p>I'm NOT asking for anyone to write that - just some ideas or approaches that have (or haven't) worked in the past.</p>

<p>I'm trying to clean up a mess and want to make sure I get this as close to "right" as I can.</p>

<p>We are storing the tables/views/functions etc. in individual files in StarTeam and our DB is SQL 2K5.</p>

I prefer to separate views, procedures, and triggers (objects that can be re-created at will) from tables.  For views, procedures, and triggers, just write a job that will check them out and re-create the latest.
For tables, I prefer to have a database version table with one row.  Use that table to determine what new updates have not been applied.  Then each update is applied and the version number is updated.  If an update fails, you have only that update to check and you can re-run know that the earlier updates will not happen again.