SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Monitor spids on SQL Azure instance? Can we do it?


Monitor spids on SQL Azure instance? Can we do it?

Author
Message
vsamantha35
vsamantha35
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8807 Visits: 1264
Hi All,

Can I do the below for SQL Azure instance/db?

Suppose, I want to take a look at what is running right now . For example I want to run sp-who2 or execute sys.dm_exec_requests or sp_whoisactive to see if there is a blocking or want to see the waits
or want to create an extended events for a particular spid to monitor waits for a specific spid, Can we do that for sql azure db? if so, how can I monitor ?

I want to capture sp_whoisactive every 5 mins into a table to see what the SPIDs are doing and how long they have been executing.I used it quite often for monitoring onPrem SQL Instances.
Can I do the same for SQL Azure instance/dbs?

Thanks,

Sam
xsevensinzx
xsevensinzx
SSC-Insane
SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)

Group: General Forum Members
Points: 20687 Visits: 5639
I don't know if this exists for Azure SQL, but it does for Azure Data Warehouse. They have a nice Audit/Threat Detection feature you can enable that allows you to view all the activity on the SQL instance. You can tap into it via API and download the logs. It also includes the executed statements, durations, effected rows, volumes, client info (i.e.: SSMS, PowerBI,...) etc. If someone is running a query, dropping a table, simply making a connection or failing one, you can look at it and log it to Blob storage and or export it out to Excel for further auditing/reviews.

I don't think it gives you all the bits whoisactive gives you, but gives you something to chew on. It also does not include the execution plans though, but they do exist with other monitoring tools.

With that, you can also setup notifications based on those logs where it can notify you via email. For example, you can have it alert you if any user fails to connect to the instance X times.
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (350K reputation)SSC Guru (350K reputation)SSC Guru (350K reputation)SSC Guru (350K reputation)SSC Guru (350K reputation)SSC Guru (350K reputation)SSC Guru (350K reputation)SSC Guru (350K reputation)

Group: General Forum Members
Points: 350828 Visits: 34260
You can run Extended Events to capture this type of behavior. If you want to schedule a script to run, you can do that through Azure Automation.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
Product Evangelist for Red Gate Software
anthony.green
anthony.green
SSC Guru
SSC Guru (100K reputation)SSC Guru (100K reputation)SSC Guru (100K reputation)SSC Guru (100K reputation)SSC Guru (100K reputation)SSC Guru (100K reputation)SSC Guru (100K reputation)SSC Guru (100K reputation)

Group: General Forum Members
Points: 100480 Visits: 8698
The wonderful Adam Machanic released an update sp_whoisactive which works with Azure PAAS last night

http://www.whoisactive.com/downloads/



How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


vsamantha35
vsamantha35
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8807 Visits: 1264
Thanks Grant & Anthony. Will try those options. Thanks a lot.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search