SQLRX – SQL Server Administration – Tips From the Trenches SQL Server Administration – Tips From the Trenches Troubleshooting Reports of Sudden Slowdowns.

Slides:



Advertisements
Similar presentations
Yukon – What is New Rajesh Gala. Yukon – What is new.NET Framework Programming Data Types Exception Handling Batches Databases Database Engine Administration.
Advertisements

Proactivity in BizTalk? Tord Glad Nordahl 18. October 20121Proactivity - All environments are unique.
Proactivity in BizTalk?
Use the tools support uses.
Module 17 Tracing Access to SQL Server 2008 R2. Module Overview Capturing Activity using SQL Server Profiler Improving Performance with the Database Engine.
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
MCTS GUIDE TO MICROSOFT WINDOWS 7 Chapter 10 Performance Tuning.
ManageEngine TM Applications Manager 8 Monitoring Custom Applications.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 11: Monitoring Server Performance.
Chapter 14 Chapter 14: Server Monitoring and Optimization.
Gather SQL Server Performance Data with PowerShell
13.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft® Windows® Server 2003 Active Directory Infrastructure.
Chapter 11 - Monitoring Server Performance1 Ch. 11 – Monitoring Server Performance MIS 431 – created Spring 2006.
The Essentials: DMV’s and T-SQL for the DBA Rocky Mountain Tech Tri-Fecta.
11 MONITORING MICROSOFT WINDOWS SERVER 2003 Chapter 3.
Utility Database Chris
Virtualized Workloads Supported Instant Messaging (IM) IM Conferencing Presence Enterprise Voice (PSTN) Audio/Video Conferencing Web Conferencing.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Guest Processor: 12 Cores Memory: 32 GB Disks: 2-C: 4-D: Network: 1GB Guest Processor: 12 Cores Memory: 32 GB Disks: 2-C: 4-D: Network: 1GB Guest.
Connect with life Praveen Srvatsa Director | AsthraSoft Consulting Microsoft Regional Director, Bangalore Microsoft MVP, ASP.NET.
Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks.
SQL Server memory architecture and debugging memory Issues
Virtual Memory Tuning   You can improve a server’s performance by optimizing the way the paging file is used   You may want to size the paging file.
Copyright © 2007 Quest Software The Changing Role of SQL Server DBA’s Bryan Oliver SQL Server Domain Expert Quest Software.
Module 18 Monitoring SQL Server 2008 R2. Module Overview Monitoring Activity Capturing and Managing Performance Data Analyzing Collected Performance Data.
MCTS Guide to Microsoft Windows 7
Key Concepts About Performance Factors Affecting SQL Performance SQL Performance Tuning Methodologies SQL Performance Tuning Tools 1.
Maintaining a Mirrored Database Tips and Tricks by Paul G. Hiles.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
IBM Software Group ® DB2 Performance Expert for Multiplatforms Version 2.1 Step-by-step tutorial.
Learningcomputer.com SQL Server 2008 – Administration, Maintenance and Job Automation.
Monitoring Windows Server 2012
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Perfmon and Profiler 101.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
Amit Bansal CTO | Peopleware India (unit of eDominer Systems) | |
Chapter 10 System Monitoring Issues Performance Benchmarks NT Server Services Users and Server Access Information Task Manager for Applications Ram and.
Using Event Viewer Event Levels Creating Custom Views Windows Logs Monitoring Performance.
Enterprise Database Administration & Deployment SIG ▪ 313M ▪ Sept 29, 2005 ▪ 10:15 AM SQL Server 2005 Performance Diagnosis and Tuning using SQL Tools.
Troubleshooting SQL Server Performance: Tips &Tools Amit Khandelwal.
Monitoring and Managing Server Performance. Server Monitoring To become familiar with the server’s performance – typical behavior Prevent problems before.
1EMC CONFIDENTIAL—INTERNAL USE ONLY FAST VP and Exchange Server 2010 Don Turner Consultant Systems Integration Engineer Microsoft TPM.
Windows Server 2003 系統效能監視 林寶森
MISSION CRITICAL COMPUTING Siebel Database Considerations.
1 Chapter Overview Monitoring Access to Shared Folders Creating and Sharing Local and Remote Folders Monitoring Network Users Using Offline Folders and.
Diagnosing Performance with Wait Statistics Robert L Davis Principal Database
Copyright Sammamish Software Services All rights reserved. 1 Prog 140  SQL Server Performance Monitoring and Tuning.
System Center Operations Manager 2007 R2 Ricardo Noulez Senior Consultant – Microsoft Belux.
Troubleshooting Dennis Shasha and Philippe Bonnet, 2013.
Linkedin: dennisegraham Dennis E Graham Reporting For SQL Health.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
Improve query performance with the new SQL Server 2016 query store!! Michelle Gutzait Principal Consultant at
No more waiting. Sponsors About me  Database Technology Specialist  MVP  Blogger  Author 3
SQL Database Management
AX Performance Tools Present and Future
Monitoring Windows Server 2012
Troubleshooting SQL Server high CPU usage
SQL Server Data Collector From Every Angle
Query Performance Tuning: Start to Finish
SQL Server Monitoring Overview
MONITORING MICROSOFT WINDOWS SERVER 2003
Where to Start, What You Need
Root Cause Analysis with DMVs
Kris Hokanson That’s bad mmmkay! …Or, how to know when your SQL Server isn’t working as well as it could.
Analyzing Performance Problems Using XEvents, DMVs & Query Store
Performance And Scalability In Oracle9i And SQL Server 2000
Building a Performance Monitoring System using XEvents and DMVs
Advanced Database Topics
Analyzing Performance Problems Using XEvents, DMVs & Query Store
Presentation transcript:

