Yet another SQL Server enthusiast

2017-12-22

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

Example:

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

Azure.SQL.DB.Monitor

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

Azure.SQL.DB.Monitor.Performance.Overview

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

 

Advertisements

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:

WordPress.com Logo

You are commenting using your WordPress.com 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 WordPress.com.

%d bloggers like this: