SlideShare a Scribd company logo
7/14/2014 1www.datavail.com
About Your Presenter
Andy McDermid, SQL Server DBA, Datavail
Andy is a MCITP certified MS SQL DBA who delivers and manages
delivery of DBA services to many diverse clients. He enjoys
helping his clients by finding and deploying pragmatic and
practical solutions for their database issues. Andy is always
working to improve and expand his DBA skills and he likes to
share the experience via writing. You can read more about his
work here http://andrewmcdermid.net.
How Regular SQL Health Checks
Keep Your Database in Shape
Andy McDermid
SQL Server DBA, Datavail
Andy.mcdermid@datavail.com
NWOSSUG, Toledo
7/14/2014 3www.datavail.com
Your Chance To Win!
Make sure you fill out our presentation evaluation for your
chance to win a new Xbox!
7/14/2014 4www.datavail.com
About Me
Andy McDermid
• Broomfield, CO
• Principal SQL DBA at Datavail
Blog: http://www.datavail.com/blog |
Twitter: @oldskipole
7/14/2014 5www.datavail.com
About Datavail
Datavail is a managed service provider for databases
• OracleDB2
• MySQL
• MS SQL
• Oracle & Oracle EBS
• No SQL
24x7x365 Coverage
• U.S.-based DBA team
• Offshore team
Datavail DBAs work with many SQL servers Health Checks
used to expose the issues
Recurring health checks keep servers up to standards
Frees up time so you can be more strategic
7/14/2014 6www.datavail.com
About This Presentation
SQL Health Checks
• Achieve and maintain a standard of health for each
instance
The most common misconfigurations and set up issues
• After thousands of health checks for many servers, these
are the top issues
• Review the function
• What is the default and is it appropriate?
• What might be the best settings to work towards a
standard configuration
* These are best practices and you should make the best decision for
your specific environment.
7/14/2014 7www.datavail.com
Three Parts of This Presentation
1. Easy Picking
Server and database configurations, backups
2. Best Bang
Server configuration, index topics
3. Long Road
DB file location, size and growth, tempdb
configuration
Easy Picking
7/14/2014 9www.datavail.com
Server Configuration (sp_configure options)
Priority boost
• Sets the SQL service to run at the highest priority -13
• Default is 0 – which is priority of 7
• May starve other processes – network and OS
• Depreciated
7/14/2014 10www.datavail.com
Server Configuration (sp_configure options)
Recovery Interval
• Approximately how long to recover database after a restart
or crash
• Default setting is 0 which means ~ 1 minute recovery time
• Affects checkpoint frequency so may be adjusted to reduce
IO spikes
7/14/2014 11www.datavail.com
CPU affinity mask
• Designates a set of logical CPU to an instance
• Default is 0 – no specific association
• Typical use case – stacked instances
• Three methods to change
– SQL Server Management Studio
– sp_configure ‘affinity mask’ (and ‘affinity64 mask’ if >64
CPU)
– ALTER SERVER CONFIGURATION SET PROCESS AFFINITY
• Avoid hard binding – enable trace flag 8002
Server Configuration (sp_configure options)
7/14/2014 12www.datavail.com
Database Options
Auto close
• DB ‘closes’ when there are no users connections
• Default is disabled
• Databases migrated from SQL 2000 MSDE
• Unnecessary overhead, depreciated
Auto shrink
• Free DB space automatically returned to OS
• Default is disabled
• Always … no wait … never a good idea
• Causes fragmentation
• Manage file size and growth manually
7/14/2014 13www.datavail.com
Page verify
• Checks page for corruption on each read
• Default is CHECKSUM but databases migrated from older
versions may be using Torn Page Detection, None
• CHECKSUM vs Torn Page Detection
• CHECKSUM – the more complete option
Database Options
7/14/2014 14www.datavail.com
Backups
Missing
• Missing full backups
• Missing transaction log backups
Misconfigured
• Destination
• Low or no retention days
Failing
• Reduce duration with Striped files or BUFFERCOUNT
• Plan to accommodate X days and account for growth
7/14/2014 15www.datavail.com
Policy Based Management
Easy method to keep an instance up to standard
1. Define configuration ‘template’
2. Build it as a set of policies
3. Evaluate regularly (e.g. monthly checkups)
Best Bang
7/14/2014 17www.datavail.com
Server Configuration (sp_configure options)
Maximum Memory
• Default is 2147483647
• Sets the buffer pool size (includes plan cache)
• Reserve for OS - rule of thumb
– 1 GB of RAM for the OS
– 1 GB for each 4 GB of RAM installed from 4–16 GB,
– 1 GB for every 8 GB RAM installed above 16 GB
RAM
Minimum Memory
• Dedicated instance- consider setting Min = Max
7/14/2014 18www.datavail.com
Memory Pressure
• If Target Server Memory depressed below Maximum
Memory = external pressure
• If Total Server Memory depressed below Target Server
Memory = internal pressure
Server Configuration (sp_configure options)
7/14/2014 19www.datavail.com
Max Degree of Parallelism
• Default is 0 – as many degrees as logical CPU
• May not be optimal for instances with many CPUs
• Microsoft recommends a per NUMA node calculation:
CPU/NUMA node
– E.g. 16 CPU with 4 NUMA nodes = MDOP 4
Server Configuration (sp_configure options)
7/14/2014 20www.datavail.com
Cost Threshold for Parallelism
– Controls when a plan goes parallel
– Default is 5 (query cost)
– Query the plan cache for typical query costs and set
CTFP accordingly
Server Configuration (sp_configure options)
7/14/2014 21www.datavail.com
Baselines
Adjust SQL Server for maximum throughput
1. Configure instance to best practice
2. Gather baseline metrics
3. Evaluate
4. Tweak as necessary
5. Repeat
7/14/2014 22www.datavail.com
Index fragmentation
• Maintenance plans
• Custom scripts to
– Ignore unused low page count, low fragmentation
– Threshold to reorganize or rebuild
– Maximum duration
Out of date statistics
• Maintenance plans
• Custom scripts
Indexes
7/14/2014 23www.datavail.com
Indexes
Duplicate, overlapping, and unused Indexes
• Drop or disable
• Impacts of index sprawl
– Database size on disk
– Wasted buffer pool
– Transaction log
Missing indexes
• Easy to find, easy to fix
• Careful… but not too careful
Long Road
7/14/2014 25www.datavail.com
System and user database files on same disk
• DR concern
Data and log files on same disk
• IO profile of Data and Log files
San or VM or both
• Does it even matter? Organizationally, yes.
Database Files
7/14/2014 26www.datavail.com
File growth too low
• Default is 1MB data file
• May result in continuous growth
• External file fragmentation
• Set growth and size appropriately, enable instant file
initialization
File growth in percent
• Default is 10% for log files
• Large file results in large grows
• Small files results in small grows (many VLFs)
• Set growth and size appropriately
Database Files
7/14/2014 27www.datavail.com
Database Files
High VLF count
• Log file fragmentation
• Log growth creates VLFs
– chunks less than 64MB and up to 64MB = 4 VLFs
– chunks larger than 64MB and up to 1GB = 8 VLFs
– chunks larger than 1GB = 16 VLFs
• Slow recovery times - restores, reboots, failovers, ect
• Rule of thumb – 512MB per VLF
7/14/2014 28www.datavail.com
Reducing VLFs
1. Before you shrink the log file take note of the current size in
MB – assuming this is the correct size –or whatever your new
size is
2. Shrink, backup, repeat as necessary to minimize VLFs. Works
best in a time of quiet so the log can clear easily – if there are
many many vlfs, if not you may need to make quite a few
transaction log backups between shrinks since the shrink clears
unused VLF blocks.
3. Divide 8000MB into the original size, round up, grow the
log back that many times in multiples of 8000MB.
Database Files
7/14/2014 29www.datavail.com
Temp DB Files
• Default is one file and one log file
• GAMSGAM contention
• Trace Flag 1118
• Rule of thumb – multiple files
– 1 per core up to 8,
– then add 4 more at a time up to logical CPU
7/14/2014 30www.datavail.com
Datavail Health Check
Based on PBM style pass/fail evaluation
Includes everything we discussed here and many more
Easy to read summary page
Comprehensive detail pages
Compliance per category
Customizable
Automated
Don’t forget to fill out the evaluation form for a chance
to win an Xbox!
Questions?
For a copy of today’s presentation email
Andrea.Crosby@Datavail.com

