0

I have set up a SQL Database and enabled the activity log (with a storage account and log analytics workspace). Is there a way within Azure to be able to view realtime or near-realtime queries from the SQL Server? I'm not interested in a performance hit or anything -- now I'm just looking to log all queries so I can make sure that applications are running properly. Here are the resources I have set up:

enter image description here

I am looking to be able to see a history of all queries that have executed and not just "slow queries" or "currently-running queries", etc.. How can I view queries that are executed, or is this not possible inside Azure?

Here is an example from AWS (RDS + Cloudwatch) where I can do it out of the box:

enter image description here

4
  • Is is an Azure SQL Database or SQL Server on Azure? If the latter, look at Extended Events. Commented Nov 3, 2020 at 22:01
  • 1
    Azure SQL Database has Extended Events too: learn.microsoft.com/en-us/azure/azure-sql/database/… Commented Nov 3, 2020 at 22:04
  • @Larnu how can I find out? I know the server name shows something like david.database.windows.net, and I created it on Azure. Commented Nov 3, 2020 at 22:04
  • @DavidBrowne-Microsoft I see -- so there's no built in way to get a query log? I found this, which gives a SQL query to run: stackoverflow.com/questions/17920968/…. The first answer has a few broken links. Commented Nov 3, 2020 at 22:10

1 Answer 1

1

You can use Auditing or Extended Events using the "Query Batch Tracking" template to capture queries.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks, is there a way to view the blob storage files outside of SSMS?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.