SlideShare a Scribd company logo
1 of 20
SQL Server Best Practices
Install SQL Server like a boss
Andre Essing
Senior Consultant & Trainer
BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA
HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH
About Me
3 30.06.2016
ANDRE
ESSING
Senior Consultant
Trainer
DBA and Senior Consultant,
Microsoft Certified Solutions Expert,
Trainer and SQL Server Enthusiast
§ Working in IT since 1998
§ SQL Server since version 7.0
§ Focus on SQL Server infrastructure
and mission critical systems
§ Microsoft Certified Trainer
and MCSE: Data Platform
§ Microsoft P-TSP Data Platform
§ Friend of Redgate
§ PASS Chapter Leader Bavaria
and SQL Saturday Organizer
Contact
Web & Mail
www www.trivadis.com
Blog www.andreessing.de
E-Mail andre.essing@trivadis.com
Social
Twitter twitter.com/aessing
Xing xing.com/profile/Andre_Essing
LinkedIn linkedin.com/in/aessing
Publications
SlideShare slideshare.net/AndreEssing
Profile
SQL Server Best Practices - Install SQL Server like a boss
The Key for a Perfect System
SQL Server Best Practices - Install SQL Server like a boss4 30.06.2016
§ The key is to build a balanced system without bottlenecks
§ The SQL Server software is only a small part of the whole system
§ Plan your system before you build it
Processor Memory Storage HBA Networking
SQL Server Best Practices - Install SQL Server like a boss5 30.06.2016
Pre Deployment
Hardware
SQL Server Best Practices - Install SQL Server like a boss6 30.06.2016
§ Disable Hyper-Threading
§ 1 scheduler per logical core
§ Disable all power savings
§ SQL Server licenses are expensive
Storage
SQL Server Best Practices - Install SQL Server like a boss7 30.06.2016
§ Which kind of storage?
§ Read caching isn’t necessary
§ Prefer small disks
§ Low latency is important
§ Don’t use thin provisioning
§ Most times virtual disks are slower than physical
Filesystem
SQL Server Best Practices - Install SQL Server like a boss8 30.06.2016
§ Check partition alignment
http://msdn.microsoft.com/en-us/library/dd758814.aspx
§ Format volumes the right way
§ Disable file indexing and defrag
§ Disk layout is important
§ Consider a remote backup location
§ Use mountpoints
Operating System
SQL Server Best Practices - Install SQL Server like a boss9 30.06.2016
§ Configure for high performance
§ Use service accounts
§ Local Security Policy
§ Lock Pages In Memory
§ Perform Volume Maintenance Tasks
§ Antivirus software & exclusions
https://support.microsoft.com/en-us/kb/309422
§ Windows Firewall & User Access Control
SQL Server Best Practices - Install SQL Server like a boss10 30.06.2016
Setup
Installation
SQL Server Best Practices - Install SQL Server like a boss11 30.06.2016
§ Only install components you really need
§ Choose the correct collation
§ Install using a configuration file
§ Don‘t forget to install updates
§ BUILTINAdministrators isn’t a good idea
§ SQL Server is not a workstation
SQL Server Best Practices - Install SQL Server like a boss12 30.06.2016
Post Setup
Configuration
Networking
SQL Server Best Practices - Install SQL Server like a boss13 30.06.2016
§ Same port for all instances
§ Dedicated IP per instance
§ Use DNS alias for easy access
§ Set SPNs to use Kerberos authentication
§ Don’t use SQL Logins
Trace Flags
SQL Server Best Practices - Install SQL Server like a boss14 30.06.2016
§ Trace Flag 1117
§ Equally grows all data files
§ Replaced in 2016 by filegroup option
(AUTOGROW_ALL_FILES - sys.filegroups)
§ Recommended for all filegroups and databases
§ Trace Flag 1118
§ Force use of unified extents for objects
§ Replaced in 2016 by database option
(MIXED_PAGE_ALLOCATION - sys.databases)
§ Default in SQL Server 2016
Instance
SQL Server Best Practices - Install SQL Server like a boss15 30.06.2016
§ Configure memory limits
§ Optimize for ad hoc workloads
§ Max Degree of Parallelism
§ Not higher than cores per socket
§ Some apps need a value of 1
§ Cost Threshold for Parallelism
§ 40 for OLTP workloads
§ 25 for DWH and mixed workloads
Database defaults
SQL Server Best Practices - Install SQL Server like a boss16 30.06.2016
§ Default fill factor
§ Our best practice is 80%
§ It is just for new objects
§ Keep an eye on fragmentation
§ Compress Backups
§ Checksum default
TempDB
SQL Server Best Practices - Install SQL Server like a boss17 30.06.2016
§ Split into multiple files
§ Size depends on usage
§ Size and growth of the files
§ Start with 2-4GB per data file and 4-8GB log
§ Grow 256MB-1GB for data and 1GB for log
§ Monitor TempDB usage
§ Don’t forget trace flag 1117 and 1118
Databases – Physical design
SQL Server Best Practices - Install SQL Server like a boss18 30.06.2016
§ The physical design matters
§ When possible, primary filegroup only for MDF
§ Use multiple files per filegroup
§ Set size and growth of files
§ Estimate the size for the next year(s)
§ Keep an eye on VLFs
DBCC LOGINFO;
Databases – Options
SQL Server Best Practices - Install SQL Server like a boss19 30.06.2016
§ Don’t assign DB_Owner role or DBO
§ Always use Full Recovery Model
§ There could be some exceptions
§ Never enable Auto_Close or Auto_Shrink
§ Enable Auto_Create_Statistics
§ Enable Auto_Update_Statistics
Maintenance
SQL Server Best Practices - Install SQL Server like a boss20 30.06.2016
§ There are more tasks than just backup
§ Never shrink automatically
§ Don’t forget to clean the mess of SQL Server
§ Don’t use maintenance plans
§ Use scripts
§ Trivadis Toolbox (http://www.trivadis.com/)
§ Ola Hallengren (https://ola.hallengren.com/)
BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA
HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH
Questions and Answers…
Andre Essing
Senior Consultant & Trainer
+49 89 992759598
andre.essing@trivadis.com

More Related Content

Recently uploaded

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Recently uploaded (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

SQL Server Best Practices - Install SQL Server like a boss

  • 1. SQL Server Best Practices Install SQL Server like a boss Andre Essing Senior Consultant & Trainer BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH
  • 2. About Me 3 30.06.2016 ANDRE ESSING Senior Consultant Trainer DBA and Senior Consultant, Microsoft Certified Solutions Expert, Trainer and SQL Server Enthusiast § Working in IT since 1998 § SQL Server since version 7.0 § Focus on SQL Server infrastructure and mission critical systems § Microsoft Certified Trainer and MCSE: Data Platform § Microsoft P-TSP Data Platform § Friend of Redgate § PASS Chapter Leader Bavaria and SQL Saturday Organizer Contact Web & Mail www www.trivadis.com Blog www.andreessing.de E-Mail andre.essing@trivadis.com Social Twitter twitter.com/aessing Xing xing.com/profile/Andre_Essing LinkedIn linkedin.com/in/aessing Publications SlideShare slideshare.net/AndreEssing Profile SQL Server Best Practices - Install SQL Server like a boss
  • 3. The Key for a Perfect System SQL Server Best Practices - Install SQL Server like a boss4 30.06.2016 § The key is to build a balanced system without bottlenecks § The SQL Server software is only a small part of the whole system § Plan your system before you build it Processor Memory Storage HBA Networking
  • 4. SQL Server Best Practices - Install SQL Server like a boss5 30.06.2016 Pre Deployment
  • 5. Hardware SQL Server Best Practices - Install SQL Server like a boss6 30.06.2016 § Disable Hyper-Threading § 1 scheduler per logical core § Disable all power savings § SQL Server licenses are expensive
  • 6. Storage SQL Server Best Practices - Install SQL Server like a boss7 30.06.2016 § Which kind of storage? § Read caching isn’t necessary § Prefer small disks § Low latency is important § Don’t use thin provisioning § Most times virtual disks are slower than physical
  • 7. Filesystem SQL Server Best Practices - Install SQL Server like a boss8 30.06.2016 § Check partition alignment http://msdn.microsoft.com/en-us/library/dd758814.aspx § Format volumes the right way § Disable file indexing and defrag § Disk layout is important § Consider a remote backup location § Use mountpoints
  • 8. Operating System SQL Server Best Practices - Install SQL Server like a boss9 30.06.2016 § Configure for high performance § Use service accounts § Local Security Policy § Lock Pages In Memory § Perform Volume Maintenance Tasks § Antivirus software & exclusions https://support.microsoft.com/en-us/kb/309422 § Windows Firewall & User Access Control
  • 9. SQL Server Best Practices - Install SQL Server like a boss10 30.06.2016 Setup
  • 10. Installation SQL Server Best Practices - Install SQL Server like a boss11 30.06.2016 § Only install components you really need § Choose the correct collation § Install using a configuration file § Don‘t forget to install updates § BUILTINAdministrators isn’t a good idea § SQL Server is not a workstation
  • 11. SQL Server Best Practices - Install SQL Server like a boss12 30.06.2016 Post Setup Configuration
  • 12. Networking SQL Server Best Practices - Install SQL Server like a boss13 30.06.2016 § Same port for all instances § Dedicated IP per instance § Use DNS alias for easy access § Set SPNs to use Kerberos authentication § Don’t use SQL Logins
  • 13. Trace Flags SQL Server Best Practices - Install SQL Server like a boss14 30.06.2016 § Trace Flag 1117 § Equally grows all data files § Replaced in 2016 by filegroup option (AUTOGROW_ALL_FILES - sys.filegroups) § Recommended for all filegroups and databases § Trace Flag 1118 § Force use of unified extents for objects § Replaced in 2016 by database option (MIXED_PAGE_ALLOCATION - sys.databases) § Default in SQL Server 2016
  • 14. Instance SQL Server Best Practices - Install SQL Server like a boss15 30.06.2016 § Configure memory limits § Optimize for ad hoc workloads § Max Degree of Parallelism § Not higher than cores per socket § Some apps need a value of 1 § Cost Threshold for Parallelism § 40 for OLTP workloads § 25 for DWH and mixed workloads
  • 15. Database defaults SQL Server Best Practices - Install SQL Server like a boss16 30.06.2016 § Default fill factor § Our best practice is 80% § It is just for new objects § Keep an eye on fragmentation § Compress Backups § Checksum default
  • 16. TempDB SQL Server Best Practices - Install SQL Server like a boss17 30.06.2016 § Split into multiple files § Size depends on usage § Size and growth of the files § Start with 2-4GB per data file and 4-8GB log § Grow 256MB-1GB for data and 1GB for log § Monitor TempDB usage § Don’t forget trace flag 1117 and 1118
  • 17. Databases – Physical design SQL Server Best Practices - Install SQL Server like a boss18 30.06.2016 § The physical design matters § When possible, primary filegroup only for MDF § Use multiple files per filegroup § Set size and growth of files § Estimate the size for the next year(s) § Keep an eye on VLFs DBCC LOGINFO;
  • 18. Databases – Options SQL Server Best Practices - Install SQL Server like a boss19 30.06.2016 § Don’t assign DB_Owner role or DBO § Always use Full Recovery Model § There could be some exceptions § Never enable Auto_Close or Auto_Shrink § Enable Auto_Create_Statistics § Enable Auto_Update_Statistics
  • 19. Maintenance SQL Server Best Practices - Install SQL Server like a boss20 30.06.2016 § There are more tasks than just backup § Never shrink automatically § Don’t forget to clean the mess of SQL Server § Don’t use maintenance plans § Use scripts § Trivadis Toolbox (http://www.trivadis.com/) § Ola Hallengren (https://ola.hallengren.com/)
  • 20. BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH Questions and Answers… Andre Essing Senior Consultant & Trainer +49 89 992759598 andre.essing@trivadis.com