1 / 22

Top 10 Admin Mistakes on SQL Server

Top 10 Admin Mistakes on SQL Server. Kevin Kline Director of Engineering Services, SQL Sentry SQL Server MVP since 2003 Twitter, FB, LI: KEKline Blog: http://KevinEKline.com , http://ForITPros.com. Agenda. About SQL Sentry The Top 10 Countdown: DBA Mistakes on Microsoft SQL Server

phyre
Download Presentation

Top 10 Admin Mistakes on SQL Server

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Top 10 Admin Mistakes on SQL Server Kevin Kline Director of Engineering Services, SQL Sentry SQL Server MVP since 2003 Twitter, FB, LI: KEKline Blog: http://KevinEKline.com, http://ForITPros.com

  2. Agenda • About SQL Sentry • The Top 10 Countdown: DBA Mistakes on Microsoft SQL Server • Mistakes come in surprising forms • Often people & process, instead of technology • Summary, Resources, and Q&A

  3. For Friends of sql sentry • FreePlan Explorer download: http://www.sqlsentry.net/plan-explorer/ • Free query tuning consultations: http://answers.sqlperformance.com. • Free new ebook (regularly $10) to attendees. Send request to sales@sqlsentry.net. • SQL Server educational videos, scripts, and slides: http://SQLSentry.TV • Tuning blog: http://www.sqlperformance.com/ • Monthly eNews tips and tricks: http://www.sqlsentry.net/newsletter-archive.asp

  4. Tools from SQL Sentry

  5. Other Top SQL Server Mistakes Excludes SQL Server mistakes that are primarily development or design in nature: • Inadequate normalization and database design • Unknown scalability requirements • No baselines or benchmarks • Indexing issues • Query tuning ignorance

  6. 10. Disks – Thinking Space but not IO • Frequently think about disk subsystems only in terms of disk space, not IO load. • Without this knowledge, the following problems occur: • Inadequate fault tolerance • Insufficient IO: • OLTP requires high transactions/sec • OLAP requires high MB transfers/sec • Poor choice of RAID type, controllers, channels • Not enough disk spindles • SSD is a game changer for IO!

  7. 9. Business Ignorance • As the IT professional, you should know how SQL Server works at an “internals” level. • What is checkpoint? Lazywriter? • How is TempDB used? What’s in the plan cache? • The DBA is the guardian of the corporate data assets. • As the liaison between business and IT, you should know how and in what ways your servers are used. • Who cares if this app is down? How much does the downtime cost the company? • What are the business cycles? • When are the best downtimes? • Baseline? Benchmarks? What is normal? • For more tech info: • SQLPASS.org • SQL University • SQL Crunch • SQLBlog.com

  8. Bonus Blunder: Not Asking… • …for help: • Forums vs Support: know the value • #sqlhelp and Twitter • …for mentoring: • Senior bloggers love to mentor!

  9. 8. No Troubleshooting Methodology • When the chips are down, the DBA needs a strong, step-by-step methodology for root-cause analysis. Without one, you get: • Missed errors and problems • Errors resulting data loss and catastrophic failure • Poor response times and breached SLAs • Lost credibility • Don’t have a methodology? Check out End-to-End Troubleshooting on http://SQLSentry.TV • SQL Server Troubleshooting Guide by J. Kehayias on http://www.simple-talk.com

  10. Bonus Blunder: Reactive Not Proactive • DEMO

  11. Demo: Error Notifications

  12. 7. Going with the Defaults • SQL Server installation defaults are intended to get the server up and running, but not running optimally: • Auto-grow and Auto-shrink on databasese • Auto sizing of auto-growing databases • Default filegroups • Minor issues can become major issues: • MAXDOP • FILLFACTOR • Many server- and database-level configuration settings

  13. 6. Security as an Afterthought • SQL Injection is the #1 hack on the internet today. • Remarkably, we knew as much about preventing SQL Injection ten years ago as we do today. • Plan ahead of time to minimize issues: • Ensure the least privileges principle for applications running on your servers • How much surface area do your servers expose? • Who has access to your servers? • How do you find out the who, what, and when of a breach? • See my session Understanding & Preventing SQL Injection for more info

  14. 5. Inadequate Automation • Automation is the means by which DBAs work “smarter” instead of “harder”. Ironically, it takes a lot of work at the outset to automate. • Without automation, DBAs must deal with: • Manual processes prone to error, omission, and forgetfulness • Inability to scale environment to multiple servers • Time constraints from fire-fighter and script-pusher modes • Examples of working smarter instead of harder: • Automated error notification • Scheduled jobs • Lots of scripts, not too much GUI • Automation made easy with PowerShell and/or WMI: • PowerGUI • Scriptomatic

  15. 4. Wrong Feature or Technique for the Job • DBA’s are the “performance engineer” for their corporation’s IT applications. • It’s imperative that the most appropriate feature be applied to each business requirement. Otherwise: • Brittle applications • Applications complexity • Excess resource consumption • “Ooooh! Shiny!” • Design reflects the current “fad” • Axiom: There are no IT projects. There are business projects solved using IT.

  16. 3. Apathy about Change Management • Change management is important! Without it, DBAs face: • Changes that leave things worse than they started • Piecemeal rollbacks that cripple applications • Inconsistent support across applications and servers • Change control versus Change management? • Proper change management means: • Key stakeholders have a say in Go-NoGo (CM board) • Performed at pre-planned times and within a defined time limit • Change is tested and verified to have no effect or positive effect on production environment • Changes are isolated, atomic, and reversible

  17. 2. Inadequate Preventative Maintenance • Proper preventative maintenance (PM) helps you: • Catch issue before they become problems • Ensure optimal performance • Perform resource intensive operations with few, if any, users on the system • PM on SQL Server should include: • Database consistency checks (DBCC) and CHECKIDENT • Backups with verification & Restore checks • Defragmentation, Fill factor, Pad Index • Index Statistics • Don’t rely on the Database Maintenance Wizard!

  18. Bonus Blunder: Reinventing the Wheel • Most PM has already been written and vetted by others. • Check out: • www.sqlfool.com • www.olahallengren.com

  19. 1. Backups <> Recovery DBAs often don’t test backups or recoveries as they should. Causes lots of problems: • Can you meet your SLA? RTO? RPO? • Not certain that backups are good: verified and available? • Where’s all the data, files, DLLs, etc for recovery? • Got all of the databases that are needed? • Haven’t tested a full, ground-up restore: • What if you have to reinstall everything? • One of the great things about VM recovery! • The importance of recovery: the Lost Job scenario • Can you actually restore older, archived data? It’s All About The Data, All The Time, Every Time

  20. Summary • 1. Only a few big DBA blunders are due to tech skills: • Disks as space, not IO • No troubleshooting methodology • Going with the defaults • 2. Most DBA blunders are due to process and business issues: • Security as an afterthought • Wrong features • Change management • Preventative maintenance/automation • Backups <> Recovery

  21. Resources • http://www.sqlcat.com - Excellent source of SQL Server best practices, white papers, etc. • Paul Randal and all the blogs at SQLSkills – http://www.sqlskills.com/blogs/paul/ et al • http://SQLPerformance.com • http://www.sqlpass.org

  22. Q & A • Send questions to me at: kkline@sqlsentry.net • Twitter, Facebook, LinkedIn at KEKline • Slides at http://SQLSentry.TV • Kevin’s IT leadership and soft-skills content at http://ForITPros.com THANK YOU!

More Related