It’s easy to get caught up in daily incidents, tickets, and special projects. Like a good scout, though, a core task in a DBA’s job is to be prepared. You have to set time aside in your schedule to:
1. Practice responding to corruption. Gail Shaw’s “Help, my database is corrupt, now what?” post should be on your bookmark toolbar. On your development server, stop the service, bust out a hex editor, and purposely break some of your database pages. Don’t try to figure out which pages you’re corrupting – act like your storage, and just trash random pages in the file. Then start the SQL Server back up, run DBCC CHECKDB, and follow Gail’s checklist.
2. Automate the restore of full and log backups. When problems strike and you have to restore a database, you don’t have time for the pain of clicking through GUIs. It gets even worse when multiple related databases are involved, or heaven forbid, all of the databases on the server. If you’ve got a third party backup tool, rehearse the complete rebuild of a database or a whole database server. If you’re using native backups, check out this MSSQLtips post on generating restore scripts from all the database files in a folder.
3. Set your monitoring tool’s thresholds. If you’ve got an Outlook rule to dump all of your alerts into a different folder, you’re losing the monitoring game. Spend time tweaking the thresholds so that you don’t get spammy alerts. The whole point of a good monitoring tool is that you get alerted when something is truly wrong, and you can take action before users figure things out. If an alert’s not actionable, it needs to go.
4. Take care of yourself. This job is about serving and protecting the data. When disaster strikes, you need to be practiced, ready, and in the zone. You can’t do that if you’re constantly fighting fires and working sixty hours a week. You have to set a hard stop, walk away, and recharge your batteries.
If you’re lucky enough to love what you do, then learning stuff and playing with company servers after hours can feel like a recharge. Sure, it’s even better than working – but never forget what you’re really working for. Work to live – don’t live to work.