SlideShare uma empresa Scribd logo
1 de 24
SQL Server Troubleshooting and Performance Monitoring And throw in some performance tuning for giggles
Intro	 Stacy Hein Database Guy
Start with the Basics Start with the tools you know Logs, Logs, Logs Performance Monitor Some tools you might not know Traces Profiler Traces Execution plans Toad or other third party applications
Why do performance monitoring?	 Goes hand-in-hand with troubleshooting Identify bottlenecks (CPU, Memory, SQL queries, etc.) Planning (capacity management, end-of-life, etc.) Identify server/instance configuration issues Base-lining your servers Should start troubleshooting the SQL Server before the client says there is an issue.
The Usual Suspects Memory Processor Disk Database instance configuration Queries Maintenance
Performance Counters Remember that performance counters should not be taken individually.  Get the whole story. Most thresholds are dependent on the system and application. Ignore spikes.  Sustained thresholds are the only ones that count.
Memory	 A good place to start generally. 64 bit has helped with both memory and processor bottlenecks. More is good – always.
Memory Performance Counters Memory: Available Bytes Key counter especially when used with others. Memory: Pages / sec  Hard page faults – going to disk to get it. VMM goes to pagefile to retrieve. Above 20 suggests possible memory issue. Memory: Page Faults / Sec  Sum of hard an soft page faults
Memory Performance Counters Page File: % Usage  Also useful with the other counters. Some rules for the pagefile Move from system disk Put on more than one drive if possible Make it 2 times the size of the physical RAM in the server
Processor Performance Counters Processor:% Processor Time Total processing time for non-idle thread 80-90% means need processor Processor: %User Time Total time used for executing user processes (e.g. SQL) System: Processor Queue Over 2 = bad Consider how many cores and divide total by number of cores
Disk Performance Counters Physical disk PhysicalDisk: Avg. Read Queue Length  Should be less than  2  PhysicalDisk: Avg. Write Queue Length  Should be less than 2  PhysicalDisk: % Disk Time  more than 50% indicates a bottleneck
Disk Performance Counters Logical Disk SQL Server:BufferManager:Page reads/sec  SQL Server reading pages from disk. If you are near your hardware maximums for this counter tune your database by adding indexes, redesign queries, etc. SQL Server:BufferManager:Page writes/sec  SQL Server writing pages to disk.  If you are near your hardware maximums for this counter tune your database by adding indexes, redesign queries, etc.
Networking Performance Counters Network InterfaceBytes Total/sec  Network InterfaceBytes Sent/sec  Network InterfaceBytes Received/sec  Network InterfaceCurrent Bandwidth5 Don’t usually have a networking issue that is not the cable, the NIC, or route/rule issues.
Dynamic Management Views and Functions Can get performance counter data from these.   Is a snapshot not continuous Common ones used sys.dm_os_performance_counters sys.dm_os_sys_info sys.dm_os_wait_stats sys.dm_io_virtual_file_stats - function
Trace Flags Used in determining deadlocks (in this case anyway) 1204 Reports deadlock information formatted by each node involved in the deadlock 1222 formats deadlock information, first by processes and then by resources Use DBCC TRACEON to set
Profiler is your Friend Can execute and capture trace information for all transactions running on SQL server instance. Can isolate transactions you need to capture.
Database Instance Configuration Can affect server performance Examples Memory settings, processor affinity settings, affinity masks, AWE setting (for 32 bit instances), etc. If you are going to change your settings, understand the instances role
Instance Roles High Write Instance The database and log disk should be RAID 10 and separated on different physical volumes. The logical and physical model of the database is important.  High write tables should be on their own partitions.  This is also be true for very large, clustered indexes. Tempdb should be on its own RAID 10 partition and should have one data file for each core dedicated to SQL Server. Although disk is usually the primary issue with a high write system, put as much RAM as you can in this system.
Instance Roles High Read Instance (Reporting?) Memory, Memory, Memory is the most important component to a read-intensive system.  The more you have the more that can be accessed in memory and not read from disk. Tempdb should be on its own RAID 10 partition and should have one data file for each core dedicated to SQL Server.  If you are doing massive reads, you are probably doing calculations for reporting.  This operations are handled in tempdb now in SQL Server 2005 and forward. Although memory is the key to a system that does massive read operations, if you can afford it, make the database and log file partitions RAID 10 for when you would need to access them.
Instance Roles If your system is a hybrid the defaults should work for the server.  If not, tweak design and system settings as necessary careful to consider what the instance might be processing (i.e. more reads or more writes).
Other Keys to Troubleshooting	 Understand the data and applications on the instance The physical and logical design of the database coupled with the system setting will go far in establishing a high performing instance/server.  Well designed queries are also
Tuning Queries Execution Plans Profiler Third party apps Toad for SQL Server
Tuning Queries Rules for code creation Use procedures for the repetitive queries Avoid cursors Reduces the use of temp tables  Return only the rows an app needs Set NOCOUNT ON Use the schema when naming the object Do all DDL at top of procedures Use ANSI JOIN language Look for ANSI SET commands in your code
Maintenance Database maintenance is key to mitigating some performance problems.   Backups for obvious reasons Index fragmentation can cause issues for the server. Two options DBCC DBREINDEX and DBCC INDEXDEFRAG UPDATE STATISTICS - depends on your application. Be careful there is a performance trade off for recompiling queries.   Maintenance is a key component to the preventative side of server support.

Mais conteúdo relacionado

Mais procurados

Introduction to Oracle Database
Introduction to Oracle DatabaseIntroduction to Oracle Database
Introduction to Oracle Databasepuja_dhar
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuningYogiji Creations
 
Introduction to PySpark
Introduction to PySparkIntroduction to PySpark
Introduction to PySparkRussell Jurney
 
Spring Framework Petclinic sample application
Spring Framework Petclinic sample applicationSpring Framework Petclinic sample application
Spring Framework Petclinic sample applicationAntoine Rey
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptChien Chung Shen
 
End-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL ServerEnd-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL ServerKevin Kline
 
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified [❤PDF❤] Oracle 19c Database Administration Oracle Simplified
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified ZanderHaney
 
Microsoft SQL Server Query Tuning
Microsoft SQL Server Query TuningMicrosoft SQL Server Query Tuning
Microsoft SQL Server Query TuningMark Ginnebaugh
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsZohar Elkayam
 
Spring - Part 2 - Autowiring, Annotations, Java based Configuration - slides
Spring - Part 2 - Autowiring, Annotations, Java based Configuration - slidesSpring - Part 2 - Autowiring, Annotations, Java based Configuration - slides
Spring - Part 2 - Autowiring, Annotations, Java based Configuration - slidesHitesh-Java
 
How to find what is making your Oracle database slow
How to find what is making your Oracle database slowHow to find what is making your Oracle database slow
How to find what is making your Oracle database slowSolarWinds
 
Understanding and controlling transaction logs
Understanding and controlling transaction logsUnderstanding and controlling transaction logs
Understanding and controlling transaction logsRed Gate Software
 
Oracle backup and recovery
Oracle backup and recoveryOracle backup and recovery
Oracle backup and recoveryYogiji Creations
 
Real-Time Stock Market Analysis using Spark Streaming
 Real-Time Stock Market Analysis using Spark Streaming Real-Time Stock Market Analysis using Spark Streaming
Real-Time Stock Market Analysis using Spark StreamingSigmoid
 
Sql Server Performance Tuning
Sql Server Performance TuningSql Server Performance Tuning
Sql Server Performance TuningBala Subra
 

Mais procurados (20)

Introduction to Oracle Database
Introduction to Oracle DatabaseIntroduction to Oracle Database
Introduction to Oracle Database
 
Ms sql-server
Ms sql-serverMs sql-server
Ms sql-server
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
 
Introduction to PySpark
Introduction to PySparkIntroduction to PySpark
Introduction to PySpark
 
Spring Framework Petclinic sample application
Spring Framework Petclinic sample applicationSpring Framework Petclinic sample application
Spring Framework Petclinic sample application
 
Sql Server Basics
Sql Server BasicsSql Server Basics
Sql Server Basics
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning Concept
 
End-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL ServerEnd-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL Server
 
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified [❤PDF❤] Oracle 19c Database Administration Oracle Simplified
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified
 
Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
 
Microsoft SQL Server Query Tuning
Microsoft SQL Server Query TuningMicrosoft SQL Server Query Tuning
Microsoft SQL Server Query Tuning
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
 