More Related Content

What's hot

Queues, Pools and Caches - Paper
Queues, Pools and Caches - PaperQueues, Pools and Caches - Paper
Queues, Pools and Caches - Paper
Gwen (Chen) Shapira
 
Best Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture SetupBest Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture Setup
EDB
 
Storage, San And Business Continuity Overview
Storage, San And Business Continuity OverviewStorage, San And Business Continuity Overview
Storage, San And Business Continuity OverviewAlan McSweeney
 
Minimize Headaches with Your Postgres Deployment
Minimize Headaches with Your Postgres DeploymentMinimize Headaches with Your Postgres Deployment
Minimize Headaches with Your Postgres Deployment
EDB
 
Taming the Beast: Optimizing Oracle EBS for Radical Efficiency
Taming the Beast: Optimizing Oracle EBS for Radical EfficiencyTaming the Beast: Optimizing Oracle EBS for Radical Efficiency
Taming the Beast: Optimizing Oracle EBS for Radical Efficiency
Datavail
 
Storage Systems For Scalable systems
Storage Systems For Scalable systemsStorage Systems For Scalable systems
Storage Systems For Scalable systemselliando dias
 
Webinar: The All-Flash Data Center, Myth or Reality?
Webinar: The All-Flash Data Center, Myth or Reality?Webinar: The All-Flash Data Center, Myth or Reality?
Webinar: The All-Flash Data Center, Myth or Reality?
Storage Switzerland
 
