SlideShare a Scribd company logo
1 of 32
Defy the Defaults
Mike Hillwig
Boston, MA
Mike Hillwig

 AKA The Cranky DBA
 SQL Server DBA
 Working with SQL Server since SQL 7
 Senior DBA at hosting division of a financial
  software company
 Resume includes Acme Packet, Shawmut
  Design and Construction, Weirton Steel,
  Equitable Resources
Obligatory Social Networking Slide

 crankydba.com
 sqlserverpedia.com
 twitter.com/mikehillwig
 anysocialmediasite/mikehillwig
Housekeeping

 Slides and scripts at sqlsaturday.com
 Blog post at
  crankydba.com/go/defaults
 Don’t let me talk too fast
 Please complete your evaluations
Beware of the Blogs


 There is some             Test everything in
  amazing advice out         your own test
  there. But…                environment first.
 Anybody can put bad       I don’t trust people
  advice on the internet     who say “ALWAYS” or
 Trust people you           “NEVER”
  know
 Assume I’m an idiot
Today’s Agenda

       Server Configuration
       Pre-Installation
       Installation
       Database Creation
       Memory Management
       SQL Agent Jobs
       Don’t Touch That!

       10/6/2012
15 |             SQL Saturday 171 Pittsburgh, PA
       |
Before You Touch the Install Media

   Look at your drive
    configurations
   Have a place to put
    different types of files
             Data
             Tlogs
             Pagefile
             TempDB
             Backups

       10/6/2012
16 |             SQL Saturday #171 Pittsburgh
       |
Enabling Instant File Initialization

 Not exactly a SQL
  setting
 Changing a default
  policy object
 Allowing your service
  account to Perform
  Volume Maintenance
  Tasks allows you to
  use IFI
What are we installing?

                     Resist the urge to
                      Select All
                     Only install what you
                      need
                     More options need
                      more resources
                     Bigger surface area
                      means more surfaces
                      to attack
Where are we installing it?

 I don’t like installing
  anything on C.
 Have a drive
  dedicated to holding
  binaries/applications
Understand the Instance Root

                    This is where most of
                     your files will live,
                     including logs and
                     system files
                    Avoid putting these in
                     the same place as
                     your binaries
Our First Chance to get Security Right

 Do you need mixed
  authentication?
 Who will be an
  administrator on this
  instance?
 Use AD groups where
  possible.
 Add your service
  account here.
What Goes Where?

                    Splitting things up can
                     be a boost to
                     performance
                    Keep your paths
                     consistent
                    I strongly encourage
                     you to put data and
                     backups on different
                     physical disks/LUNs
Creating a New Database

                   Who owns the
                    database? That
                    account is the default
                    for dbo.
                   Look at your initial file
                    sizes and growth
                    increments.
                   If it’s going to grow,
                    start big out of the
                    gate
Let it Grow!

 This is one is
  important to me.
 This gets changed in
  every instance I
  manage
 Avoid disk
  fragmentation
 Can you come up
  with a better default
  setting?
Instance RAM

                MIN = 0 allows you to
                 get ballooned
                MAX = 2 TB allows
                 you to page
                Do you have any
                 servers with 2 TB of
                 RAM?
                Subtract 4-8 GB from
                 physical RAM as a
                 starting point for MAX
SQL Agent Job Ownership

                  This is a deadly default.
                  I’ve seen this one kill
                   servers
                  If the owner is disabled,
                   the job stops running.
                  In my environments,
                   this is always a system
                   or service account.
Don’t Touch That!
Remember this guy?
Auto Shrink

   Autoshrink is evil
   Don’t enable it. Ever.
   Why? Because Paul says so.
   crankydba.com/go/autoshrink
MAX DOP

 There is some bad information out there
  about setting your Max Degrees of
  Parallelism.
 Typically only needs to be changed in fringe
  cases. You’re probably not a fringe case.
 If changing this setting helps, you’re probably
  just masking a bigger problem with your
  code.
“Bottom Three” Server Security Settings

 Do you understand
  these settings?
 I’ve seen C2 kill
  servers with
  excessive logging
 I advise touching
  these settings only
  when you know
  specifically you need
  them.

