The DBA 10 Commandments

There may end up being more or less than 10, but it’s a good biblical title, so we’ll try.

  1. Thou shalt not use the sa login.
    • If you need sysadmin rights, create a new account, rename the default, and/or use Windows auth.
  2. Thou shalt always have a rollback plan for production changes.
  3. Thou shalt NAME thy entities, objects, and relationships.  MEANINGFULLY.
    • Thou shalt not, in good conscience, use white-space or language-reserved characters in thy entity/object names.
  4. Thou shalt not use deprecated syntax or features, if at all possible.
  5. Thou shalt not use with (nolock) hints throughout your stored procedures.
  6. Thou shalt not use the between comparison operator with date/time datatypes.
    • Use greater-than-or-equal, and less-than, like so: @MyDate >= @StartDate and @MyDate < @EndDate, where @EndDate is the day after the last possible day you want to include.  It sounds more confusing than it really is.  You want the month of April 2017?  That’s just @MyDate >= '20170401' and @MyDate < '20170501'.  Simple.
  7. Thou shalt COMMENT.  ALWAYS.  At least on all “programmable” objects (stored procs, functions, triggers, views, user-defined types, etc.)
  8. Thou shalt not run the default MS built-in maintenance plans.  For the love of all things holy.
  9. Thou shalt not RDP into your SQL server just to run SSMS.  Set up your server correctly with remote connections & TCP/IP connectivity, and don’t touch it again.
  10. Thou shalt always share a beer with thy comrades after a long hard day of after-hours troubleshooting and/or production outages.  And if any are not present because they’re STILL on pager-duty, thou shalt raise thy flagons high and toast to their honor, for they shall be remembered unto the end of thy days.

That’s all I have for now… feel free to comment, suggest additions or changes, and send any hate-mail to my contact page!

Advertisements