24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs
24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs
24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs
David Klee
 
Benefits of Panasas Parallel Storage
Benefits of Panasas Parallel StorageBenefits of Panasas Parallel Storage
Benefits of Panasas Parallel Storage
Panasas
 
Distributed RDBMS: Challenges, Solutions & Trade-offs
Distributed RDBMS: Challenges, Solutions & Trade-offsDistributed RDBMS: Challenges, Solutions & Trade-offs
Distributed RDBMS: Challenges, Solutions & Trade-offs
Ahmed Magdy Ezzeldin, MSc.
 
Nimble storage investor presentation - Q2 FY15
Nimble storage investor presentation -  Q2 FY15Nimble storage investor presentation -  Q2 FY15
Nimble storage investor presentation - Q2 FY15
nimblestorageIR
 
SQL Server 2014 New Features
SQL Server 2014 New FeaturesSQL Server 2014 New Features
SQL Server 2014 New Features
Onomi
 
Distributed RDBMS: Data Distribution Policy: Part 1 - What is a Data Distribu...
Distributed RDBMS: Data Distribution Policy: Part 1 - What is a Data Distribu...Distributed RDBMS: Data Distribution Policy: Part 1 - What is a Data Distribu...
Distributed RDBMS: Data Distribution Policy: Part 1 - What is a Data Distribu...
ScaleBase
 
Queues, Pools and Caches paper
Queues, Pools and Caches paperQueues, Pools and Caches paper
Queues, Pools and Caches paper
Gwen (Chen) Shapira
 
TECHNICAL WHITE PAPER▶Symantec Backup Exec 2014 Blueprints - OST Powered Appl...
TECHNICAL WHITE PAPER▶Symantec Backup Exec 2014 Blueprints - OST Powered Appl...TECHNICAL WHITE PAPER▶Symantec Backup Exec 2014 Blueprints - OST Powered Appl...
TECHNICAL WHITE PAPER▶Symantec Backup Exec 2014 Blueprints - OST Powered Appl...
Symantec
 
HP & OCSL Webinar StoreOnce 28th Of August 2013
HP & OCSL Webinar  StoreOnce 28th Of August 2013HP & OCSL Webinar  StoreOnce 28th Of August 2013
HP & OCSL Webinar StoreOnce 28th Of August 2013
OCSL
 
Top 10 Tips for an Effective Postgres Deployment
Top 10 Tips for an Effective Postgres DeploymentTop 10 Tips for an Effective Postgres Deployment
Top 10 Tips for an Effective Postgres Deployment
EDB
 

What's hot (20)

Queues, Pools and Caches - Paper
Queues, Pools and Caches - PaperQueues, Pools and Caches - Paper
Queues, Pools and Caches - Paper
 
Best Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture SetupBest Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture Setup
 
No sql3 rmoug
No sql3 rmougNo sql3 rmoug
No sql3 rmoug
 
