SlideShare une entreprise Scribd logo
1  sur  36
Building Perfect SQL 
Servers 
Joey D’Antoni, Solutions Architect Every Time 
Anexinet
Please silence 
cell phones
Explore Everything PASS Has to Offer 
Free SQL Server and BI Web Events Free 1-day Training Events Regional Event 
Local User Groups Around 
the World 
Free Online Technical Training 
This is Community Business Analytics Training 
Session Recordings PASS Newsletter
Session Evaluations 
ways to access 
Go to 
passsummit.com/evals 
Download the GuideBook App 
and search: PASS Summit 2014 
Submit by 11:59 PM EST 
Friday Nov. 7 to 
WIN prizes 
Follow the QR code link displayed 
on session signage throughout the 
conference venue and in the 
program guide 
Your feedback is 
important and valuable. 
Evaluation Deadline: 
11:59 PM EST, Sunday Nov. 16
Joey D’Antoni 
Joey has over 15 years of experience with a wide variety of data platforms, in both Fortune 
50 companies as well as smaller organizations 
He is a frequent speaker on database administration, big data, and career management 
He is the co-president of the Philadelphia SQL Server User’s Group 
MSCE, Business Intelligence 
He wants you to make sure you can restore your data 
Joeydantoni.com – Blog, Slides
SQL Server Installation
What Happens? 
Is it really that bad?
Set Max Memory 
The default 
setting 
for max 
server 
memory is 
2147483647 
MB (2.1 
Petabytes!!!) 
If this setting 
is not 
changed SQL 
Server will 
attempt to 
grab all of the 
memory on 
the box 
This can lead 
to paging of 
the Windows 
O/S 
The one 
exception is 
very large 
memory servers 
(> 128 GB) 
Windows 
generally needs 
about 6-8 GB to 
run comfortably 
Best Practice 
is to allocate 
80% of 
memory to 
SQL Server 
Minimum 
Memory 
doesn’t need 
to be set
Parallelism
Configure MaxDOP 
Default setting is 0 which uses all 
available processors in parallel 
query execution 
This can lead to CXPACKET and 
Scheduler waits 
Best Practice 
• For servers > 8 CPUs = MAXDOP=8 
• For servers < 8 CPUs = MAXDOP 0 
to n (where N=CPUs per NUMA 
node) 
• SharePoint and Dynamics 
MAXDOP=1
Cost Threshold for Parallelism 
This is a your mileage may 
vary setting 
The default of 5 is generally 
too low for everything 
except pure OLTP 
Start with 50 and move from 
there
Model Database
Change Model File Sizes 
Initial Size and Autogrowth are way too small 
initially 
There is no right number—base on roughly how 
big your databases will be 
Definitely, change autogrowth to remove 
percentage growth and go with fixed value 
Goal is to avoid file system fragmentation
Change Model Recovery Model 
Recovery By default—Model is in full recovery mode 
Typically I set to simple—if a database 
needs to be in full recovery mode, set it 
manually 
If you need databases in full recovery mode 
be sure to set up transaction log backups
Add Files to TempDB 
If the number of logical processors < 8 
then number of TempDB Files = number of 
CPUs (but start with 4) 
If logical processors > 8, then number of 
TempDB Files = 8 
• If contention continues add files in multiples of 4 
All TempDB files should be the same size 
and have same autogrowth settings 
Consider using trace flags (1117,1118)
TempDB Contention 
Source—Confio TempDB and Latch 
Contention
Database Mail 
Required for notifications 
and alerts 
Requires an SMTP server 
•For demo purposes I use 
Google’s 
•Speak with your Exchange 
admin
Create SQL Agent Alerts for Critical Errors 
Ensures you get notified 
when something bad 
happens on your server 
Know that problems are 
happening before your 
users do 
Can tie alerts to actions 
and/or pages
Backup Compression 
This costs a little bit 
of CPU—but your 
backups and 
restores will greatly 
benefit 
In Standard Edition 
from 2008 R2 
forward
Instant File Initialization 
SQL Server will by default 
zero out a data file on a 
growth 
Grant Windows permission 
to SQL Server process 
account to “Perform Volume 
Maintenance Tasks”
Remote Dedicated Administrator 
Connection 
Provides dedicated CPU, 
memory and scheduler 
By default, only works via 
RDP or physically on server
Maintenance 
The built in maintenance plans 
in SQL Server aren’t bad—they 
just aren’t good 
Ola Hallengren SQL Server 
Maintenance Solution 
CheckDB, Index Maintenance, 
Statistics, Backups Ola.hallengren.com
Patch SQL Server 
Find out the current Service Pack and Cumulative Update 
level (sqlserverbuilds.blogspot.com) 
Patch your server—no time like install time 
If you are using SQL Server 2012 and up: 
• Updatesource parameter 
• Can use Windows Update (MU) 
• Or local source UNC or local path
The Cloud 
ALL OF THE ABOVE APPLIES TO AZURE VMs!
Standards Are Important
Standards 
Having written build standards is important 
Consider everything 
• Drive Locations 
• Standard Volume Sizes 
• Storage 
• Editions, settings, builds 
• O/S 
• HA and DR options 
• Security 
Revisit standards at least every 6 months
Standards Cont’d 
Standard HW is good and can really help 
Work with Sys Admin teams for guidance on O/S level
Exceptions
Process Automation
Infrastructure Server 
This is optional—but can 
be really handy 
• Store installation files 
• Use as update source for 
SQL Server installs 
• Use as metadata and 
monitoring hub for your 
environment 
Should be very secured
Virtual Machines 
This can get a little 
complicated 
I’ve taken two approaches 
• Install SQL at build time 
(messy) 
• Clone VM and make 
changes 
• You may want different 
settings
Trust But Verify 
Even though you doing this 
great process 
Still verify everything 
• Leverage your infrastructure 
server 
• Build Pretty Reports
Building A Private Cloud 
Case Study 
• Make Decisions for 80% 
of your environment 
• SQL Server Components 
aren’t bad—Windows is 
a little trickier 
• This process had more 
management/sprawl 
issues than technical 
ones
Private Cloud 
User 
Interface 
(Intranet) 
Service 
Management 
Layer (System 
Center, Others) 
Backend 
Infrastructure
Lessons Learned 
Capture Owner Info 
Acknowledge servers may not be managed 
Release a little bit of control
Summary 
Do this stuff 
Automate and Repeat 
Your Servers will love you 
Slides joedantoni.wordpress.com 
Twitter @jdanton 
Email jdanton1@yahoo.com

