|
Pragmatic TSQL Programmer > Posts > Free and Easy Source Control for SQL Server
|
10/20/2008This is a re-link to my HDC07 presentation. I've gotten a few e-mails from people who have looked here for my demo of how to get SQL Object (Stored Procedures, Functions, Table Definitions, etc.) to be automatically placed into source control without paying for any 3rd party tools. Apparently, my original posting of it wasn't very descriptive, and several people didn't realize it was the presentation I told them was on my site.
Everything is explained in this presentation, along with sample code. The only thing you need to provide is the scripts to move files placed on the file system into your particular flavor of source control. (sadly, there is no way for me to provide scripts for this to everyone. I don't have access to every source control flavor, and there is no way to do this in a general manner for all systems.) Everything else is done with Service Broker, SQL CLR, SMO and a Windows Service, with all the code provided for you in the sample code.
The end result will be that any time anyone runs a SQL command (via tool or command line) to create/update/delete a SQL object, you will get it automatically moved into source control, and the appropriate code reviewer will receive notification that things have changed. Say goodbye to undocumented changes that happen during deployments that make things work and "we'll get it entered into source control tomorrow. Seriously, we will. . ." |
|
| | |