Big data rmoug
Big data rmougBig data rmoug
Big data rmoug
 
Storage, San And Business Continuity Overview
Storage, San And Business Continuity OverviewStorage, San And Business Continuity Overview
Storage, San And Business Continuity Overview
 
Minimize Headaches with Your Postgres Deployment
Minimize Headaches with Your Postgres DeploymentMinimize Headaches with Your Postgres Deployment
Minimize Headaches with Your Postgres Deployment
 
Taming the Beast: Optimizing Oracle EBS for Radical Efficiency
Taming the Beast: Optimizing Oracle EBS for Radical EfficiencyTaming the Beast: Optimizing Oracle EBS for Radical Efficiency
Taming the Beast: Optimizing Oracle EBS for Radical Efficiency
 
Storage Systems For Scalable systems
Storage Systems For Scalable systemsStorage Systems For Scalable systems
Storage Systems For Scalable systems
 
Webinar: The All-Flash Data Center, Myth or Reality?
Webinar: The All-Flash Data Center, Myth or Reality?Webinar: The All-Flash Data Center, Myth or Reality?
Webinar: The All-Flash Data Center, Myth or Reality?
 
24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs
24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs
24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs
 
Benefits of Panasas Parallel Storage
Benefits of Panasas Parallel StorageBenefits of Panasas Parallel Storage
Benefits of Panasas Parallel Storage
 
Distributed RDBMS: Challenges, Solutions & Trade-offs
Distributed RDBMS: Challenges, Solutions & Trade-offsDistributed RDBMS: Challenges, Solutions & Trade-offs
Distributed RDBMS: Challenges, Solutions & Trade-offs
 
Nimble storage investor presentation - Q2 FY15
Nimble storage investor presentation -  Q2 FY15Nimble storage investor presentation -  Q2 FY15
Nimble storage investor presentation - Q2 FY15
 
SQL Server 2014 New Features
SQL Server 2014 New FeaturesSQL Server 2014 New Features
SQL Server 2014 New Features
 
How to choose the right server
How to choose the right serverHow to choose the right server
How to choose the right server
 
Distributed RDBMS: Data Distribution Policy: Part 1 - What is a Data Distribu...
Distributed RDBMS: Data Distribution Policy: Part 1 - What is a Data Distribu...Distributed RDBMS: Data Distribution Policy: Part 1 - What is a Data Distribu...
Distributed RDBMS: Data Distribution Policy: Part 1 - What is a Data Distribu...
 
Queues, Pools and Caches paper
Queues, Pools and Caches paperQueues, Pools and Caches paper
Queues, Pools and Caches paper
 
TECHNICAL WHITE PAPER▶Symantec Backup Exec 2014 Blueprints - OST Powered Appl...
TECHNICAL WHITE PAPER▶Symantec Backup Exec 2014 Blueprints - OST Powered Appl...TECHNICAL WHITE PAPER▶Symantec Backup Exec 2014 Blueprints - OST Powered Appl...
TECHNICAL WHITE PAPER▶Symantec Backup Exec 2014 Blueprints - OST Powered Appl...
 
HP & OCSL Webinar StoreOnce 28th Of August 2013
HP & OCSL Webinar  StoreOnce 28th Of August 2013HP & OCSL Webinar  StoreOnce 28th Of August 2013
HP & OCSL Webinar StoreOnce 28th Of August 2013
 
Top 10 Tips for an Effective Postgres Deployment
Top 10 Tips for an Effective Postgres DeploymentTop 10 Tips for an Effective Postgres Deployment
Top 10 Tips for an Effective Postgres Deployment
 

Similar to Datavail Health Check

MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and Optimization
MariaDB plc
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
MariaDB plc
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
MariaDB plc
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
MariaDB plc
 
071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen
Steve Feldman
 
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERAGeek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
IDERA Software
 
Taking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout SessionTaking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout Session
Splunk
 
Welcome To The 2016 Query Store!
Welcome To The 2016 Query Store!Welcome To The 2016 Query Store!
Welcome To The 2016 Query Store!
SolarWinds
 
MySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & Tune
Mark Swarbrick
 
Performance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL DatabasePerformance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL Database
Tung Nguyen Thanh
 
Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA
EDB
 
