Category Archives: Production DBA

Server Monitoring using Powershell and DbaTools

script it…walk away.

I’m sure by now most of you have discovered dbatools, a wonderful library of PowerShell functions that make life as a  DBA so much better.   It’s a fantastic community full of people willing to help with minimal flaming and the library itself is frequently updated.

Initially I wanted to jump on the contribution train but IRL I have jobs to consider so instaed I took more of a end user role, working on familiarizing myself  with PowerShell in order to tap into the power of dbatools.  After writing some DBA specific utilities I started looking at the bigger picture of what I could do across the infrastructure with PowerShell.

Continue reading

MOAR sp_DatabaseRestore

script it…walk away.

people are talking about me again… o_o

However instead of plots to overthrow my kingdom, or curses that would cause me to eat pie and lose weight, or saying my name three times in a mirror so that I become summoned and forced to bust a cap…instead of stuff like THAT…they are props for working on some code!

I made some new changes and fixed an embarrassing bug in my previous contribution for the sp_DatabaseRestore.  In an ideal world I would just skip the part of this post where I point out my mistakes and explain what they were, however Github does a great job at keeping history so…

Continue reading

Automated Restore Fun (ARF)

script it…walk away.

Over the last a couple of weeks I started reviewing an automated restore solution I had been playing around with for a couple years.  RedGate SQL Backup had thrown some errors and since we couldn’t go without backups while waiting on RedGate support we decided to move ALL backup operations to Ola Hallengren’s scripts.  We also decided to ditch RedGate because they sent us back a list of reported bugs we had submitted and told us they aren’t going to fix it. So in other words “despite the fact that you have multiple licenses of multiple softwares across many servers, we feel your issues as a customer aren’t important to us as a software company.” With that we decided to roll our own solutions that we can customize for our environment…

Continue reading

Process Count Automation

script it…walk away.

Reviewing my most recent posts, I realized that I begin my posts with “So…”.

So…, I’d like to try and stop that.

Where have I been since August 11th 2015? Apparently not being active in the SQL community where clearly I wasn’t missed :D. Really though, I ended up taking on quite a bit of side work. When I wasn’t moonlighting or spending time with my family, I devoted whatever free time that I had towards creating music and learning synthesis.

Continue reading

I’m the O-D-B-c as you can see

win by decapitation…

So I’ve been working on a project to bring monitoring awesomeness to various SQL servers, without purchasing more RedGate SQL Monitor licenses and hopefully, without purchasing anything at all. Part of this project requires ODBC connections (at least it has in the testing so far), and during the testing I ran into a snag with the ODBC driver so I thought I would throw up a post in case anyone else runs into the same problem.

Continue reading

Replay the oplog in MongoDB

findx

“only a braindead can’t find x”

We had what I thought was a completely grueling homework question in M202. One person finished it very quickly and labeled the rest of us “a braindead” for not being able to do so (great encouragement right…and yes that was the grammar he used). The majority of the students seemed to have a problem with it, as I did. To be fair to the assignment, they did throw us a link to the following StackOverflow link. This is probably where those of us who are braindead failed the test.

Continue reading

Cache Money

18_The_Nuka-Cola_ChallengeI was reading the Voice of the DBA and it referred to a post by Brent Ozar about caching at the database level.  After discussing it with my homey, he thought it sounded a lot like memoization (I like to say it with a 3 stooges voice, mem moy Zay Shun).  According to wiki, Memoization is a specific case of optimization, which seems to be what we are doing when we cache the results of a stored procedure.

Continue reading

Workload Simulation With SQL Data Generator

testing is science…

Introduction

In college one of my mentors was a jedi  master of simulations and testing.  The guy could write a simulation for just about anything you can think of, and with anything you can think of.  I’m pretty sure that he once made a neural network for simulating dinosaur procreation rates…using sticks and mud (true story).  Simulating workloads can help you thoroughly test ideas and present data to management that will allow them to make informed decisions.  IRL, your career will be much happier if you can test your ideas BEFORE deploying them to production.  No one is asking you to have good ideas all the time, but the business is depending on you to come up with ideas that will work as intended.  The only way to accomplish this responsibly, is to test.

Continue reading