T-SQL Tuesday #130 – Automate Your Stress Away

Invitation and recap from Elizabeth Noble.

Life as a data professional is stressful. This year is even more stressful. We have so many responsibilities and so may demands coming at us every day. I’ve found over the years that I love the stress, but I also want to make my life and the lives of those around me easier, calmer, more peaceful. I can’t change everything about my job or what is expected of me. After a particularly stressful summer many years ago, I wanted to figure I could change in my day to day tasks. How could I make my life easier?

At the time, the largest hurdle I had was around deployments. Our deployments consisted of a collection of SQL scripts collected from individual user stories. Each script was executed separately as we didn’t have a good process for what to do if any particular script did fail. In addition, we created rollbacks for each script that was deployed. The process worked for us for quite some time until one day we deployed our first new application in years.

Eventually, we moved a handful of our databases to source control. That part was easy as you can use Visual Studio and SQL Server Data Tools (SSDT) to import a schema for an existing database. The next steps took quite a bit of communication between the teams. A few missteps later, we had 2 of our 10 or so databases deploying through Continuous Integration Continuous Delivery (CICD) pipeline. We still deploy once every two weeks, but our deployments our generally quicker and less tedious.

The time savings is nice. We have about 24-26 deployments a year, and we easily save at least an hour on average per deployment. That’s a full day a year! But the best part for me is the next day. I still check my email as soon as I wake up to ensure that aren’t any issues reported, but even if there are issues, they are usually quickly resolved and we go on about our day.

My invitation to you is I want to know what you have automated to make your life easier? This can be anything creating a SQL Server Agent job to automated running a daily report or using dbatools to manage your servers. I’m curious what challenges you’ve found at your job and what you’ve done to make things better. If you haven’t had a chance to automate some part of your job, what would you like to automate and what are your hurdles? If you’re interested in some help or advice, let us know. I love #SqlFamily, and I’d love to see what we can do to help out.

T-SQL Tuesday #110 – Automate All the Things

Invitation and recap from Garry Bargsley.

Have you heard the phrase “Automate All the Things”?  That seemed to be the top buzz phrase of 2018 and means different things to different people.

Kicking off the T-SQL Tuesday season for 2019, I would like to ask, what does “Automate All the Things” mean to you?  Everyone’s environment is different, everyone’s day-to-day looks different, everyone is a fan of different technologies and everyone’s environment is of different size.  While I might want to automate checking of my backup success across my 500 servers, you might want to automate how new servers are provisioned.  This can be a very broad topic, that could include a broad range of technologies.  You might choose one type of technology to accomplish a task, where I might choose another.

So technically there are two tasks for this month:

  • What do you want to automate or what automation are you proud of completing?
  • What is your go-to technology for automation?

Possible suggestions/ideas:

  • PowerShell
  • Chef
  • Ansible
  • Terraform
  • DevOps
  • tSQLt
  • Containers
  • Cloud
  • VSTS
  • Python
  • Bash
  • Code Deployments
  • VS Code
  • dbatools
  • T-SQL (honorable mention)

T-SQL Tuesday #091 – Databases and DevOps

Invitation  and roundup from Grant Fritchey.

Implementing DevOps with databases presents a unique set of challenges. However, just because something might be hard doesn’t mean that it shouldn’t be done.

I had the opportunity to work with a team of developers, database developers and DBAs under a management team that all agreed on the common goal we had, delivering more, better performing applications, faster. We didn’t know it at the time, but we were doing DevOps.

DevOps gets a bad name because, well, the problems that DevOps sets out to solve, poor communication, bad teamwork, dysfunctional development and badly configured and maintained processes, are  done by the same team that attempts to implement DevOps. However, they look on it as a purely mechanical switch that they throw, assign some poor person to the role of DevOps Coordinator (or something) and then maintain the status quo in regards to their culture and approach to software. Shocking that implementing this doesn’t work.

Then, toss in databases with the whole issues around persistence, and things go nuts.

This then, is my choice for T-SQL Tuesday. How do we approach DevOps as developers, DBAs, report writers, analysts and database developers? How do we deal with data persistence, process, source control and all the rest of the tools and mechanisms, and most importantly, culture, that would enable us to get better, higher functioning teams put together? Please, tell me your DevOps stories.