• SQL Server
  • Log Shipping Tricks Demo
  • SQLCruise Alaska 2012 Pics
SQLSoldier News From the Frontlines

Why We Follow Best Practices

February 26, 2012 10:55 am / 2 Comments / SQLSoldier

Why We Follow Best Practices

Best Practices

Best Practices


There are many reasons why we follow best practices. My own reasons have changed over the course of my career. Early in my career as a database developer and then later as a new DBA, I followed best practices because people who claimed to know more about SQL Server said to, and I assumed that their advice would be better than my own.

This of course led to me adopting the best ractice of not following the advice of someone simply because they claimed to know more than others. I learned that you needed to evaluate the source that it was coming from. I don’t even take best practices from Microsoft itself as gospel. Having worked at Microsoft for many years, I can assure you that internally, we don’t all agree on certain practices. I have heard from people who set all of their OLTP SQL Servers to MAXDOP = 1 because an engineer in PSS (Microsoft’s Premier Support Services) told them this was the best practice for fixing CXPacket waits and they should always use this on an OLTP server. I’m not going to go into detail in this post on why this is a bad recommendation (read my post The Barking Dog Analogy if you want to know why I say this). My point is that it is not always easy to know who you can trust for best practices.

I’m not by any means trying to disparage PSS and its engineers. They have some truly brilliant guys working there, and I advise people to open a case with them quite frequently. I was just demonstrating that even noramlly reliable sources can distribute bad practices as good. At some point in my career, I came to the realization that for most reported best practices I could find posted on the internet, with just a little more reasearch, I could find the exact opposite advice posted as a best practice on another website or blog. In addition to figuring out who I could trust for best practices, I started developing the skill of evaluating the best practice myself to determine if what they were saying agreed with what I could prove. In short, I learned the value of testing before implementing.

Dilbert by Scott Adams (www.dilbert.com)

Dilbert by Scott Adams (www.dilbert.com)

The skill of being able to verify a best practice is critical for DBAs. At some point, we all are faced with others recommending a bad best practice to management and management buying in to it. You either need to have already proven that the practice would be bad or be able to prove it now. A number of times I have won out over the bad practice by saying, “Let’s try it in test and see what happens.” This only works if you make sure that the proper scenarios are run in test so that it is accurately evaluated. Other times, I already had empirical data to back me up. If management doesn’t understand the technology, it’s very easy for them to buy in to a bad practice because they are relying on us to advise them of these things. I have found that it is very easy to get management on your side when it’s a case of the other side “read it on a blog somewhere” versus you “have real data showing that it would be bad.”

At some point, I started cultivating my own set of best practices. Ultimately, it’s a culmination of what I have learned from others, my own experiences, my own tests, and my understanding of how SQL operates internally. I have also learned to tailor my best practices to the audience. I was the SQL technical lead on an operations team at Microsoft and most of the operations engineers on the team were not DBAs. I spent a fair amount of time trying to tech them best practices. When talking to non-DBAs, I will give them a different set of best practices than i would to experienced DBAs. For example, I would tell a non-DBA to create one data file per CPU for tempdb so they can avoid the possibility of tempdb contention altogether. Conversely, I would tell an experienced DBA that they should start with 1 data file for every 2 or 4 CPUs for tempdb, monitor for tempdb contention, and adjust if needed. I also held monthly training sessions for non-DBAs where I tried to educate them on things like tempdb contention to try to elevate their SQL Server knowledge level.

Demystifying Database Administration Best Practices

Being able to develop and evaluate best practices is a critical skill for DBAs. That’s one reason that fellow Certified Master (MCM) Argenis Fernandez (blog|@DBArgenis) and I are doing a pre-con at SQLRally on May 9th called Demystifying Database Administration Best Practices. This training will cover more than simply enumerating best practices. We will show you how why they are best practices and show you how to evaluate best practices themselves.

More info:

Our pre-con: Demystifying Database Administration Best Practices
Pre-con schedule: PASS SQLRally Dallas 2012: Pre-Conference Sessions
SQLRally homepage: Join Us in Dallas for PASS SQLRally 2012

SQL Rally 2012, May 10 = 11, Dallas, TX

SQL Rally 2012, May 10 = 11, Dallas, TX

Posted in: SQL Server / Tagged: Internals, MCM, SQLRally, Tips & Tricks, Troubleshooting

2 Thoughts on “Why We Follow Best Practices”

  1. Pingback: Something for the Weekend – SQL Server Links 02/03/12

  2. Pingback: Argenis Fernandez : SQL Pre-Con…at the Beach

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation

← Previous Post
Next Post →
<

Remote DBA Services
- serious SQL Server expertise for less than a full-time DBA
My Articles
 
My Book
Check out my interview on

Extreme Data Recovery (with Argenis Fernandez)
10 Things all BI System Administrators Should Know
Upcoming Events
    All events shown in Pacific Time

    No events to show

RSS My SQL Server Magazine Articles

  • Database Mirroring for Disaster Recovery September 16, 2011
  • Comparative Review: Database Schema Comparison Tools August 24, 2011
  • 3 Log Shipping Techniques June 22, 2011
  • Hardening SQL Server June 20, 2011
  • Review: ScriptLogic Security Explorer for SQL Server February 8, 2011

Tags

31 Days of Disaster Recovery Architecture Automation CDC & Change Tracking Data Architecture VC Database Mirroring DBCC Denali Disaster Recovery Dynamic Management Views Extended Events Gamers & Geeks General Discussion High Availability How do I ... ? Humor Idera ACE Program Internals MCM Meme Monday Performance & Optimization PowerShell Professional Development Replication Security SQLBits SQL PASS SQL PASS Summit SQLRally SQL Saturday SQL Server Magazine SQL University SSAS & BI SSIS SSMS SSRS T-SQL T-SQL Tuesday tempDB Tips & Tricks Travel Troubleshooting Undocumented Stuff Whitepapers XML in SQL

News

Download my Powershell Scripts

The following scripts can be downloaded as text files. You will need to change the file extension to .ps1 in order to execute them.

Backup a database
Restore a database
Scan a server to find a free port
Query DNS to get the FQDN of a server


To see some examples of my other forms of writing, please visit my page on WritersCafe.org. It is almost exclusively horror fiction, but I sometimes throw other things in there too from time to time. There's one science fiction story, a couple of poems, and quite a few humor pieces as well.


Look for me in the SQL Q&A section of the August, 2007 issue of TechNet Magazine.
August issue of TechNet Magazine's SQL Q&A column

Protect our Heroes

© Copyright 2012 - Robert L Davis
Infinity Theme by DesignCoral / WordPress

Twitter Twitter 
LinkedIn LinkedIn 
TLF TLF RSS RSS 
WritersCafe WritersCafe 
SQLPASS SQLPASS 
Facebook Facebook
grab this