Here is a handy little SQL Snippet that will return information about those all important SQL Server Wait Types for your server. It uses the SQL Server Dynamic Management View (DMV) sys.dm_os_wait_stats in order to extrapolate the desired information. A column has also been added to provide details of the percentage of total wait time [...]
Posts under ‘Dynamic Management Views (DMV)’
DMV Query to identify all active SQL Server Sessions
You may already be aware that I am a big advocate of the SQL Server Dynamic Management Views (DMV’s) and the benifits that they bring to the Database Administrator. They certainly came in handy with a requirement I had recently whereby I needed to identify the IP Address of a specific SQL Server Login [...]
How to identify the most costly SQL Server queries using DMV’s
I was investigating a performance issue recently and so thought I would share the T-SQL query that I created with you.
There’s nothing new or magic here, the code snippet simply identifies the top 20 most expensive queries (currently cached) based on the cumulative CPU cost.
The query returns both the SQL Text from the sys.dm_exec_sql_text DMV [...]