Data Guard Architecture & Setup
Data Guard Architecture & SetupData Guard Architecture & Setup
Data Guard Architecture & Setup
 
Spring - Part 2 - Autowiring, Annotations, Java based Configuration - slides
Spring - Part 2 - Autowiring, Annotations, Java based Configuration - slidesSpring - Part 2 - Autowiring, Annotations, Java based Configuration - slides
Spring - Part 2 - Autowiring, Annotations, Java based Configuration - slides
 
How to find what is making your Oracle database slow
How to find what is making your Oracle database slowHow to find what is making your Oracle database slow
How to find what is making your Oracle database slow
 
Understanding and controlling transaction logs
Understanding and controlling transaction logsUnderstanding and controlling transaction logs
Understanding and controlling transaction logs
 
Spark SQL
Spark SQLSpark SQL
Spark SQL
 
Oracle backup and recovery
Oracle backup and recoveryOracle backup and recovery
Oracle backup and recovery
 
Real-Time Stock Market Analysis using Spark Streaming
 Real-Time Stock Market Analysis using Spark Streaming Real-Time Stock Market Analysis using Spark Streaming
Real-Time Stock Market Analysis using Spark Streaming
 
Sql Server Performance Tuning
Sql Server Performance TuningSql Server Performance Tuning
Sql Server Performance Tuning
 

Destaque

Паралельний імпорт: економіко-правові аспекти регулювання
Паралельний імпорт: економіко-правові аспекти регулюванняПаралельний імпорт: економіко-правові аспекти регулювання
Паралельний імпорт: економіко-правові аспекти регулюванняnadeh
 
Performance Monitoring And Tuning In Sql Server 2008 Tsql
Performance Monitoring And Tuning In Sql Server 2008 TsqlPerformance Monitoring And Tuning In Sql Server 2008 Tsql
Performance Monitoring And Tuning In Sql Server 2008 Tsqlcoolajju143
 
SQL Server 2016 Query store
SQL Server 2016 Query storeSQL Server 2016 Query store
SQL Server 2016 Query storeVitaliy Popovych
 
Linux Shell Scripting Craftsmanship
Linux Shell Scripting CraftsmanshipLinux Shell Scripting Craftsmanship
Linux Shell Scripting Craftsmanshipbokonen
 
Trouble shoot with linux syslog
Trouble shoot with linux syslogTrouble shoot with linux syslog
Trouble shoot with linux syslogashok191
 
UNIX - Class5 - Advance Shell Scripting-P2
UNIX - Class5 - Advance Shell Scripting-P2UNIX - Class5 - Advance Shell Scripting-P2
UNIX - Class5 - Advance Shell Scripting-P2Nihar Ranjan Paital
 
UNIX - Class4 - Advance Shell Scripting-P1
UNIX - Class4 - Advance Shell Scripting-P1UNIX - Class4 - Advance Shell Scripting-P1
UNIX - Class4 - Advance Shell Scripting-P1Nihar Ranjan Paital
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritpingchockit88
 
Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - TroubleshootingT. J. Saotome
 
Advanced Oracle Troubleshooting
Advanced Oracle TroubleshootingAdvanced Oracle Troubleshooting
Advanced Oracle TroubleshootingHector Martinez
 
Linux troubleshooting tips
Linux troubleshooting tipsLinux troubleshooting tips
Linux troubleshooting tipsBert Van Vreckem
 
unix training | unix training videos | unix course unix online training
unix training |  unix training videos |  unix course  unix online training unix training |  unix training videos |  unix course  unix online training
unix training | unix training videos | unix course unix online training Nancy Thomas
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingDan Morrill
 
Fusion Middleware 11g How To Part 2
Fusion Middleware 11g How To Part 2Fusion Middleware 11g How To Part 2
Fusion Middleware 11g How To Part 2Dirk Nachbar
 
25 Apache Performance Tips
25 Apache Performance Tips25 Apache Performance Tips
25 Apache Performance TipsMonitis_Inc
 

Destaque (20)

Паралельний імпорт: економіко-правові аспекти регулювання
Паралельний імпорт: економіко-правові аспекти регулюванняПаралельний імпорт: економіко-правові аспекти регулювання
Паралельний імпорт: економіко-правові аспекти регулювання
 
