Monday Coffee: Database Deployments

I’ve always been particularly cautious when it comes to deploying code to databases, some would say overly cautious.

Because of this I’ve always performed manual deployments. Checking the code, testing the code and then manually running it in production. I’m responsible for the availability, resilience and performance of these databases so I should be the one to deploy to them, right?

I think this is a mindset that a lot of DBAs have and in my opinion, completely justified. I don’t want to be woken up in the middle of the night because something’s been released to Production in my absence and it’s caused issues.

However over the last few months I have seen the benefits of continuous integration & continuous deployment so I have been looking at ways to automate our database deployments. We use Octopus Deploy at my company so a database deployment process has been built within that.

The tests we’ve done are really promising and last week we started deploying to our Staging environment. If all goes well we’ll be moving to Production soon.

I’m still a little paranoid that something will go wrong if I’m honest. Because of that the database deployments are separate from the app deployments and I’ll be performing them (for now). We have a really good code review process in place so I highly doubt anything will go wrong but it’s just my nature to take changes like this slowly. Validate each step and move onto the next, proving that what you’re doing is working correctly.

The end game here is to integrate the database deployments with the app deployments and have one person performing them. Specialists (like myself) would only be called upon to perform code reviews and resolve any (hopefully none) issues.

I’m off to go and see if we have any Staging deployments to be performed 🙂

Have a good week!

Monday Coffee: Alerts & Checks

Hope you all had a good weekend, the Lions won so I’m pretty happy.

Over the weekend I was thinking about the alert system that I have in place at my current position. A good alerting system is (obviously) essential for any DBA to have in place but we all know that’s not enough right?

No matter how good your alerts are, detailed monitoring of your systems is also essential.

Detailed monitoring will allow you to catch issues before they occur, taking you from “fire fighting” issues and actively working towards keeping your system stable.

However, the processes around your monitoring system(s) are also just as important. I’ve worked for companies were it was a requirement to spend pretty much all of each morning meticulously checking off tasks in excel spreadsheets, in order to retain a detailed history.

For me, that’s an example of a bad monitoring process. There’s a lot of very good monitoring tools out there that automatically record stats for us and provide reporting.

Monitoring tools are there to allow us as DBAs to quickly observe and review our systems and that good work is wiped out by having to manually enter data. We don’t want to performing manual tasks, we want to be working on our current projects.

So if you’re in a position were you need to be entering in data manually, you should check out dbatools.io

dbatools is a project written by DBAs for DBAs. There’s over 200 commands there that will allow you to quickly analyse your suite of servers, pulling back whatever stats you need. Do away with that manual data entry, there’s a better way 🙂

Have a good week!

Monday Coffee: Attending Conferences

Last week I asked the following question on Twitter: –

I was interested to see the responses as I wanted to know how more experienced presenters get the time off to speak at so many events. Up until now I’ve been using annual leave and this was a way of gauging what was the general standard out there.

Well, the results showed that there is no general standard.

I had a lot of responses saying that companies would give time off and pay for travel expenses as it was viewed as training but then there were others that said the complete opposite (and everything in-between).

Btw, I’m discounting the consultants that replied. You run your own companies! 🙂

My personal opinion is that attending conferences, even as a speaker, is training. I always go to other sessions when I’ve been speaking at events, I’m not going to stay up in the speaker room all day when there are great sessions going on!

However, I can also see the company side of things, especially if there was no formal agreement in the employment contract. You are out of the office after all, and for a least part of the time, unable to work remotely (if say, needed on call).

So, I would offer having a set amount of days that I can use to attend conferences with also the option of working around hours that I’m off (if needed). That way the company gets the work they need from me and I can attend the events that I wish to.

What does your company offer?

Monday Coffee: SQL Saturday Dublin

Last weekend was SQL Saturday Dublin, and it was a good one.

My session on An introduction to SQL Server & Containers was the first one of the day, scheduled for 8am; now for me that’s great as I tend to get a bit nervous beforehand so having the sessions right at the start gave me less time to stress out.

I have to admit though, I was kinda worried about how many people were going to turn up as not only was my session early on a Saturday morning, the weather was absolutely stunning which does tend to hurt attendance at tech events.

However around 20 people turned up so I was really chuffed and think the session went well. I’ve delivered that session a couple of times now so enjoy presenting it, the feedback I received was all positive and once it was over I could relax and enjoy the day.

The main highlight for me (other than my session of course) was the session on PowerShell ❤ SQL Server: Modern Database Administration presented by Chrissy LeMarie (t) & Rob Sewell (t).

If you’re ever at an event and they are presenting, I can’t recommend that you go to it enough. They have a great dynamic when presenting together and it makes the session really fun. It’s also a plus that the topic they’re presenting about (dbatools.io) is absolutely awesome! If you haven’t checked it out, go and do it now.

SQL Saturday Dublin has prizes for things like best lightening talk, best new speaker etc. Rob & Chrissy won best session which if you check out who else was there (Paul Randal, Kimberly Tripp, Buck Woody…) you can guess at how good that session was!

Other highlights include having probably one of the funniest conversations with a vendor at a technical event (which I won’t go into detail here, I like to keep this blog relatively clean 🙂 ), the lightening talks hosted by the indefatigable Buck Woody (t) and having a couple of beers with everyone in the blazing sunshine afterwards.

If you work with SQL Server and have never been to a SQL Saturday event, I highly recommend that you go as it’s a day of free training from top (present blogger excluded) professionals and it’s a great way of meeting people within the industry. Have a look at the website and find your nearest one.

Have a good week!

Monday Coffee: Lab Environments

Having a lab environment is an absolute must for any IT professional. You need somewhere that you can test out code and new functionalities with zero risk. But where’s the best place to host?

My lab is in Azure, it’s convenient and (relatively) cheap but there is one problem with it; it requires an internet connection in order for me to use it.

Now 99% of the time that’s not an issue. Internet connectivity is available pretty much everywhere these days but still it can be an issue. Ever been to a presentation where the presenter hasn’t been able to connect to the wifi? It’s the reason that my demos for more involved subjects are all pre-recorded (that’s not the only reason but it’s a big one).

So what are the other options? Well, I know a couple of people who’ve hosted their own lab but that’s not really an option for many people. It’s expensive, noisy (servers are noisy) and you need quite a bit of space.

Then there’s building one on your local machine, using Virtual Box or Hyper-V. That’s a pretty good way to go, if you have a powerful enough laptop.

Another option is containers. Now that docker allows you to run linux containers on windows you can host pretty much everything on a not-so-powerful laptop. I have multiple images on my laptop that allow me to spin up versions of SQL Server from 2012 to 2017 in seconds. I don’t need to waste resources running full blown versions of all the different versions of SQL that I work with, the containers give me (almost) everything I need.

OK, I admit that there are some limitations so that’s where my Azure lab steps in but for most things, spinning up a container is a fast and simple way for me to test out code and investigate issues.

I highly recommend that anyone working with SQL Server (or any other app really) download docker and get involved with using containers. There really isn’t a downside to doing so.

Have a good week!