How Not to be a Cranky DBAMike’s Top Ten Rules for Managing a Production Environment
Mike Hillwig—  AKA The Cranky DBA—  SQL Server DBA—  Working with SQL Server since SQL 7
Mike Hillwig—  Senior DBA at hosting division of a financial software company—  Working as the lone SQL DBA in an army o...
Photo Credit: Nedra Isenberg
`
Obligatory Social Networking Slide—  crankydba.com—  sqlserverpedia.com—  twitter.com/mikehillwig
No Need for NotesBlog post and slide deck will be available later today
Today’s Format
What Makes a DBA Cranky—  Fixing Unnecessary Mistakes—  Lack of Sleep—  Answering Redundant Questions—  Repeating Manu...
Why Does This Make Us Cranky?
We Would Rather—  Spend time with our    families—  Read—  Sleep—  Play Angry Birds—  Eat Bacon—  Anything other tha...
The Tips
Beware of the Blogs—  There is some amazing    advice out there. But…—  Anybody can put bad advice    on the internet— ...
Don’t enable Auto Shrink. Ever.—  This is my only exception    to “NEVER” advice—  You can’t control when it    runs—  ...
Triggers don’t’ send mail—  Does it need to be now, now, right this very moment,    now?—  Connecting to an outside appl...
Developers Don’t Touch Production—  Developers like to “fix”    problems.—  Changes must be tested    before moving into...
Ask questions like an auditor—  “What would Sandra say?”—  What is our risk exposure?—  Are there any security concerns...
Consistency is Key—  Versions                —  Easier to Troubleshoot—  Configurations          —  Easier to Remember...
Master the SQL Agent—  Easily automate manual tasks—  Run scripts regularly and have them alert you to    conditions—  ...
Use Instant File Initialization—  Prevents waiting for a file to grow—  Makes RESTOREs run faster—  Creating new databa...
Plan for when things go bump in thenight—  And they do go bump in the night—  Have a regular troubleshooting script for ...
Set Min and Max RAM—  Extremely important in virtual environments—  MIN allows you to be greedy—  MAX gives the OS brea...
Your server is not a workstation— Avoid Remote   Desktop— Don’t run SSMS   directly from your   server— Instead: Run fr...
Set your file growth increments—  Defy the defaults!—  Growth is an ALTER, which is a database lock, which is a    perfo...
Test restores. Frequently.—  Easily automated—  The worst time to test a restore is when your    production server fails...
Reserved words are just that,reserved—  Reserved words as column names make writing queries    harder—  [avoid this]—  ...
Limit access to SA and serviceaccount passwords—  Not everyone needs to connect as SA—  Why? Why? Why must anyone have i...
Database servers are that and thatalone.—  Databases are the foundation of most critical business    applications—  If t...
Questions
MoreBlog Post at crankydba.com/go/sqlsat121
How Not to be a Cranky DBA
How Not to be a Cranky DBA
How Not to be a Cranky DBA
How Not to be a Cranky DBA
How Not to be a Cranky DBA
How Not to be a Cranky DBA
How Not to be a Cranky DBA
How Not to be a Cranky DBA
Upcoming SlideShare
Loading in …5
×

How Not to be a Cranky DBA

1,199 views

Published on

Mike's How Not to be a Cranky DBA at SQL Saturday 121 in Philadelphia.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,199
On SlideShare
0
From Embeds
0
Number of Embeds
435
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

How Not to be a Cranky DBA

  1. 1. How Not to be a Cranky DBAMike’s Top Ten Rules for Managing a Production Environment
  2. 2. Mike Hillwig—  AKA The Cranky DBA—  SQL Server DBA—  Working with SQL Server since SQL 7
  3. 3. Mike Hillwig—  Senior DBA at hosting division of a financial software company—  Working as the lone SQL DBA in an army of Oracle DBAs—  Resume includes Acme Packet, Shawmut Design and Construction, Equitable Resources
  4. 4. Photo Credit: Nedra Isenberg
  5. 5. `
  6. 6. Obligatory Social Networking Slide—  crankydba.com—  sqlserverpedia.com—  twitter.com/mikehillwig
  7. 7. No Need for NotesBlog post and slide deck will be available later today
  8. 8. Today’s Format
  9. 9. What Makes a DBA Cranky—  Fixing Unnecessary Mistakes—  Lack of Sleep—  Answering Redundant Questions—  Repeating Manual Processes—  Performance Problems—  Waiting—  Unnecessary Emergencies
  10. 10. Why Does This Make Us Cranky?
  11. 11. We Would Rather—  Spend time with our families—  Read—  Sleep—  Play Angry Birds—  Eat Bacon—  Anything other than work
  12. 12. The Tips
  13. 13. Beware of the Blogs—  There is some amazing advice out there. But…—  Anybody can put bad advice on the internet—  Trust people you know—  I don’t trust people who say “ALWAYS” or “NEVER”—  Test everything in your own test environment first.
  14. 14. Don’t enable Auto Shrink. Ever.—  This is my only exception to “NEVER” advice—  You can’t control when it runs—  What you shrink will just grow again—  Fragments your indexes—  Instead: Use DBCC Shrinkfile and then rebuild your indexes
  15. 15. Triggers don’t’ send mail—  Does it need to be now, now, right this very moment, now?—  Connecting to an outside application is costly for performance—  If the mail server is down, users get ugly results.—  What happens if mail XPs get disabled?—  Instead, write to a queue table and have a SQL Agent job process the queue.
  16. 16. Developers Don’t Touch Production—  Developers like to “fix” problems.—  Changes must be tested before moving into production.—  Every environment needs a gatekeeper/traffic cop—  You ARE using source control, right?
  17. 17. Ask questions like an auditor—  “What would Sandra say?”—  What is our risk exposure?—  Are there any security concerns?—  Will this pose any compliance problems?—  Does this touch anything financial?—  Don’t be afraid to ask your auditor
  18. 18. Consistency is Key—  Versions —  Easier to Troubleshoot—  Configurations —  Easier to Remember What’s Where—  Maintenance Processes —  Leverage the SQL Agent MSX Server
  19. 19. Master the SQL Agent—  Easily automate manual tasks—  Run scripts regularly and have them alert you to conditions—  Severity alerts are your friend—  Use Multi-Server Administration
  20. 20. Use Instant File Initialization—  Prevents waiting for a file to grow—  Makes RESTOREs run faster—  Creating new databases is much faster
  21. 21. Plan for when things go bump in thenight—  And they do go bump in the night—  Have a regular troubleshooting script for databases and applications for your first-level support—  Give common errors and how to resolve them—  Tailor your alerts to indicate which items require immediate attention and which should be flagged for next-day resolution
  22. 22. Set Min and Max RAM—  Extremely important in virtual environments—  MIN allows you to be greedy—  MAX gives the OS breathing room
  23. 23. Your server is not a workstation— Avoid Remote Desktop— Don’t run SSMS directly from your server— Instead: Run from a workstation— RUNAS is your friend
  24. 24. Set your file growth increments—  Defy the defaults!—  Growth is an ALTER, which is a database lock, which is a performance issue—  More growths = fragmentation—  Log growths = high VLFs—  Better yet, monitor regularly and grow files manually
  25. 25. Test restores. Frequently.—  Easily automated—  The worst time to test a restore is when your production server fails—  It’s good practice for when something does fail—  Don’t forget to test recovering from long-term storage—  Test recovering to a specific point in time as well as key business processes
  26. 26. Reserved words are just that,reserved—  Reserved words as column names make writing queries harder—  [avoid this]—  If it turns blue in SSMS, try something else—  Common offenses: —  SECURITY —  STATUS —  IDENTITY
  27. 27. Limit access to SA and serviceaccount passwords—  Not everyone needs to connect as SA—  Why? Why? Why must anyone have it?—  More hands = less control—  Does the application really need to connect as SA?—  Don’t be afraid to fight with the vendor—  Avoid Mixed Authentication Mode where possible—  Embrace AD authentication
  28. 28. Database servers are that and thatalone.—  Databases are the foundation of most critical business applications—  If the database server is slow, everything else is slow—  Web servers, SSRS, SSAS, and SSIS go on a different box—  Keeps server optimized for running databases—  It’s okay to be greedy with system resources
  29. 29. Questions
  30. 30. MoreBlog Post at crankydba.com/go/sqlsat121

×