question

stout27 avatar image
stout27 asked

Is it possible to capture a stored procedure query using Extended Events on Azure SQL?

I am trying to see the actual query with parameters that are being run by a stored procedure. I am pretty sure you could do this with SQL Profiler. I only see the EXEC <SP> statement in Extended Events, not the inner query. Is this possible?

Thanks

stored-proceduresextended-events
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jwendt avatar image
Jwendt answered

Use SQL Profiler. Use the tuning template.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

stout27 avatar image stout27 commented ·


I don't think you can run profiler against an Azure SQL database? I tried the Profiler Extension for Azure Data Studio but I can't get it to show more than the EXEC <SP> command.

0 Likes 0 ·
JohnM avatar image
JohnM answered

Yes, you can use XE on any of the Azure SQL products. Profiler won't work against sql database as @stout27 mentions.

I'd start here: https://sqlperformance.com/2019/02/extended-events/capture-queries-sql-server

Erin has a lot of information out there around XE.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.