Performance Monitoring And Tuning In Sql Server 2008 Tsql
Performance Monitoring And Tuning In Sql Server 2008 TsqlPerformance Monitoring And Tuning In Sql Server 2008 Tsql
Performance Monitoring And Tuning In Sql Server 2008 Tsql
 
SQL Server 2016 Query store
SQL Server 2016 Query storeSQL Server 2016 Query store
SQL Server 2016 Query store
 
Linux Shell Scripting Craftsmanship
Linux Shell Scripting CraftsmanshipLinux Shell Scripting Craftsmanship
Linux Shell Scripting Craftsmanship
 
Trouble shoot with linux syslog
Trouble shoot with linux syslogTrouble shoot with linux syslog
Trouble shoot with linux syslog
 
UNIX - Class1 - Basic Shell
UNIX - Class1 - Basic ShellUNIX - Class1 - Basic Shell
UNIX - Class1 - Basic Shell
 
UNIX - Class5 - Advance Shell Scripting-P2
UNIX - Class5 - Advance Shell Scripting-P2UNIX - Class5 - Advance Shell Scripting-P2
UNIX - Class5 - Advance Shell Scripting-P2
 
UNIX - Class4 - Advance Shell Scripting-P1
UNIX - Class4 - Advance Shell Scripting-P1UNIX - Class4 - Advance Shell Scripting-P1
UNIX - Class4 - Advance Shell Scripting-P1
 
Unixshellscript 100406085942-phpapp02
Unixshellscript 100406085942-phpapp02Unixshellscript 100406085942-phpapp02
Unixshellscript 100406085942-phpapp02
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
 
Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - Troubleshooting
 
APACHE
APACHEAPACHE
APACHE
 
Advanced Oracle Troubleshooting
Advanced Oracle TroubleshootingAdvanced Oracle Troubleshooting
Advanced Oracle Troubleshooting
 
Linux troubleshooting tips
Linux troubleshooting tipsLinux troubleshooting tips
Linux troubleshooting tips
 
unix training | unix training videos | unix course unix online training
unix training |  unix training videos |  unix course  unix online training unix training |  unix training videos |  unix course  unix online training
unix training | unix training videos | unix course unix online training
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scripting
 
Fusion Middleware 11g How To Part 2
Fusion Middleware 11g How To Part 2Fusion Middleware 11g How To Part 2
Fusion Middleware 11g How To Part 2
 
25 Apache Performance Tips
25 Apache Performance Tips25 Apache Performance Tips
25 Apache Performance Tips
 
Tomcat next
Tomcat nextTomcat next
Tomcat next
 
Tomcat
TomcatTomcat
Tomcat
 

Semelhante a Sql server troubleshooting

Sql server performance tuning and optimization
Sql server performance tuning and optimizationSql server performance tuning and optimization
Sql server performance tuning and optimizationManish Rawat
 
Troubleshooting SQL Server
Troubleshooting SQL ServerTroubleshooting SQL Server
Troubleshooting SQL ServerStephen Rose
 
Dmv's & Performance Monitor in SQL Server
Dmv's & Performance Monitor in SQL ServerDmv's & Performance Monitor in SQL Server
Dmv's & Performance Monitor in SQL ServerZeba Ansari
 
Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014Antonios Chatzipavlis
 
Oracle R12 EBS Performance Tuning
Oracle R12 EBS Performance TuningOracle R12 EBS Performance Tuning
Oracle R12 EBS Performance TuningScott Jenner
 
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...javier ramirez
 
Lamp Stack Optimization
Lamp Stack OptimizationLamp Stack Optimization
Lamp Stack OptimizationDave Ross
 
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Knut Relbe-Moe [MVP, MCT]
 
Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...Alluxio, Inc.
 
Sql server 2016 it just runs faster sql bits 2017 edition
Sql server 2016 it just runs faster   sql bits 2017 editionSql server 2016 it just runs faster   sql bits 2017 edition
Sql server 2016 it just runs faster sql bits 2017 editionBob Ward
 
FOWA Scaling The Lamp Stack Workshop
FOWA Scaling The Lamp Stack WorkshopFOWA Scaling The Lamp Stack Workshop
FOWA Scaling The Lamp Stack Workshopdlieberman
 
Investigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesInvestigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesRichard Douglas
 
SQL Server It Just Runs Faster
SQL Server It Just Runs FasterSQL Server It Just Runs Faster
SQL Server It Just Runs FasterBob Ward
 
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back endSPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back endKnut Relbe-Moe [MVP, MCT]
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Aaron Shilo
 

Semelhante a Sql server troubleshooting (20)

Sql server performance tuning and optimization
Sql server performance tuning and optimizationSql server performance tuning and optimization
Sql server performance tuning and optimization
 
Troubleshooting SQL Server
Troubleshooting SQL ServerTroubleshooting SQL Server
Troubleshooting SQL Server
 
Dmv's & Performance Monitor in SQL Server
Dmv's & Performance Monitor in SQL ServerDmv's & Performance Monitor in SQL Server
Dmv's & Performance Monitor in SQL Server
 
Performance tuning in sql server
Performance tuning in sql serverPerformance tuning in sql server
Performance tuning in sql server
 
SQL 2005 Disk IO Performance
SQL 2005 Disk IO PerformanceSQL 2005 Disk IO Performance
SQL 2005 Disk IO Performance
 
Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014
 
Oracle R12 EBS Performance Tuning
Oracle R12 EBS Performance TuningOracle R12 EBS Performance Tuning
Oracle R12 EBS Performance Tuning
 
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
 
Lamp Stack Optimization
Lamp Stack OptimizationLamp Stack Optimization
Lamp Stack Optimization
 
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
 
Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...
 
Sql server 2016 it just runs faster sql bits 2017 edition
Sql server 2016 it just runs faster   sql bits 2017 editionSql server 2016 it just runs faster   sql bits 2017 edition
Sql server 2016 it just runs faster sql bits 2017 edition
 
Dba tuning
Dba tuningDba tuning
Dba tuning
 
FOWA Scaling The Lamp Stack Workshop
FOWA Scaling The Lamp Stack WorkshopFOWA Scaling The Lamp Stack Workshop
FOWA Scaling The Lamp Stack Workshop
 
Sql Server
Sql ServerSql Server
Sql Server
 
Investigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesInvestigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock Holmes
 
SQL Server It Just Runs Faster
SQL Server It Just Runs FasterSQL Server It Just Runs Faster
SQL Server It Just Runs Faster
 
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back endSPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
 
Managing SQLserver
Managing SQLserverManaging SQLserver
Managing SQLserver
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
 

Mais de Nathan Winters

Exch2010 compliance ngm f inal
Exch2010 compliance ngm f inalExch2010 compliance ngm f inal
Exch2010 compliance ngm f inalNathan Winters
 
Exchange 2010 storage improvements
Exchange 2010 storage improvementsExchange 2010 storage improvements
Exchange 2010 storage improvementsNathan Winters
 
Ultan kinahan dr - minasi 2010
Ultan kinahan   dr - minasi 2010Ultan kinahan   dr - minasi 2010
Ultan kinahan dr - minasi 2010Nathan Winters
 
Aidan finn vmm 2008 r2 - minasi forum 2010
Aidan finn   vmm 2008 r2 - minasi forum 2010Aidan finn   vmm 2008 r2 - minasi forum 2010
Aidan finn vmm 2008 r2 - minasi forum 2010Nathan Winters
 
The new rocket science stuff in microsoft pki
The new rocket science stuff in microsoft pkiThe new rocket science stuff in microsoft pki
The new rocket science stuff in microsoft pkiNathan Winters
 
Today's malware aint what you think
Today's malware aint what you thinkToday's malware aint what you think
Today's malware aint what you thinkNathan Winters
 
Nathan Winters Exchange 2010 protection and compliance
Nathan Winters Exchange 2010 protection and complianceNathan Winters Exchange 2010 protection and compliance
Nathan Winters Exchange 2010 protection and complianceNathan Winters
 
Migrating to Exchange 2010 and ad 2080 r2
Migrating to Exchange 2010 and ad 2080 r2Migrating to Exchange 2010 and ad 2080 r2
Migrating to Exchange 2010 and ad 2080 r2Nathan Winters
 
