View Single Post
Old March 1 2013, 06:45 AM   #59
RevDMV
Rear Admiral
 
RevDMV's Avatar
 
Location: RevDMV in the Bay Area, CA
Re: What Are You Working On (And How Are You Getting There)?

Robert Maxwell wrote: View Post
If no one minds me being a bit more detailed about something work-related (and if you do, skip this post):

We have a bunch of SQL databases with about 10,000 stored procedures. For those who are unfamiliar with such technology, they are programs stored inside the database itself, so they don't exist as external files you can open up and edit. There is currently no version control on them, so it's difficult to know which ones were modified, when, and to what extent. A daily process dumps all of the procedures from each database into text files--one file for each database, so all the procedures are lumped together. Not exactly conducive to figuring out when something is changed, right?

So, I wrote a little program that scans the archive each day, breaks up the files into their constituent procedures, and then commits all the changes to version control. There were some challenges involved since the archive files are not marked up in such a way that it's very easy to determine where each procedure begins and ends, and the name of the procedure is inserted numerous times into the text of the procedure itself (I have no idea why, frankly), so I have to do some massaging and parsing to make it all work correctly. But work, it does! I am pretty happy with it, and it doesn't interfere with anyone else, which is a good thing.

I love automation.
Good work, that can be such a nightmare.

I've moved all my MSSQL stuff into Visual Studio projects and version control from there with SVN.
__________________
Life is good
RevDMV is offline   Reply With Quote