Contenu connexe

Plus de Joseph D'Antoni

Sql Server 2012 HA and DR -- SQL Saturday Richmond
Sql Server 2012 HA and DR -- SQL Saturday RichmondSql Server 2012 HA and DR -- SQL Saturday Richmond
Sql Server 2012 HA and DR -- SQL Saturday RichmondJoseph D'Antoni
 
Sql server 2012 ha and dr sql saturday tampa
Sql server 2012 ha and dr sql saturday tampaSql server 2012 ha and dr sql saturday tampa
Sql server 2012 ha and dr sql saturday tampaJoseph D'Antoni
 
Windows server 2012 failover clustering new features
Windows server 2012 failover clustering new featuresWindows server 2012 failover clustering new features
Windows server 2012 failover clustering new featuresJoseph D'Antoni
 
Sql server 2012 ha and dr sql saturday dc
Sql server 2012 ha and dr sql saturday dcSql server 2012 ha and dr sql saturday dc
Sql server 2012 ha and dr sql saturday dcJoseph D'Antoni
 
San presentation nov 2012 central pa
San presentation nov 2012 central paSan presentation nov 2012 central pa
San presentation nov 2012 central paJoseph D'Antoni
 
Always on availability groups way too deep
Always on availability groups way too deepAlways on availability groups way too deep
Always on availability groups way too deepJoseph D'Antoni
 
South jersey sql virtualization
South jersey sql virtualizationSouth jersey sql virtualization
South jersey sql virtualizationJoseph D'Antoni
 
Sql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_finalSql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_finalJoseph D'Antoni
 
Sql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_finalSql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_finalJoseph D'Antoni
 
Sql server 2012 ha dr nova
Sql server 2012 ha dr novaSql server 2012 ha dr nova
Sql server 2012 ha dr novaJoseph D'Antoni
 
Sql saturday powerpoint dc_san
Sql saturday powerpoint dc_sanSql saturday powerpoint dc_san
Sql saturday powerpoint dc_sanJoseph D'Antoni
 
Deploying your Application to SQLRally
Deploying your Application to SQLRallyDeploying your Application to SQLRally
Deploying your Application to SQLRallyJoseph D'Antoni
 
Deploying data tier applications sql saturday dc
Deploying data tier applications sql saturday dcDeploying data tier applications sql saturday dc
Deploying data tier applications sql saturday dcJoseph D'Antoni
 
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
 