Desktop virtualization scott calvet
Desktop virtualization   scott calvetDesktop virtualization   scott calvet
Desktop virtualization scott calvetNathan Winters
 
Adfs 2 & claims based identity
Adfs 2 & claims based identityAdfs 2 & claims based identity
Adfs 2 & claims based identityNathan Winters
 
Nathan Winters TechDays UK Exchange 2010 IPC
Nathan Winters TechDays UK Exchange 2010 IPCNathan Winters TechDays UK Exchange 2010 IPC
Nathan Winters TechDays UK Exchange 2010 IPCNathan Winters
 
OCS Introduction for Learning Gateway Conference 2009
OCS Introduction for Learning Gateway Conference 2009OCS Introduction for Learning Gateway Conference 2009
OCS Introduction for Learning Gateway Conference 2009Nathan Winters
 
Introduction to Exchange 2010
Introduction to Exchange 2010Introduction to Exchange 2010
Introduction to Exchange 2010Nathan Winters
 
Eric Rux The Big One Merging 2 Companies
Eric Rux   The Big One   Merging 2 CompaniesEric Rux   The Big One   Merging 2 Companies
Eric Rux The Big One Merging 2 CompaniesNathan Winters
 
Ultan Kinahan Business Continuity & Dr With Virtualization And Doubletake
Ultan Kinahan   Business Continuity & Dr With Virtualization And DoubletakeUltan Kinahan   Business Continuity & Dr With Virtualization And Doubletake
Ultan Kinahan Business Continuity & Dr With Virtualization And DoubletakeNathan Winters
 
Thomas Deimel The World Of Hackintosh
Thomas Deimel   The World Of HackintoshThomas Deimel   The World Of Hackintosh
Thomas Deimel The World Of HackintoshNathan Winters
 
Joe Mc Glynn Sbs 2008 For The Small Business
Joe Mc Glynn   Sbs 2008 For The Small BusinessJoe Mc Glynn   Sbs 2008 For The Small Business
Joe Mc Glynn Sbs 2008 For The Small BusinessNathan Winters
 
Rhonda Layfield Sniffing Your Network With Netmon 3.3
Rhonda Layfield   Sniffing Your Network With Netmon 3.3Rhonda Layfield   Sniffing Your Network With Netmon 3.3
Rhonda Layfield Sniffing Your Network With Netmon 3.3Nathan Winters
 
Roger Grimes How I Fixed The Internets
Roger Grimes   How I Fixed The InternetsRoger Grimes   How I Fixed The Internets
Roger Grimes How I Fixed The InternetsNathan Winters
 
Nathan Winters What’s New And Cool In Ocs 2007 R2
Nathan Winters   What’s New And Cool In Ocs 2007 R2Nathan Winters   What’s New And Cool In Ocs 2007 R2
Nathan Winters What’s New And Cool In Ocs 2007 R2Nathan Winters
 

Mais de Nathan Winters (20)

Exch2010 compliance ngm f inal
Exch2010 compliance ngm f inalExch2010 compliance ngm f inal
Exch2010 compliance ngm f inal
 
Exchange 2010 storage improvements
Exchange 2010 storage improvementsExchange 2010 storage improvements
Exchange 2010 storage improvements
 
Ultan kinahan dr - minasi 2010
Ultan kinahan   dr - minasi 2010Ultan kinahan   dr - minasi 2010
Ultan kinahan dr - minasi 2010
 
Aidan finn vmm 2008 r2 - minasi forum 2010
Aidan finn   vmm 2008 r2 - minasi forum 2010Aidan finn   vmm 2008 r2 - minasi forum 2010
Aidan finn vmm 2008 r2 - minasi forum 2010
 
The new rocket science stuff in microsoft pki
The new rocket science stuff in microsoft pkiThe new rocket science stuff in microsoft pki
The new rocket science stuff in microsoft pki
 
Today's malware aint what you think
Today's malware aint what you thinkToday's malware aint what you think
Today's malware aint what you think
 
Nathan Winters Exchange 2010 protection and compliance
Nathan Winters Exchange 2010 protection and complianceNathan Winters Exchange 2010 protection and compliance
Nathan Winters Exchange 2010 protection and compliance
 