Sql server tips from the field
Sql server tips from the fieldSql server tips from the field
Sql server tips from the field
JoAnna Cheshire
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
Morgan Tocker
 
EDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB Postgres DBA Best Practices
EDB Postgres DBA Best Practices
EDB
 
Tuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy WorkloadTuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy Workload
Marius Adrian Popa
 
Managing and Configuring Databases
Managing and Configuring DatabasesManaging and Configuring Databases
Managing and Configuring Databases
Ram Kedem
 
Storage Sizing for SAP
Storage Sizing for SAPStorage Sizing for SAP
Storage Sizing for SAP
Cenk Ersoy
 
Hardware Provisioning
Hardware ProvisioningHardware Provisioning
Hardware Provisioning
MongoDB
 
Webinar: Capacity Planning
Webinar: Capacity PlanningWebinar: Capacity Planning
Webinar: Capacity Planning
MongoDB
 

Similar to Datavail Health Check (20)

MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and Optimization
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
 
071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen
 
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERAGeek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
 
Taking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout SessionTaking Splunk to the Next Level - Architecture Breakout Session
Taking Splunk to the Next Level - Architecture Breakout Session
 
Welcome To The 2016 Query Store!
Welcome To The 2016 Query Store!Welcome To The 2016 Query Store!
Welcome To The 2016 Query Store!
 
MySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & Tune
 
Performance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL DatabasePerformance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL Database
 
Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA
 
Sql server tips from the field
Sql server tips from the fieldSql server tips from the field
Sql server tips from the field
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
 
EDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB Postgres DBA Best Practices
EDB Postgres DBA Best Practices
 
Tuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy WorkloadTuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy Workload
 
Managing and Configuring Databases
Managing and Configuring DatabasesManaging and Configuring Databases
Managing and Configuring Databases
 
Storage Sizing for SAP
Storage Sizing for SAPStorage Sizing for SAP
Storage Sizing for SAP
 
Performance tuning in sql server
Performance tuning in sql serverPerformance tuning in sql server
Performance tuning in sql server
 
Hardware Provisioning
Hardware ProvisioningHardware Provisioning
Hardware Provisioning
 
Webinar: Capacity Planning
Webinar: Capacity PlanningWebinar: Capacity Planning
Webinar: Capacity Planning
 

More from Datavail

Journey to Cloud Analytics
Journey to Cloud Analytics Journey to Cloud Analytics
Journey to Cloud Analytics
Datavail
 
Accelerate SQL Server Migration to the AWS Cloud
Accelerate SQL Server Migration to the AWS Cloud Accelerate SQL Server Migration to the AWS Cloud
Accelerate SQL Server Migration to the AWS Cloud
Datavail
 
MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?
MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?
MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?
Datavail
 
Oracle Enterprise Manager Seven Robust Features to Put in Action final
Oracle Enterprise Manager Seven Robust Features to Put in Action finalOracle Enterprise Manager Seven Robust Features to Put in Action final
Oracle Enterprise Manager Seven Robust Features to Put in Action final
Datavail
 
Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora
Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora
Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora
Datavail
 
EPM 11.2: Lessons Learned and 2021 Preparedness
EPM 11.2: Lessons Learned and 2021 PreparednessEPM 11.2: Lessons Learned and 2021 Preparedness
EPM 11.2: Lessons Learned and 2021 Preparedness
Datavail
 
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major GainsOptimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Datavail
 
RMOUG 2020: Keeping Pace with Change
RMOUG 2020: Keeping Pace with Change RMOUG 2020: Keeping Pace with Change
RMOUG 2020: Keeping Pace with Change
Datavail
 
Upcoming Extended Support Deadlines & What They Mean for You
Upcoming Extended Support Deadlines & What They Mean for YouUpcoming Extended Support Deadlines & What They Mean for You
Upcoming Extended Support Deadlines & What They Mean for You
Datavail
 
SQL on Linux
SQL on LinuxSQL on Linux
SQL on Linux
Datavail
 
Reduce Cost by Tuning Queries on Azure DBaaS
Reduce Cost by Tuning Queries on Azure DBaaSReduce Cost by Tuning Queries on Azure DBaaS
Reduce Cost by Tuning Queries on Azure DBaaS
Datavail
 
MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...
MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...
MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...
Datavail
 
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and WhyEssbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Datavail
 
Is "Free" Good Enough for Your MySQL Environment?
Is "Free" Good Enough for Your MySQL Environment?Is "Free" Good Enough for Your MySQL Environment?
Is "Free" Good Enough for Your MySQL Environment?
Datavail
 
Critical Preflight Checks for Your EPM Applications
Critical Preflight Checks for Your EPM ApplicationsCritical Preflight Checks for Your EPM Applications
Critical Preflight Checks for Your EPM Applications
Datavail
 
SQL to Azure Migrations
SQL to Azure MigrationsSQL to Azure Migrations
SQL to Azure Migrations
Datavail
 
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and WhyEssbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Datavail
 
3 Ways to Lead an Accidental DBA
3 Ways to Lead an Accidental DBA3 Ways to Lead an Accidental DBA
3 Ways to Lead an Accidental DBA
Datavail
 
Creating a Solid EPM Punch List
Creating a Solid EPM Punch ListCreating a Solid EPM Punch List
Creating a Solid EPM Punch List
Datavail
 
Why NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB AtlasWhy NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB Atlas
Datavail
 

More from Datavail (20)

Journey to Cloud Analytics
Journey to Cloud Analytics Journey to Cloud Analytics
Journey to Cloud Analytics
 
Accelerate SQL Server Migration to the AWS Cloud
Accelerate SQL Server Migration to the AWS Cloud Accelerate SQL Server Migration to the AWS Cloud
Accelerate SQL Server Migration to the AWS Cloud
 
MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?
MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?
MOUS 2020 - Hyperion 11.2 vs. Cloud: Should I Stay or Should I Go?
 
Oracle Enterprise Manager Seven Robust Features to Put in Action final
Oracle Enterprise Manager Seven Robust Features to Put in Action finalOracle Enterprise Manager Seven Robust Features to Put in Action final
Oracle Enterprise Manager Seven Robust Features to Put in Action final
 
Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora
Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora
Lessons from Migrating Oracle Databases to Amazon RDS or Amazon Aurora
 
EPM 11.2: Lessons Learned and 2021 Preparedness
EPM 11.2: Lessons Learned and 2021 PreparednessEPM 11.2: Lessons Learned and 2021 Preparedness
EPM 11.2: Lessons Learned and 2021 Preparedness
 
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major GainsOptimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
 
RMOUG 2020: Keeping Pace with Change
RMOUG 2020: Keeping Pace with Change RMOUG 2020: Keeping Pace with Change
RMOUG 2020: Keeping Pace with Change
 
Upcoming Extended Support Deadlines & What They Mean for You
Upcoming Extended Support Deadlines & What They Mean for YouUpcoming Extended Support Deadlines & What They Mean for You
Upcoming Extended Support Deadlines & What They Mean for You
 
SQL on Linux
SQL on LinuxSQL on Linux
SQL on Linux
 
Reduce Cost by Tuning Queries on Azure DBaaS
Reduce Cost by Tuning Queries on Azure DBaaSReduce Cost by Tuning Queries on Azure DBaaS
Reduce Cost by Tuning Queries on Azure DBaaS
 
MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...
MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...
MOUS 2019 - Keeping Pace with Change: Prepare for Tomorrow & Advance Your Car...
 
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and WhyEssbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
 
Is "Free" Good Enough for Your MySQL Environment?
Is "Free" Good Enough for Your MySQL Environment?Is "Free" Good Enough for Your MySQL Environment?
Is "Free" Good Enough for Your MySQL Environment?
 
Critical Preflight Checks for Your EPM Applications
Critical Preflight Checks for Your EPM ApplicationsCritical Preflight Checks for Your EPM Applications
Critical Preflight Checks for Your EPM Applications
 
SQL to Azure Migrations
SQL to Azure MigrationsSQL to Azure Migrations
SQL to Azure Migrations
 
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and WhyEssbase On-Prem to Oracle Analytics Cloud - How, When, and Why
Essbase On-Prem to Oracle Analytics Cloud - How, When, and Why
 
3 Ways to Lead an Accidental DBA
3 Ways to Lead an Accidental DBA3 Ways to Lead an Accidental DBA
3 Ways to Lead an Accidental DBA
 