SQLRX – SQL Server Administration – Tips From the Trenches SQL Server Administration – Tips From the Trenches Troubleshooting Reports of Sudden Slowdowns

SQLRX – SQL Server Administration – Tips From the Trenches Agenda  A Typical Call for Help  Perfmon (Performance Monitor)  Blocking  Deadlocking  Long running queries  Currently executing queries  Info on queries just completed  Why not Activity Monitor?  Why not 3 rd party tools?  Next Steps

SQLRX – SQL Server Administration – Tips From the Trenches A Typical Call for Help Your phone rings. On the other end is a manager who is asking what is going on with their application. “It’s slow. Everyone says it has been slow for a while now. What is causing this and how do we stop it?” No matter how much you monitor and are proactive, you will get these types of calls. You have virtually no access to details and the panicky manager wants answers NOW. Here is how I find answers….

SQLRX – SQL Server Administration – Tips From the Trenches Step 1 - Perfmon Check your Vital Signs!  Processors  Utilization >60%, >85%, >95%  Memory  SQL Server Page Life Expectancy < 300sec  Available Bytes > 100,000,000 (1GB)  Disks  Reads or Writes >20ms, >40ms, >80ms

SQLRX – SQL Server Administration – Tips From the Trenches Perfmon Processors Processor (% Processor Time) (for each processor) - The total amount of time a specific processor is busy. Warning Threshold > 60 Danger Threshold > 85 Extreme Danger Threshold > 95

SQLRX – SQL Server Administration – Tips From the Trenches Perfmon Memory (OS & SQL Server) Memory (Available Bytes) - The amount of physical memory available to processes. This must be 100 MB or more or you risk Windows being dedicated to memory management activities. Warning Threshold < 100,000,000 (1GB) Danger Threshold < 20,000,000 (200MB) Extreme Danger Threshold < 5,000,000 (5MB) SQLServer:Buffer Manager (Page life expectancy) - The average number of seconds that information remains in memory when it is not actively being used. Less than 300 seconds indicates memory pressure. Warning Threshold < 300 Danger Threshold < 200 Extreme Danger Threshold < 90