Deploying data tier applications sql saturday dc
Deploying data tier applications sql saturday dcDeploying data tier applications sql saturday dc
Deploying data tier applications sql saturday dcJoseph D'Antoni
 
Server virtualization and cloud computing
Server virtualization and cloud computingServer virtualization and cloud computing
Server virtualization and cloud computingJoseph D'Antoni
 
Management data warehouse
Management data warehouseManagement data warehouse
Management data warehouseJoseph D'Antoni
 

Plus de Joseph D'Antoni (20)

Sql Server 2012 HA and DR -- SQL Saturday Richmond
Sql Server 2012 HA and DR -- SQL Saturday RichmondSql Server 2012 HA and DR -- SQL Saturday Richmond
Sql Server 2012 HA and DR -- SQL Saturday Richmond
 
Sql server 2012 ha and dr sql saturday tampa
Sql server 2012 ha and dr sql saturday tampaSql server 2012 ha and dr sql saturday tampa
Sql server 2012 ha and dr sql saturday tampa
 
Windows server 2012 failover clustering new features
Windows server 2012 failover clustering new featuresWindows server 2012 failover clustering new features
Windows server 2012 failover clustering new features
 
Sql server 2012 ha and dr sql saturday dc
Sql server 2012 ha and dr sql saturday dcSql server 2012 ha and dr sql saturday dc
Sql server 2012 ha and dr sql saturday dc
 
San presentation nov 2012 central pa
San presentation nov 2012 central paSan presentation nov 2012 central pa
San presentation nov 2012 central pa
 
Always on availability groups way too deep
Always on availability groups way too deepAlways on availability groups way too deep
Always on availability groups way too deep
 
South jersey sql virtualization
South jersey sql virtualizationSouth jersey sql virtualization
South jersey sql virtualization
 
Virtualization for DBA
Virtualization for DBAVirtualization for DBA
Virtualization for DBA
 
Sql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_finalSql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_final
 
Sql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_finalSql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_final
 
Sql server 2012 ha dr nova
Sql server 2012 ha dr novaSql server 2012 ha dr nova
Sql server 2012 ha dr nova
 
Sql server 2012 ha dr
Sql server 2012 ha drSql server 2012 ha dr
Sql server 2012 ha dr
 
Sql saturday powerpoint dc_san
Sql saturday powerpoint dc_sanSql saturday powerpoint dc_san
Sql saturday powerpoint dc_san
 
Sql saturday dc vm ware
Sql saturday dc vm wareSql saturday dc vm ware
Sql saturday dc vm ware
 
Deploying your Application to SQLRally
Deploying your Application to SQLRallyDeploying your Application to SQLRally
Deploying your Application to SQLRally
 
Deploying data tier applications sql saturday dc
Deploying data tier applications sql saturday dcDeploying data tier applications sql saturday dc
Deploying data tier applications sql saturday dc
 
Building your first sql server cluster
Building your first sql server clusterBuilding your first sql server cluster
Building your first sql server cluster
 
Deploying data tier applications sql saturday dc
Deploying data tier applications sql saturday dcDeploying data tier applications sql saturday dc
Deploying data tier applications sql saturday dc
 
Server virtualization and cloud computing
Server virtualization and cloud computingServer virtualization and cloud computing
Server virtualization and cloud computing
 
Management data warehouse
Management data warehouseManagement data warehouse
Management data warehouse
 

Dernier

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
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
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
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
 