More Related Content

Similar to Defy the Defaults

Connections install in 45 mins
Connections install in 45 minsConnections install in 45 mins
Connections install in 45 minsSharon James
 
How Not to be a Cranky DBA
How Not to be a Cranky DBAHow Not to be a Cranky DBA
How Not to be a Cranky DBAMike Hillwig
 
Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014Antonios Chatzipavlis
 
Sai devops - the art of being specializing generalist
Sai   devops - the art of being specializing generalistSai   devops - the art of being specializing generalist
Sai devops - the art of being specializing generalistOdd-e
 
How not to be a cranky dba
How not to be a cranky dbaHow not to be a cranky dba
How not to be a cranky dbaMike Hillwig
 
Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...
Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...
Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...Citrix
 
Geezeo AWS Presentation
Geezeo AWS PresentationGeezeo AWS Presentation
Geezeo AWS Presentationtparlin
 
Automating Oracle Database deployment with Amazon Web Services, fabric, and boto
Automating Oracle Database deployment with Amazon Web Services, fabric, and botoAutomating Oracle Database deployment with Amazon Web Services, fabric, and boto
Automating Oracle Database deployment with Amazon Web Services, fabric, and botomjbommar
 
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent OzarGeek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent OzarIDERA Software
 
Building your first sql server cluster
Building your first sql server clusterBuilding your first sql server cluster
Building your first sql server clusterJoseph D'Antoni
 
Austin Web Architecture
Austin Web ArchitectureAustin Web Architecture
Austin Web Architecturejoaquincasares
 
MySQL HA Presentation
MySQL HA PresentationMySQL HA Presentation
MySQL HA Presentationpapablues
 
Online Reporting Architectures Behind Load Balancers
Online Reporting Architectures Behind Load BalancersOnline Reporting Architectures Behind Load Balancers
Online Reporting Architectures Behind Load BalancersCrystal Foor Manson
 
The Key to Effective Analytics: Fast-Returning Queries
The Key to Effective Analytics: Fast-Returning QueriesThe Key to Effective Analytics: Fast-Returning Queries
The Key to Effective Analytics: Fast-Returning QueriesEric Kavanagh
 
Scalable Architecture 101
Scalable Architecture 101Scalable Architecture 101
Scalable Architecture 101Mike Willbanks
 
What is your sql server backup strategy tech_republic
What is your sql server backup strategy    tech_republicWhat is your sql server backup strategy    tech_republic
What is your sql server backup strategy tech_republicKaing Menglieng
 
Diskeeper 2009 Testimonials
Diskeeper 2009 TestimonialsDiskeeper 2009 Testimonials
Diskeeper 2009 TestimonialsDiskeeper
 
Domino server and application performance in the real world
Domino server and application performance in the real worldDomino server and application performance in the real world
Domino server and application performance in the real worlddominion
 
Real world experience with provisioning services
Real world experience with provisioning servicesReal world experience with provisioning services
Real world experience with provisioning servicesCitrix
 
Large Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint DeploymentsLarge Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint DeploymentsJoel Oleson
 

Similar to Defy the Defaults (20)

Connections install in 45 mins
Connections install in 45 minsConnections install in 45 mins
Connections install in 45 mins
 
How Not to be a Cranky DBA
How Not to be a Cranky DBAHow Not to be a Cranky DBA
How Not to be a Cranky DBA
 
Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014
 
Sai devops - the art of being specializing generalist
Sai   devops - the art of being specializing generalistSai   devops - the art of being specializing generalist
Sai devops - the art of being specializing generalist
 
How not to be a cranky dba
How not to be a cranky dbaHow not to be a cranky dba
How not to be a cranky dba
 
Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...
Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...
Synergy 2015 Session Slides: SYN408 XenDesktop 7.6 Architecture - Dealing Wit...
 
Geezeo AWS Presentation
Geezeo AWS PresentationGeezeo AWS Presentation
Geezeo AWS Presentation
 