Migrating to Exchange 2010 and ad 2080 r2
Migrating to Exchange 2010 and ad 2080 r2Migrating to Exchange 2010 and ad 2080 r2
Migrating to Exchange 2010 and ad 2080 r2
 
Desktop virtualization scott calvet
Desktop virtualization   scott calvetDesktop virtualization   scott calvet
Desktop virtualization scott calvet
 
Adfs 2 & claims based identity
Adfs 2 & claims based identityAdfs 2 & claims based identity
Adfs 2 & claims based identity
 
Nathan Winters TechDays UK Exchange 2010 IPC
Nathan Winters TechDays UK Exchange 2010 IPCNathan Winters TechDays UK Exchange 2010 IPC
Nathan Winters TechDays UK Exchange 2010 IPC
 
OCS Introduction for Learning Gateway Conference 2009
OCS Introduction for Learning Gateway Conference 2009OCS Introduction for Learning Gateway Conference 2009
OCS Introduction for Learning Gateway Conference 2009
 
Introduction to Exchange 2010
Introduction to Exchange 2010Introduction to Exchange 2010
Introduction to Exchange 2010
 
Eric Rux The Big One Merging 2 Companies
Eric Rux   The Big One   Merging 2 CompaniesEric Rux   The Big One   Merging 2 Companies
Eric Rux The Big One Merging 2 Companies
 
Ultan Kinahan Business Continuity & Dr With Virtualization And Doubletake
Ultan Kinahan   Business Continuity & Dr With Virtualization And DoubletakeUltan Kinahan   Business Continuity & Dr With Virtualization And Doubletake
Ultan Kinahan Business Continuity & Dr With Virtualization And Doubletake
 
Thomas Deimel The World Of Hackintosh
Thomas Deimel   The World Of HackintoshThomas Deimel   The World Of Hackintosh
Thomas Deimel The World Of Hackintosh
 
Joe Mc Glynn Sbs 2008 For The Small Business
Joe Mc Glynn   Sbs 2008 For The Small BusinessJoe Mc Glynn   Sbs 2008 For The Small Business
Joe Mc Glynn Sbs 2008 For The Small Business
 
Rhonda Layfield Sniffing Your Network With Netmon 3.3
Rhonda Layfield   Sniffing Your Network With Netmon 3.3Rhonda Layfield   Sniffing Your Network With Netmon 3.3
Rhonda Layfield Sniffing Your Network With Netmon 3.3
 
Roger Grimes How I Fixed The Internets
Roger Grimes   How I Fixed The InternetsRoger Grimes   How I Fixed The Internets
Roger Grimes How I Fixed The Internets
 
Nathan Winters What’s New And Cool In Ocs 2007 R2
Nathan Winters   What’s New And Cool In Ocs 2007 R2Nathan Winters   What’s New And Cool In Ocs 2007 R2
Nathan Winters What’s New And Cool In Ocs 2007 R2
 

Último

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 

Último (20)

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 

