Does any one here use source control (of any kind) for their SQL Scripts? At my last shop, if you needed to change a SProc, you checked it out... made your modifications, ran it against the dev DB, and when done, checked it in. Here, when I asked about version controlling the sprocs, I was told "Yep... when it goes into production, the whole DB gets versioned." .... yipes.... mean while, the system I'm working on has never gong to production, so there is no version history for it (we do use TFS for the code bits.... just not the SQL end of things (????)) so if I need to revert back a sproc in dev or in the test environs, I'm outta luck. The issue came up again today as we discussed getting closer to doing fully automated build and clickonce deployments - we can get it to build the projects and deploy them to CO just fine for the different environs we have (there's about 12 or so).... BUT, there isn't a way to automate the SQL changes. I think it would be possible IF we had the SQL Scripts in TFS.... then we could create a custom component that would grab the scripts, and run them against the proper database(s)....

So my question is, how do other shops handle this? Do you version control your SQL scripts? If so, how do you manage it? If not, why not? Pros? Cons? Stories from the trenches? Lessons learned? Things you wished you had done but didn't? Things you DID you wished you HADN'T?

-tg