Yet another SQL Server enthusiast


Azure SQL DB – Monitoring

Filed under: Uncategorized — sa @ 8:01 AM

In order to monitor the current workload we could use the following SQL DMV views and functions:

  • sys.dm_exec_sessions
  • sys.dm_exec_requests
  • sys.dm_exec_connections
  • sys.databases
  • sys.dm_exec_sql_text


SELECT s.session_id, s.last_request_start_time, s.host_name, s.program_name, db.[name] AS dbname, OBJECT_NAME(t.objectid, t.dbid) AS objname, t.[text], r.open_transaction_count, r.wait_type, r.last_wait_type, r.wait_resource
FROM sys.dm_exec_sessions s
JOIN sys.dm_exec_requests r ON s.session_id = r.session_id
OUTER APPLY sys.dm_exec_sql_text(r.sql_handle) t
LEFT JOIN sys.databases db ON t.dbid = db.database_id
ORDER BY s.last_request_start_time DESC


Also, we could use Azure Portal > SQL databases > AdventureWorks > Performance overview:


Note: blog post available @ 2017-12-22 7:50 EET



Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: