Hey all! Andy Levy here. I’m a SQL Server DBA and major contributor for dbatools. My current focus within the project is fixing the docs and more specifically, the help content and documentation that’s included with every function.
Most folks don’t like writing documentation. It’s seen as a necessary evil, something you do to just check a box, complete requirements, and move on. With many open source projects, you’re lucky to get much documentation at all.
No matter how hard the dbatools team tries, there’s always someone who wants to do things we’d never thought. This is one of the great things with getting feedback direct from a great community. Unfortunately a lot of these ideas are either too niche to implement, or would be a lot of complex code for a single use case.
As part of the Restore-DbaDatabase stack rewrite, I wanted to do make things easier for users to be able to get their hands dirty within the Restore stack.
A recent addition to the release pipeline is the “code coverage” report. Although you can find several posts about the intricacies of code coverage for PowerShell, you may be asking yourself what is code coverage in simple terms.
Defining Code Coverage Coupled with tests, code coverage is a metric that measures how much of the code is tested.
This is helpful to realize the test written is really covering for all the “features” of the code.
I have to wake up at 3am to go to the airport and start a solid two weeks of vacation, so I’ll keep this incredibly short.
Tonight, we released picklerick. It has 323 super useful, tested commands but what’s especially great about this release is that now, we get along better with your SQL Servers. We no longer hang out longer than we’re supposed to and dbatools creates connections that are part of the SQL Connection Pool.
A few months back, dbatools wizard Fred created a prompt that was so awesome, I never had to use Measure-Command again. It was cool enough that a number of us ended up adopting it, so I figured I’d share.
Performance is important to us so that’s what the prompt is all about. Nothing fancy, just the current working directory and how long the command took to run.
PowerShell [16:46:06] C:\github\dbatools> Get-DbaDatabase -SqlInstance sql2016 -Database master ComputerName : sql2016 InstanceName : MSSQLSERVER SqlInstance : sql2016 Name : master Status : Normal IsAccessible : True RecoveryModel : Full LogReuseWaitStatus : Nothing SizeMB : 92 Compatibility : Version130 Collation : SQL_Latin1_General_CP1_CI_AS Owner : sa LastFullBackup : 10/11/2017 2:39:07 PM LastDiffBackup : 1/1/0001 12:00:00 AM LastLogBackup : 1/1/0001 12:00:00 AM [16:46:21][740.
Yet another post from the dbatools team, I’m Simone Bizzotto. Hit me up on Slack, I’m @niphlod.
The Problem Even the accidental DBA has to manage those pesky SQL Server Updates. Be it a bug fix, a security fix, a “new features” release, wellโฆ it needs to be installed.
Put auditor in the mix: what build are you on ? Put your bosses’ boss in the mix: is the farm still officially supported by MS ?
We’ve been working on our precon and we’re super excited to share the agenda with you!
In Case You Missed It dbatools teammates Constantine Kokkinos, Rob Sewell and I will be presenting a full-day session at PASS Summit in Seattle, WA, USA on Tuesday, October 31, 2017! Our precon will have a lab and we’re nearly at capacity โ you’ll need to sign up now to ensure a spot.
Major Contributors Shawn Melton, Sander Stad and Brandon Abshire will help proctor the docker-based SQL Server lab.
We’ve had a lot of people ask about the best way to schedule dbatools tasks in SQL Server Agent. I recently switched Agent from Task Scheduler and here’s what I learned.
tl;dr for those of you who just want to skip the commentary of pros vs cons and head straight to the tutorial, click Scheduling PowerShell Tasks using Agent’s CmdExec.
Task Scheduler Task Scheduler was decent but ultimately, not as cool as SQL Server Agent for a number of reasons:
Last month, I went through an audit that consumed every waking moment of my life. I would literally wake up, get ready for work, grab the three meals my wife made for me, go to work for 16-18 hours, come back, sleep then wake up, rinse, repeat. I tried to stay as healthy as possible by prioritizing sleep, taking vitamins, eating vegetarian meals that were easy to digest and drinking tea (and not energy drinks) as an energy source.
Not a Snoozefest You may be thinking “oh man, a post about testing. booooring!” I used to, too, but have since come around and now find that creating tests is actually a lot of fun ๐. I even have a personal goal that that every command touched by a PR gets a corresponding test. That way, we know the command works as expected and will continue to with each and every merge.