Like many SQL Server DBAs I run into a problem at work or get an idea in my head then scour the internet to see if someone else had the same thing so I don’t have to reinvent the wheel. Some DBAs stop at that point, I don’t. I grab a script that serves my basic needs, test it out, rewrite it to be written as simple as possible while granting me every wish and desire I ever had on the process, then I save it off.
Beyond that, my biggest thing on SQL Server is base-lining and trending. A common issue you’ll run into is in the middle of a performance incident you’ll find a stat that seems off on your biggest, most critical server. The other servers don’t look like that, but they don’t have the hardware or the load so you don’t know if you should trust that or not. I’ve read before (I think from Brad McGehee?) that the only thing consistent between all database servers is making sure the power is turned on, and it’s right. You’re lost, and the only solution you have should have started over a week ago so you know what “normal” is for that server. Many of my scripts will rely on info being gathered every 1, 5, or 15 minutes and will, by default, compare the current snapshot to the same time window yesterday and the same day last week.
Finally, my personal approach to it all. I don’t take anything too seriously as it stifles creativity and sets you up for arguments on things not worth arguing about. Some people will tell you there’s a right way and a wrong way…they’re wrong. There are thousands of right ways and millions of wrong ways. There are times I’m wrong, and always another “right” way to handle the way I do everything I do. Don’t keep these things to yourself, tell me, yell at me, compliment me, suggest other ways. The purpose of this blog is to have a previous coworker stop calling me a leech while at the same time leech off of your critiques of my work.
Ask for anything. I may have a script written for it, I may write queries for it ad-hoc (rare event…if I wrote it, I saved it), and it may be a new concept I never considered before. In any case, if it’s worth me knowing then I’ll find a way to know it, and if I know it then there’s no reason not to tell the world.