Years ago, I wrote Watch-DbaDbLogin which keeps an inventory of accounts, hosts and programs that log into a SQL Server. It was pretty crude, but helped immensely during my migration, as this inventory ensured that my documentation was in order and no unexpected downtime would occur.
I found that about 80-90% of logins/applications were covered within 48-hours, but two months of data gave me total confidence.
I always wanted to update the command, though I’m not sure Watch-DbaDbLogin is still within the scope of the module.
Last week I performed a server migration from SQL Server 2014 to SQL Server 2016 using dbatools. A lot of work is done up front to prepare and plan for these migrations to have the least impact on our customers. So I always do my best to improve the process each time we do it.
Backstory This is the second product server we have migrated to SQL 2016. The first migration had automation to a certain point.
Back around the time we did SQL Bits, Rob Sewell spoke to Richard Campbell at RunAs Radio.
The show, Managing SQL Server using dbatools with Rob Sewell, is a fun and fantastic listen. Not only does Rob talk at length about the migration capabilities in dbatools, but also other cool things like CI/CD, containers and more. Check it out!
Happy Belated World Backup Day! I wish it was Backup and Restore Day, Test Your Backups Day, or World Recoverability Day, but alas.
I’m currently working on my portion of the effort to get dbatools to 1.0 – integration tests for our commands. And while I wait for AppVeyor to run all of our tests, I’ve got a few minutes to post.
Initially, I wanted to highlight our Backup/Restore commands but there are sooo many, it’d take a few days to write about them.
Nearly every time I inherit a SQL Server environment, I’m only given a partial list of SQL Servers that exist on the network. It’s my usual routine to get permission to sniff the network then run about five different programs including Idera’s SQL Discovery and Microsoft’s SQL Server Assessment and Planning Toolkit.
I always thought it’d be cool to have one comprehensive PowerShell command that could do the work of all the above and was ecstatic to see NetSPI’s Scott Sutherland had written a few commands to do just that in his awesome PowerShell module PowerUpSQL.
I’ve been working on a project this year to upgrade SQL Server versions for around 80 application databases, with most of the upgrades requiring both SQL Server and Windows Server upgrades to get to the future state we were looking for. The general process for each of these was to build a new virtual machine with the upgraded operating system, install the desired SQL Server version and then migrate the application databases during an arranged downtime window.
An Issue Defined In software development, an “issue” can be anything from you hit an error running an application or you get an unexpected result from an operation. You can also say an issue is a spelling error in our documentation. Our goal is to fix any “issue” whether it is a bug, an unexpected error (especially these) or considering a feature you think is missing from the module.
However, before we can fix it…you have to let us know.
Nearly two years ago, I wrote that as a open source GPL-licensed project, dbatools was free as in speech and free as in beer.
I chose the GNU GPL for nostalgic reasons and I also wanted companies who used dbatools to contribute back to the project. What I didn’t realize was that licensing dbatools as GPL would hurt integration which ultimately impacts adoption. Permissive licenses like the MIT do not subject users to such restrictions.
Gianluca Sartori and I recently presented Simplifying Extended Events with dbatools at SQL Bits and we had a lot of fun. Not only that, we helped convince several people to switch! Honestly, when we proposed the session, I was totally #TeamProfiler. I figured if PowerShell didn’t convince me, I would let people know where I stood, but I was open to switching teams.
Slides | Code | Video
SQLBits was awesome!
dbachecks is a new PowerShell module from the SQL Server Community! For more information, read introducing dbachecks.
As of version v1.0, dbachecks contains 15 commands. This article provides an overview of these commands. Rob Sewell offers a fantastic deep-dive article that explains the commands below in greater depth.
Usage Usage can be approached in two ways:
Run Directly From the Command Line As simple as Invoke-DbcCheck -SqlInstance sqlprod01 -Checks SuspectPage, LastBackup
In mid-December, we began working on a new PowerShell module for the SQL Server Community. This free and open-source project can be found in the SQL Server Community Collaborative’s repository. Contributions from the community are welcomed and encouraged!
Intro dbachecks is a framework created by and for SQL Server pros who need to validate their environments. Basically, we all share similar checklists and mostly just the server names and RPO/RTO/etc change.
A number of dbatools contributors will be presenting at SQL Bits next week in London! To start, Rob Sewell and I will be presenting a PowerShell and dbatools heavy precon on Wednesday.
Precon Reliable, Repeatable, & Automated: PowerShell for DBAs Automating and testing your SQL Server environment has never been easier. Now you can put down your manual checklists and skillfully:
Track SQL Server instance configurations Promptly provide required information to managmement, change configuration or developers Deftly respond to audit change requirements across your entire estate (and impress your auditor with PowerShell; it happened to us!
In today’s post, I will tell you about how we managed to successfully complete a migration during a ~12 hour maintenance window. This could have taken a LOT longer if we didn’t have dbatools to automate several of the steps.
Although I will not go in to every detail about our process, I want to emphasize the areas were we chose to use dbatools to make our lives easier.
The Goal Recently, we got the green light for upgrading to SQL Server 2016 and we were ready to roll.
We have now reached more than 370 public functions and nearly 1000 unit and integration tests, all thanks to over 100 community contributors!
As you may have noticed, we release a 0.9.x update with bug fixes and new features almost daily, so why haven’t we released 1.0 yet?
Shifting From “A Bag of Functions” to a Proper Module We love new functionality, of course, but we must take a step back from new development and consolidate what we have in a properly usable module.
Today’s blog post is part of T-SQL Tuesday. T-SQL Tuesday is the brainchild of Adam Machanic. It is a blog party on the second Tuesday of each month. Everyone is welcomed to participate.
This month’s T-SQL Tuesday, hosted by Arun Sirpal (blog|twitter), is all about overcoming technical challenges.
The Challenge I always try to solve my technical issues with natively available (aka Microsoft) solutions. It’s one of the many reasons I love PowerShell.
Pétur Grétarsson, here. Long time dbatools fan, first time blogger. I really love the new Invoke-DbaQuery command and wanted to share how I use it.
I have well over 100 Availability Groups to look after in different domains so it can be a bit difficult to check things when needed. We have opened required ports allowing connections from one SQL management server to those for monitoring purposes including using Idera SQL Inventory Manager for basic health checks.
We’ve updated the site a bit and wanted to let you know.
Getting Started Finally! The Getting Started page has accurate information, way more code samples and useful links. So if you’re a bit lost wondering where to start, I included a slightly modified version of the code I often show at conferences. This code in particular was heavily updated just a few weeks ago for the dbatools presentation in Glasgow.
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 (my favourite is this post by June Blender), 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.