I’ve been meaning to work on getting my mind wrapped around Source Control for a while now. I was all hyped about it after a recent SQL Saturday, then I wanted to make it a learning goal for the year. Looking back at those posts, I guess the goals was to do more “DevOps” type stuff, which includes source control so there ya go.

Past Failures

This wasn’t the first time I tried to work source control. When I was working on my undergrad long ago, I wanted to get more experience as a developer and tried to work on an open source project with a friend. Unfortunately, I was remote to the project and getting my mind wrapped around how to implement source control frustrated me to the point of giving up.

Then I spent some time trying to figure out how to set up a local repository that I could use. Here again, it became frustrating as SSMS doesn’t have a built in method for utilizing source control. And using Visual Studio is a complex, confusing endeavor for the everyday DBA. In the end, I just stuck all of my scripts into an organized folder in My Documents and called it good.

This Time

I have taken the approach of checking in all my scripts to a code repository, then pushing that code to BitBucket. Why BitBucket? Well because it’s what the organization I work for uses, so I’m trying to kill two birds. Learn how to effectively use source control while I also figure out how to navigate BitBucket. I’m still on the fence about using the rest of the tools from Atlassian.  To push the code I have been using GitKraken which works great for both Windows and Mac.

Another avenue of getting used to using Source Control I have been utilizing is Visual Studio. Again, two bird mentality here. I get familiar with both source control and writing code in Visual Studio. Is that important for a DBA? I don’t know, there are some advantages to using Visual Studio to develop and leave SSMS for the administration work. Of course, at this point I am still too much of a novice to notice much difference.

Just have to keep plugging away at it.

Much more to learn

There’s still much more stuff I need to figure out. Like how to branch, merge, correct mistakes, and recover from those opps moments. Such as when I accident deleted my repo setting this up. Thankfully, I managed to recover most of my scripts. It keeps things interesting right?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.