Word of caution before you try/read this: I am using undocumented function to read the trace file. I do not grantee the results to be
Tag: DBA Queries
Getting List of Fragmented Indexes in a Database
Index fragmentation is naturally happens as an action of insert, deletes and updates. It is important to manage this fragmentation, if not you can have
Finding All Plans/SQL Statements that executed in Parallel
References: #21 Statement copied from The Rambling DBA: Jonathan Kehayias Blog
Get Top 50 SQL Statements/Query Plans
Finding out what statements causing grief on SQL Server has become significantly easier with SQL Server 2005+. I am using some of the DMV/DMF to
Listing blocking chain by tasks
References: #20
Getting file usage stats
You can use this DMV to see what SQL Server thinks about the I/O stall times. I don’t rely on it 100% but it helpful