Dernier (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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...
 
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
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 

Pass summit 2014 building perfect sql servers

  • 1. Building Perfect SQL Servers Joey D’Antoni, Solutions Architect Every Time Anexinet
  • 3. Explore Everything PASS Has to Offer Free SQL Server and BI Web Events Free 1-day Training Events Regional Event Local User Groups Around the World Free Online Technical Training This is Community Business Analytics Training Session Recordings PASS Newsletter
  • 4. Session Evaluations ways to access Go to passsummit.com/evals Download the GuideBook App and search: PASS Summit 2014 Submit by 11:59 PM EST Friday Nov. 7 to WIN prizes Follow the QR code link displayed on session signage throughout the conference venue and in the program guide Your feedback is important and valuable. Evaluation Deadline: 11:59 PM EST, Sunday Nov. 16
  • 5. Joey D’Antoni Joey has over 15 years of experience with a wide variety of data platforms, in both Fortune 50 companies as well as smaller organizations He is a frequent speaker on database administration, big data, and career management He is the co-president of the Philadelphia SQL Server User’s Group MSCE, Business Intelligence He wants you to make sure you can restore your data Joeydantoni.com – Blog, Slides
  • 7. What Happens? Is it really that bad?
  • 8. Set Max Memory The default setting for max server memory is 2147483647 MB (2.1 Petabytes!!!) If this setting is not changed SQL Server will attempt to grab all of the memory on the box This can lead to paging of the Windows O/S The one exception is very large memory servers (> 128 GB) Windows generally needs about 6-8 GB to run comfortably Best Practice is to allocate 80% of memory to SQL Server Minimum Memory doesn’t need to be set
  • 10. Configure MaxDOP Default setting is 0 which uses all available processors in parallel query execution This can lead to CXPACKET and Scheduler waits Best Practice • For servers > 8 CPUs = MAXDOP=8 • For servers < 8 CPUs = MAXDOP 0 to n (where N=CPUs per NUMA node) • SharePoint and Dynamics MAXDOP=1
  • 11. Cost Threshold for Parallelism This is a your mileage may vary setting The default of 5 is generally too low for everything except pure OLTP Start with 50 and move from there
  • 13. Change Model File Sizes Initial Size and Autogrowth are way too small initially There is no right number—base on roughly how big your databases will be Definitely, change autogrowth to remove percentage growth and go with fixed value Goal is to avoid file system fragmentation
  • 14. Change Model Recovery Model Recovery By default—Model is in full recovery mode Typically I set to simple—if a database needs to be in full recovery mode, set it manually If you need databases in full recovery mode be sure to set up transaction log backups
  • 15. Add Files to TempDB If the number of logical processors < 8 then number of TempDB Files = number of CPUs (but start with 4) If logical processors > 8, then number of TempDB Files = 8 • If contention continues add files in multiples of 4 All TempDB files should be the same size and have same autogrowth settings Consider using trace flags (1117,1118)
  • 16. TempDB Contention Source—Confio TempDB and Latch Contention
  • 17. Database Mail Required for notifications and alerts Requires an SMTP server •For demo purposes I use Google’s •Speak with your Exchange admin
  • 18. Create SQL Agent Alerts for Critical Errors Ensures you get notified when something bad happens on your server Know that problems are happening before your users do Can tie alerts to actions and/or pages
  • 19. Backup Compression This costs a little bit of CPU—but your backups and restores will greatly benefit In Standard Edition from 2008 R2 forward
  • 20. Instant File Initialization SQL Server will by default zero out a data file on a growth Grant Windows permission to SQL Server process account to “Perform Volume Maintenance Tasks”
  • 21. Remote Dedicated Administrator Connection Provides dedicated CPU, memory and scheduler By default, only works via RDP or physically on server
  • 22. Maintenance The built in maintenance plans in SQL Server aren’t bad—they just aren’t good Ola Hallengren SQL Server Maintenance Solution CheckDB, Index Maintenance, Statistics, Backups Ola.hallengren.com
  • 23. Patch SQL Server Find out the current Service Pack and Cumulative Update level (sqlserverbuilds.blogspot.com) Patch your server—no time like install time If you are using SQL Server 2012 and up: • Updatesource parameter • Can use Windows Update (MU) • Or local source UNC or local path
  • 24. The Cloud ALL OF THE ABOVE APPLIES TO AZURE VMs!
  • 26. Standards Having written build standards is important Consider everything • Drive Locations • Standard Volume Sizes • Storage • Editions, settings, builds • O/S • HA and DR options • Security Revisit standards at least every 6 months
  • 27. Standards Cont’d Standard HW is good and can really help Work with Sys Admin teams for guidance on O/S level
  • 30. Infrastructure Server This is optional—but can be really handy • Store installation files • Use as update source for SQL Server installs • Use as metadata and monitoring hub for your environment Should be very secured
  • 31. Virtual Machines This can get a little complicated I’ve taken two approaches • Install SQL at build time (messy) • Clone VM and make changes • You may want different settings
  • 32. Trust But Verify Even though you doing this great process Still verify everything • Leverage your infrastructure server • Build Pretty Reports
  • 33. Building A Private Cloud Case Study • Make Decisions for 80% of your environment • SQL Server Components aren’t bad—Windows is a little trickier • This process had more management/sprawl issues than technical ones
  • 34. Private Cloud User Interface (Intranet) Service Management Layer (System Center, Others) Backend Infrastructure
  • 35. Lessons Learned Capture Owner Info Acknowledge servers may not be managed Release a little bit of control
  • 36. Summary Do this stuff Automate and Repeat Your Servers will love you Slides joedantoni.wordpress.com Twitter @jdanton Email jdanton1@yahoo.com