sqldiag, sql nexus and pal - sql-articles.com · sql server performance data collection &...

15
SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet 04-Aug-2012

Upload: vothu

Post on 07-May-2018

233 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet

SQL ServerPerformance Data Collection & AnalysisUsingSQLDiag, SQL Nexus and PAL

Ramkumar GopalChennai SQL Server User Group Meet04-Aug-2012

Page 2: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet

4 years as a faculty with APTECH 8+ years as a Developer/DBA Blogging Internals on SQLServerCentral CTS Academy trainer on Internals/tuning topics MCTS, MCITP in SQL Server Working for HCL as Associate Consultant

Page 3: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet

Performance Data Collection Tools and Features SQLDiag SQL Nexus PAL

Page 4: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet

Perfmon Profiler DBCC Task Manager SSMS Activity Monitor SSMS Performance Reports DMVs (Glenn Berry) Management Data Warehouse Extended Events SQLDiag/PSSDiag SQL Nexus and PAL etc..

Page 5: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet

SQLDiag is a data collection utility SQLNexus and PAL tools can be used to analyze

data collected by the SQLDiag used by Microsoft Product Support Services team Both SQLDiag and PSSDiag tools are similar in all

aspects SQLDiag is available out of the box in SQL Server

2005 and all later versions Configuration XML

Page 6: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet

Windows Event Logs (Application, System, and Security) in .CSV files

PerfMon counters in .BLG file/s

SQL Server Profiler traces in .TRC file/s

SQL Server Blocking chains in a _BLK.TRC file

SQL Server error logs, configuration, point-in-time snapshots of several DMVs in a .OUT file

System information via the Msinfo32 utility in a .TXT file

Page 7: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet

Intermittent CPU spikes on the SQL Server box

Performance degradation during specific duration

Troubleshooting Blocking chains in SQL Server

Analyzing overall performance bottlenecks in SQL Server

using wait statistics

Identifying top queries by CPU, Duration, Reads and Writes

during a specific timeframe (say between 9:00 AM and 5:00

PM)

Top databases and logins consuming maximum CPU and IO

Troubleshooting performance issues with a batch job

Page 8: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet

http://msdn.microsoft.com/en-us/library/ms162833.aspx

Page 9: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet

SQLDiag

SQLDiag /B +01:00:00 /E +03:00:00

sqldiag /B +00:01:00 /E +00:02:00 /od:\PerfData

Page 10: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet

Data collected by SQLDiag

-> Errorlogs-> sp_configure-> sp_who-> sp_lock-> xp_msver-> sysprocesses-> sysdatabases-> sys.master_files-> Stats for currently running queries-> Head blockers-> SELECT @@version:-> SQL Server name (@@SERVERNAME):-> sys.dm_tran_database_transactions-> sys.dm_os_cluster_nodes-> sys.dm_db_session_space_usage

-> sys.dm_tran_active_transactions-> sys.dm_os_sys_info-> sys.dm_os_threads-> sys.dm_os_workers-> sys.dm_os_tasks-> sys.dm_io_pending_io_requests-> sys.dm_io_virtual_file_stats-> sys.dm_os_latch_stats-> sys.dm_os_latch_stats-> sys.dm_os_memory_clerks-> sys.dm_os_wait_stats-> sys.dm_os_waiting_tasks-> sysperfinfo snapshot #1

Page 11: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet

Prerequesties:

Report Viewer 2008 Redistributablehttp://www.microsoft.com/en-us/download/details.aspx?id=3841

RML Utilitieshttp://www.microsoft.com/downloads/en/details.aspx?FamilyId=7EDFA95A-

A32F-440F-A3A8-5160C8DBE926&displaylang=en

PerfStat Scriptshttp://sqlnexus.codeplex.com/wiki/PageInfo?title=Sql2005PerfStatsScriptRun StartSQLDiagTrace200[x].cmd in Command prompt (SQLDiag)

SQL Nexus Toolhttp://sqlnexus.codeplex.com/

Page 12: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet
Page 13: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet

Prerequesite:

Microsoft Chart Controlhttp://www.microsoft.com/en-us/download/details.aspx?id=14422

PAL Tool downloadhttp://pal.codeplex.com/

Page 14: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet
Page 15: SQLDiag, SQL Nexus and PAL - sql-articles.com · SQL Server Performance Data Collection & Analysis Using SQLDiag, SQL Nexus and PAL Ramkumar Gopal Chennai SQL Server User Group Meet