T-SQL Tuesday 73 – Naughty or Nice?

As you work with SQL Server look around you. Is your environment Naughty or Nice? If it is Naughty what’s wrong with it? What would you do to fix it? Do you have a scrooge that is giving you the Christmas chills? Perhaps you have servers of past, present, and future haunting you. Maybe you are looking at SQL Server 2016 like some bright shining star in the east.

Naughty DBA’s would manually delete a few of the bigger backup files to get the free space down to an acceptable level and go back to bed, leaving a potential time bomb for the next DBA.

Nice DBA’s always dig a little deeper. Maybe the backup jobs weren’t setup to remove old backup files like they were supposed to. The nice DBA would ensure that the backup jobs were set to automatically remove old backups like they are supposed to. Or maybe a new database was added and nobody expanded the backup drive to accommodate. The Nice DBA would request additional storage.

Naughty DBA’s first reaction is to rerun the job, and with a little bit of luck, the job runs fine when run manually. Naughty DBA goes back to bed…

Nice DBA’s dig a little deeper. They look into the SQL Agent job history to find that this same job has been failing every night for the past couple weeks, and the resolution has been to just rerun the job. Looking at the job schedule they notice that it is running at exactly the same time as another SQL Agent job, so they decide to move the schedule by a minute, and sure enough the job failures go away.

So be a nice DBA! Your teammates will thank you and you’ll probably get something really sweet from the big guy!


See also