Automating Oracle Database deployment with Amazon Web Services, fabric, and boto
Automating Oracle Database deployment with Amazon Web Services, fabric, and botoAutomating Oracle Database deployment with Amazon Web Services, fabric, and boto
Automating Oracle Database deployment with Amazon Web Services, fabric, and boto
 
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent OzarGeek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
Geek Sync | Planning a SQL Server to Azure Migration in 2021 - Brent Ozar
 
Building your first sql server cluster
Building your first sql server clusterBuilding your first sql server cluster
Building your first sql server cluster
 
Austin Web Architecture
Austin Web ArchitectureAustin Web Architecture
Austin Web Architecture
 
MySQL HA Presentation
MySQL HA PresentationMySQL HA Presentation
MySQL HA Presentation
 
Online Reporting Architectures Behind Load Balancers
Online Reporting Architectures Behind Load BalancersOnline Reporting Architectures Behind Load Balancers
Online Reporting Architectures Behind Load Balancers
 
The Key to Effective Analytics: Fast-Returning Queries
The Key to Effective Analytics: Fast-Returning QueriesThe Key to Effective Analytics: Fast-Returning Queries
The Key to Effective Analytics: Fast-Returning Queries
 
Scalable Architecture 101
Scalable Architecture 101Scalable Architecture 101
Scalable Architecture 101
 
What is your sql server backup strategy tech_republic
What is your sql server backup strategy    tech_republicWhat is your sql server backup strategy    tech_republic
What is your sql server backup strategy tech_republic
 
Diskeeper 2009 Testimonials
Diskeeper 2009 TestimonialsDiskeeper 2009 Testimonials
Diskeeper 2009 Testimonials
 
Domino server and application performance in the real world
Domino server and application performance in the real worldDomino server and application performance in the real world
Domino server and application performance in the real world
 
Real world experience with provisioning services
Real world experience with provisioning servicesReal world experience with provisioning services
Real world experience with provisioning services
 
Large Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint DeploymentsLarge Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint Deployments
 

More from Mike Hillwig

SQL Phone Home: Teaching Your SQL Servers to Call for Help
SQL Phone Home: Teaching Your SQL Servers to Call for HelpSQL Phone Home: Teaching Your SQL Servers to Call for Help
SQL Phone Home: Teaching Your SQL Servers to Call for HelpMike Hillwig
 
Do More With Less: SQL Central Management Server and Multi-Server Administration
Do More With Less: SQL Central Management Server and Multi-Server AdministrationDo More With Less: SQL Central Management Server and Multi-Server Administration
Do More With Less: SQL Central Management Server and Multi-Server AdministrationMike Hillwig
 
Recovery and backup for beginners
Recovery and backup for beginnersRecovery and backup for beginners
Recovery and backup for beginnersMike Hillwig
 
Seven Jobs You Should Be Running #sqlsat126
Seven Jobs You Should Be Running #sqlsat126Seven Jobs You Should Be Running #sqlsat126
Seven Jobs You Should Be Running #sqlsat126Mike Hillwig
 
New Server in an Hour #sqlsat121
New Server in an Hour #sqlsat121New Server in an Hour #sqlsat121
New Server in an Hour #sqlsat121Mike Hillwig
 
New Server in an Hour
New Server in an HourNew Server in an Hour
New Server in an HourMike Hillwig
 

More from Mike Hillwig (9)

SQL Phone Home: Teaching Your SQL Servers to Call for Help
SQL Phone Home: Teaching Your SQL Servers to Call for HelpSQL Phone Home: Teaching Your SQL Servers to Call for Help
SQL Phone Home: Teaching Your SQL Servers to Call for Help
 
Closing
ClosingClosing
Closing
 
Opening
OpeningOpening
Opening
 
Do More With Less: SQL Central Management Server and Multi-Server Administration
Do More With Less: SQL Central Management Server and Multi-Server AdministrationDo More With Less: SQL Central Management Server and Multi-Server Administration
Do More With Less: SQL Central Management Server and Multi-Server Administration
 
Recovery and backup for beginners
Recovery and backup for beginnersRecovery and backup for beginners
Recovery and backup for beginners
 
What the VLF
What the VLFWhat the VLF
What the VLF
 
