1 / 14

Ten Things

Ten Things. You do that make SQL Server Cry. Jen McCown. Microsoft SQL Server MVP recipient SQL Server developer and DBA MidnightDBA.com Jen@MidnightDBA.com MidnightDBA.com/Jen Twitter.com/ MidnightDBA webshow.MidnightDBA.com Fridays 11pm CST. Overview: The 10 Things.

burke
Download Presentation

Ten Things

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. Ten Things You do that make SQL Server Cry

  2. Jen McCown • Microsoft SQL Server MVP recipient • SQL Server developer and DBA • MidnightDBA.com • Jen@MidnightDBA.com • MidnightDBA.com/Jen • Twitter.com/MidnightDBA • webshow.MidnightDBA.com Fridays 11pm CST

  3. Overview: The 10 Things • ! Understanding • Disk • Profiler • Indexing • Backups and maintenance • Design • Ugly code • ! Performance • ! Documentation • ! Testing

  4. Thing 1: Design • Unreadable names • Bad datatypes • Duplicate columns • Multipurpose columns • No relational integrity • And much, much more!

  5. Thing 2: Ugly Code • Ugly code is scary

  6. Thing 3: Performance • Cursors • Nested views • Lock hints • Just not bothering with it…

  7. Thing 4: ! Documentation • Nobody likes making documentation: • It's a pain • It gets out of date • Nobody reads it • “Don't need it!“ • "I can do it when the project is done!“ • “I'll document myself out of a job!"

  8. Thing 5: ! Testing • 1. Code on dev or on a sandbox. Don't make changes in production! • 2. Run your code...on dev. • 3. Script out your deployment, and test that. • 4. Have a rollback script, and test THAT. • 5. Especially if you don't have a decent QA, watch the changes in production. Remember, "it always runs fast on the dev box".

  9. Thing 6: ! Understanding • Know before you GO

  10. Thing 7: Disk • Disk Partition Alignment • RAID levels • Much more

  11. Thing 8: Profiler • Don’t run SQL Profiler on production • SQL Profiler can bring down production • Instead: Server Side Trace: The What, Why, and How bit.ly/19x2wBD

  12. Thing 9: ! Indexing • Huh. Apparently this is an “index” clipart. • Indexes are good! Use them… • But there's a balance. • Don't index every column of a table individually!

  13. Thing 10: ! Backups / Maintenance • You need backups • You need maintenance • You need alerting • Suggested: SQL Server Maintenance Solution http://ola.hallengren.com

  14. Other Resources • All session materials available at MidnightDBA.com/Jen • Contact me: • Jen@MidnightDBA.com • Twitter.com/MidnightDBA • Other resources: • MidnightDBA.com • SQLServerSamples.codeplex.com (AdventureWorks) • SSMSToolsPack.com • Ola.Hallengren.com

More Related