Sql server troubleshooting

  • 1. SQL Server Troubleshooting and Performance Monitoring And throw in some performance tuning for giggles
  • 2. Intro Stacy Hein Database Guy
  • 3. Start with the Basics Start with the tools you know Logs, Logs, Logs Performance Monitor Some tools you might not know Traces Profiler Traces Execution plans Toad or other third party applications
  • 4. Why do performance monitoring? Goes hand-in-hand with troubleshooting Identify bottlenecks (CPU, Memory, SQL queries, etc.) Planning (capacity management, end-of-life, etc.) Identify server/instance configuration issues Base-lining your servers Should start troubleshooting the SQL Server before the client says there is an issue.
  • 5. The Usual Suspects Memory Processor Disk Database instance configuration Queries Maintenance
  • 6. Performance Counters Remember that performance counters should not be taken individually. Get the whole story. Most thresholds are dependent on the system and application. Ignore spikes. Sustained thresholds are the only ones that count.
  • 7. Memory A good place to start generally. 64 bit has helped with both memory and processor bottlenecks. More is good – always.
  • 8. Memory Performance Counters Memory: Available Bytes Key counter especially when used with others. Memory: Pages / sec Hard page faults – going to disk to get it. VMM goes to pagefile to retrieve. Above 20 suggests possible memory issue. Memory: Page Faults / Sec Sum of hard an soft page faults
  • 9. Memory Performance Counters Page File: % Usage Also useful with the other counters. Some rules for the pagefile Move from system disk Put on more than one drive if possible Make it 2 times the size of the physical RAM in the server
  • 10. Processor Performance Counters Processor:% Processor Time Total processing time for non-idle thread 80-90% means need processor Processor: %User Time Total time used for executing user processes (e.g. SQL) System: Processor Queue Over 2 = bad Consider how many cores and divide total by number of cores
  • 11. Disk Performance Counters Physical disk PhysicalDisk: Avg. Read Queue Length  Should be less than  2 PhysicalDisk: Avg. Write Queue Length  Should be less than 2 PhysicalDisk: % Disk Time  more than 50% indicates a bottleneck
  • 12. Disk Performance Counters Logical Disk SQL Server:BufferManager:Page reads/sec SQL Server reading pages from disk. If you are near your hardware maximums for this counter tune your database by adding indexes, redesign queries, etc. SQL Server:BufferManager:Page writes/sec SQL Server writing pages to disk. If you are near your hardware maximums for this counter tune your database by adding indexes, redesign queries, etc.
  • 13. Networking Performance Counters Network InterfaceBytes Total/sec Network InterfaceBytes Sent/sec Network InterfaceBytes Received/sec Network InterfaceCurrent Bandwidth5 Don’t usually have a networking issue that is not the cable, the NIC, or route/rule issues.
  • 14. Dynamic Management Views and Functions Can get performance counter data from these. Is a snapshot not continuous Common ones used sys.dm_os_performance_counters sys.dm_os_sys_info sys.dm_os_wait_stats sys.dm_io_virtual_file_stats - function
  • 15. Trace Flags Used in determining deadlocks (in this case anyway) 1204 Reports deadlock information formatted by each node involved in the deadlock 1222 formats deadlock information, first by processes and then by resources Use DBCC TRACEON to set
  • 16. Profiler is your Friend Can execute and capture trace information for all transactions running on SQL server instance. Can isolate transactions you need to capture.
  • 17. Database Instance Configuration Can affect server performance Examples Memory settings, processor affinity settings, affinity masks, AWE setting (for 32 bit instances), etc. If you are going to change your settings, understand the instances role
  • 18. Instance Roles High Write Instance The database and log disk should be RAID 10 and separated on different physical volumes. The logical and physical model of the database is important. High write tables should be on their own partitions. This is also be true for very large, clustered indexes. Tempdb should be on its own RAID 10 partition and should have one data file for each core dedicated to SQL Server. Although disk is usually the primary issue with a high write system, put as much RAM as you can in this system.
  • 19. Instance Roles High Read Instance (Reporting?) Memory, Memory, Memory is the most important component to a read-intensive system. The more you have the more that can be accessed in memory and not read from disk. Tempdb should be on its own RAID 10 partition and should have one data file for each core dedicated to SQL Server. If you are doing massive reads, you are probably doing calculations for reporting. This operations are handled in tempdb now in SQL Server 2005 and forward. Although memory is the key to a system that does massive read operations, if you can afford it, make the database and log file partitions RAID 10 for when you would need to access them.
  • 20. Instance Roles If your system is a hybrid the defaults should work for the server. If not, tweak design and system settings as necessary careful to consider what the instance might be processing (i.e. more reads or more writes).
  • 21. Other Keys to Troubleshooting Understand the data and applications on the instance The physical and logical design of the database coupled with the system setting will go far in establishing a high performing instance/server. Well designed queries are also
  • 22. Tuning Queries Execution Plans Profiler Third party apps Toad for SQL Server
  • 23. Tuning Queries Rules for code creation Use procedures for the repetitive queries Avoid cursors Reduces the use of temp tables Return only the rows an app needs Set NOCOUNT ON Use the schema when naming the object Do all DDL at top of procedures Use ANSI JOIN language Look for ANSI SET commands in your code
  • 24. Maintenance Database maintenance is key to mitigating some performance problems. Backups for obvious reasons Index fragmentation can cause issues for the server. Two options DBCC DBREINDEX and DBCC INDEXDEFRAG UPDATE STATISTICS - depends on your application. Be careful there is a performance trade off for recompiling queries.   Maintenance is a key component to the preventative side of server support.