Creating a Solid EPM Punch List
Creating a Solid EPM Punch ListCreating a Solid EPM Punch List
Creating a Solid EPM Punch List
 
Why NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB AtlasWhy NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB Atlas
 

Datavail Health Check

  • 1. 7/14/2014 1www.datavail.com About Your Presenter Andy McDermid, SQL Server DBA, Datavail Andy is a MCITP certified MS SQL DBA who delivers and manages delivery of DBA services to many diverse clients. He enjoys helping his clients by finding and deploying pragmatic and practical solutions for their database issues. Andy is always working to improve and expand his DBA skills and he likes to share the experience via writing. You can read more about his work here http://andrewmcdermid.net.
  • 2. How Regular SQL Health Checks Keep Your Database in Shape Andy McDermid SQL Server DBA, Datavail Andy.mcdermid@datavail.com NWOSSUG, Toledo
  • 3. 7/14/2014 3www.datavail.com Your Chance To Win! Make sure you fill out our presentation evaluation for your chance to win a new Xbox!
  • 4. 7/14/2014 4www.datavail.com About Me Andy McDermid • Broomfield, CO • Principal SQL DBA at Datavail Blog: http://www.datavail.com/blog | Twitter: @oldskipole
  • 5. 7/14/2014 5www.datavail.com About Datavail Datavail is a managed service provider for databases • OracleDB2 • MySQL • MS SQL • Oracle & Oracle EBS • No SQL 24x7x365 Coverage • U.S.-based DBA team • Offshore team Datavail DBAs work with many SQL servers Health Checks used to expose the issues Recurring health checks keep servers up to standards Frees up time so you can be more strategic
  • 6. 7/14/2014 6www.datavail.com About This Presentation SQL Health Checks • Achieve and maintain a standard of health for each instance The most common misconfigurations and set up issues • After thousands of health checks for many servers, these are the top issues • Review the function • What is the default and is it appropriate? • What might be the best settings to work towards a standard configuration * These are best practices and you should make the best decision for your specific environment.
  • 7. 7/14/2014 7www.datavail.com Three Parts of This Presentation 1. Easy Picking Server and database configurations, backups 2. Best Bang Server configuration, index topics 3. Long Road DB file location, size and growth, tempdb configuration
  • 9. 7/14/2014 9www.datavail.com Server Configuration (sp_configure options) Priority boost • Sets the SQL service to run at the highest priority -13 • Default is 0 – which is priority of 7 • May starve other processes – network and OS • Depreciated
  • 10. 7/14/2014 10www.datavail.com Server Configuration (sp_configure options) Recovery Interval • Approximately how long to recover database after a restart or crash • Default setting is 0 which means ~ 1 minute recovery time • Affects checkpoint frequency so may be adjusted to reduce IO spikes
  • 11. 7/14/2014 11www.datavail.com CPU affinity mask • Designates a set of logical CPU to an instance • Default is 0 – no specific association • Typical use case – stacked instances • Three methods to change – SQL Server Management Studio – sp_configure ‘affinity mask’ (and ‘affinity64 mask’ if >64 CPU) – ALTER SERVER CONFIGURATION SET PROCESS AFFINITY • Avoid hard binding – enable trace flag 8002 Server Configuration (sp_configure options)
  • 12. 7/14/2014 12www.datavail.com Database Options Auto close • DB ‘closes’ when there are no users connections • Default is disabled • Databases migrated from SQL 2000 MSDE • Unnecessary overhead, depreciated Auto shrink • Free DB space automatically returned to OS • Default is disabled • Always … no wait … never a good idea • Causes fragmentation • Manage file size and growth manually
  • 13. 7/14/2014 13www.datavail.com Page verify • Checks page for corruption on each read • Default is CHECKSUM but databases migrated from older versions may be using Torn Page Detection, None • CHECKSUM vs Torn Page Detection • CHECKSUM – the more complete option Database Options
  • 14. 7/14/2014 14www.datavail.com Backups Missing • Missing full backups • Missing transaction log backups Misconfigured • Destination • Low or no retention days Failing • Reduce duration with Striped files or BUFFERCOUNT • Plan to accommodate X days and account for growth
  • 15. 7/14/2014 15www.datavail.com Policy Based Management Easy method to keep an instance up to standard 1. Define configuration ‘template’ 2. Build it as a set of policies 3. Evaluate regularly (e.g. monthly checkups)
  • 17. 7/14/2014 17www.datavail.com Server Configuration (sp_configure options) Maximum Memory • Default is 2147483647 • Sets the buffer pool size (includes plan cache) • Reserve for OS - rule of thumb – 1 GB of RAM for the OS – 1 GB for each 4 GB of RAM installed from 4–16 GB, – 1 GB for every 8 GB RAM installed above 16 GB RAM Minimum Memory • Dedicated instance- consider setting Min = Max
  • 18. 7/14/2014 18www.datavail.com Memory Pressure • If Target Server Memory depressed below Maximum Memory = external pressure • If Total Server Memory depressed below Target Server Memory = internal pressure Server Configuration (sp_configure options)
  • 19. 7/14/2014 19www.datavail.com Max Degree of Parallelism • Default is 0 – as many degrees as logical CPU • May not be optimal for instances with many CPUs • Microsoft recommends a per NUMA node calculation: CPU/NUMA node – E.g. 16 CPU with 4 NUMA nodes = MDOP 4 Server Configuration (sp_configure options)
  • 20. 7/14/2014 20www.datavail.com Cost Threshold for Parallelism – Controls when a plan goes parallel – Default is 5 (query cost) – Query the plan cache for typical query costs and set CTFP accordingly Server Configuration (sp_configure options)
  • 21. 7/14/2014 21www.datavail.com Baselines Adjust SQL Server for maximum throughput 1. Configure instance to best practice 2. Gather baseline metrics 3. Evaluate 4. Tweak as necessary 5. Repeat
  • 22. 7/14/2014 22www.datavail.com Index fragmentation • Maintenance plans • Custom scripts to – Ignore unused low page count, low fragmentation – Threshold to reorganize or rebuild – Maximum duration Out of date statistics • Maintenance plans • Custom scripts Indexes
  • 23. 7/14/2014 23www.datavail.com Indexes Duplicate, overlapping, and unused Indexes • Drop or disable • Impacts of index sprawl – Database size on disk – Wasted buffer pool – Transaction log Missing indexes • Easy to find, easy to fix • Careful… but not too careful
  • 25. 7/14/2014 25www.datavail.com System and user database files on same disk • DR concern Data and log files on same disk • IO profile of Data and Log files San or VM or both • Does it even matter? Organizationally, yes. Database Files
  • 26. 7/14/2014 26www.datavail.com File growth too low • Default is 1MB data file • May result in continuous growth • External file fragmentation • Set growth and size appropriately, enable instant file initialization File growth in percent • Default is 10% for log files • Large file results in large grows • Small files results in small grows (many VLFs) • Set growth and size appropriately Database Files
  • 27. 7/14/2014 27www.datavail.com Database Files High VLF count • Log file fragmentation • Log growth creates VLFs – chunks less than 64MB and up to 64MB = 4 VLFs – chunks larger than 64MB and up to 1GB = 8 VLFs – chunks larger than 1GB = 16 VLFs • Slow recovery times - restores, reboots, failovers, ect • Rule of thumb – 512MB per VLF
  • 28. 7/14/2014 28www.datavail.com Reducing VLFs 1. Before you shrink the log file take note of the current size in MB – assuming this is the correct size –or whatever your new size is 2. Shrink, backup, repeat as necessary to minimize VLFs. Works best in a time of quiet so the log can clear easily – if there are many many vlfs, if not you may need to make quite a few transaction log backups between shrinks since the shrink clears unused VLF blocks. 3. Divide 8000MB into the original size, round up, grow the log back that many times in multiples of 8000MB. Database Files
  • 29. 7/14/2014 29www.datavail.com Temp DB Files • Default is one file and one log file • GAMSGAM contention • Trace Flag 1118 • Rule of thumb – multiple files – 1 per core up to 8, – then add 4 more at a time up to logical CPU
  • 30. 7/14/2014 30www.datavail.com Datavail Health Check Based on PBM style pass/fail evaluation Includes everything we discussed here and many more Easy to read summary page Comprehensive detail pages Compliance per category Customizable Automated
  • 31. Don’t forget to fill out the evaluation form for a chance to win an Xbox! Questions? For a copy of today’s presentation email Andrea.Crosby@Datavail.com