Seven Jobs You Should Be Running #sqlsat126
Seven Jobs You Should Be Running #sqlsat126Seven Jobs You Should Be Running #sqlsat126
Seven Jobs You Should Be Running #sqlsat126
 
New Server in an Hour #sqlsat121
New Server in an Hour #sqlsat121New Server in an Hour #sqlsat121
New Server in an Hour #sqlsat121
 
New Server in an Hour
New Server in an HourNew Server in an Hour
New Server in an Hour
 

Defy the Defaults

  • 1. Defy the Defaults Mike Hillwig Boston, MA
  • 2. Mike Hillwig  AKA The Cranky DBA  SQL Server DBA  Working with SQL Server since SQL 7  Senior DBA at hosting division of a financial software company  Resume includes Acme Packet, Shawmut Design and Construction, Weirton Steel, Equitable Resources
  • 3.
  • 4. Obligatory Social Networking Slide  crankydba.com  sqlserverpedia.com  twitter.com/mikehillwig  anysocialmediasite/mikehillwig
  • 5. Housekeeping  Slides and scripts at sqlsaturday.com  Blog post at crankydba.com/go/defaults  Don’t let me talk too fast  Please complete your evaluations
  • 6. Beware of the Blogs  There is some  Test everything in amazing advice out your own test there. But… environment first.  Anybody can put bad  I don’t trust people advice on the internet who say “ALWAYS” or  Trust people you “NEVER” know  Assume I’m an idiot
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. Today’s Agenda  Server Configuration  Pre-Installation  Installation  Database Creation  Memory Management  SQL Agent Jobs  Don’t Touch That! 10/6/2012 15 | SQL Saturday 171 Pittsburgh, PA |
  • 16. Before You Touch the Install Media  Look at your drive configurations  Have a place to put different types of files  Data  Tlogs  Pagefile  TempDB  Backups 10/6/2012 16 | SQL Saturday #171 Pittsburgh |
  • 17. Enabling Instant File Initialization  Not exactly a SQL setting  Changing a default policy object  Allowing your service account to Perform Volume Maintenance Tasks allows you to use IFI
  • 18. What are we installing?  Resist the urge to Select All  Only install what you need  More options need more resources  Bigger surface area means more surfaces to attack
  • 19. Where are we installing it?  I don’t like installing anything on C.  Have a drive dedicated to holding binaries/applications
  • 20. Understand the Instance Root  This is where most of your files will live, including logs and system files  Avoid putting these in the same place as your binaries
  • 21. Our First Chance to get Security Right  Do you need mixed authentication?  Who will be an administrator on this instance?  Use AD groups where possible.  Add your service account here.
  • 22. What Goes Where?  Splitting things up can be a boost to performance  Keep your paths consistent  I strongly encourage you to put data and backups on different physical disks/LUNs
  • 23. Creating a New Database  Who owns the database? That account is the default for dbo.  Look at your initial file sizes and growth increments.  If it’s going to grow, start big out of the gate
  • 24. Let it Grow!  This is one is important to me.  This gets changed in every instance I manage  Avoid disk fragmentation  Can you come up with a better default setting?
  • 25. Instance RAM  MIN = 0 allows you to get ballooned  MAX = 2 TB allows you to page  Do you have any servers with 2 TB of RAM?  Subtract 4-8 GB from physical RAM as a starting point for MAX
  • 26. SQL Agent Job Ownership  This is a deadly default.  I’ve seen this one kill servers  If the owner is disabled, the job stops running.  In my environments, this is always a system or service account.
  • 27.
  • 30. Auto Shrink  Autoshrink is evil  Don’t enable it. Ever.  Why? Because Paul says so.  crankydba.com/go/autoshrink
  • 31. MAX DOP  There is some bad information out there about setting your Max Degrees of Parallelism.  Typically only needs to be changed in fringe cases. You’re probably not a fringe case.  If changing this setting helps, you’re probably just masking a bigger problem with your code.
  • 32. “Bottom Three” Server Security Settings  Do you understand these settings?  I’ve seen C2 kill servers with excessive logging  I advise touching these settings only when you know specifically you need them.

Editor's Notes

  1. Good advice out there, but…Lots of outdated information. Do DB servers really need 2x RAM for PF?