SQLRX – SQL Server Administration – Tips From the Trenches Perfmon Disks PhysicalDisk (Avg. Disk sec/Read) PhysicalDisk (Avg. Disk sec/Write) PhysicalDisk (Avg. Disk sec/Transfer) (All counters measure each disk) - Measures the response time of the disk subsystem. Best performance is 10 ms or less. Warning Threshold > Danger Threshold > Extreme Danger Threshold > 0.080

SQLRX – SQL Server Administration – Tips From the Trenches Perfmon

SQLRX – SQL Server Administration – Tips From the Trenches Blocking Blocking CTE script available on request.

SQLRX – SQL Server Administration – Tips From the Trenches

Deadlocking Event notifications - Sends info about a database or server event to a service broker service. Can be logged to a table and either reported on or alerted on using triggers. Does not need a job to capture deadlock info. ([ Script to set up event notifications available on request. Alerts – Can only tell you that a deadlock occurred and cannot give you info on what was causing the deadlock. You can make the SQL Agent receive WMI events to capture deadlock graph info. Requires a job and an alert to be added to the instance. See:

SQLRX – SQL Server Administration – Tips From the Trenches

Long running queries Gather long running queries periodically and load them into a table. You can use SQL Profiler or a server side trace as shown. Long Running Queries Trace script available on request.

SQLRX – SQL Server Administration – Tips From the Trenches microsecondsms

SQLRX – SQL Server Administration – Tips From the Trenches What queries are running right now and how are they performing? Currently Running Queries script available on request.

SQLRX – SQL Server Administration – Tips From the Trenches Dynamic Management Views (DMV’s) sys.dm_exec_requests - Returns information about each request that is executing within SQL Server See: SELECT * FROM sys.dm_exec_requests ** sql_handle is found here. sys.dm_exec_sql_text - Returns the text of the SQL batch that is identified by the specified sql_handle See: SELECT * FROM sys.dm_exec_sql_text(sql_handle)

SQLRX – SQL Server Administration – Tips From the Trenches

Find info on queries that have recently completed. Cached Queries script available on request.

SQLRX – SQL Server Administration – Tips From the Trenches

Dynamic Management Views (DMV’s) sys.dm_exec_query_stats - Returns aggregate performance statistics for cached query plans in SQL Server. The view contains one row per query statement. See: SELECT * FROM sys.dm_exec_query_stats ** sql_handle is found here. sys.dm_exec_sql_text - Returns the text of the SQL batch that is identified by the specified sql_handle See: SELECT * FROM sys.dm_exec_sql_text(sql_handle)

SQLRX – SQL Server Administration – Tips From the Trenches Why not use Activity Monitor? Notoriously slow and can negatively impact an already busy server. While Activity Monitor uses DMV’s to provide information, there is a cost associated with querying those DMV’s. Activity Monitor does a LOT of work behind the scenes and can add workload to an already overloaded server. Activity Monitor should not be used for long term monitoring of a SQL instance. Challenge: Capture Activity Monitor statements with SQL Profiler I found timeout errors as well as statements that took over 6 seconds to complete. And this was on my laptop with nothing else running!!

SQLRX – SQL Server Administration – Tips From the Trenches Why not use a 3 rd party tool? Constraints by design 3 rd party tools have to be specially configured to partially capture the data that we know to look at during a time of stress. If the 3 rd party tools were not constrained they would overwhelm the environments they are trying to monitor. Clients who currently use these tools still come to us to find problems!

SQLRX – SQL Server Administration – Tips From the Trenches For more information: Dan Hooper Principal, Vice President Sales & Marketing Integrated Services, Inc x101 Contact Us Lori Brown Senior Consultant Integrated Services, Inc x113 Next Steps & Resources… 1.SQL Health Check (free). 2.RemoteDBA Subscription – 1 st month Free w/ min 3 month subscription. 3.Contact us for the scripts shown in our presentation.