For our final chapter, we will apply dynamic SQL to one of its most fitting applications: the care and maintenance of our SQL Servers and databases. These tasks are all too often associated with hard-coded, hacked, messy T-SQL that is written to be forgotten. Of all the places where a developer might copy and paste code from a dubious source, this is the most common.
Our goal is to create a set of scripts that can perform important tasks and do so in a scalable, reusable, and maintainable fashion. We want tools that are easy to use and simple to customize. Each application presented in this ...