Hello All,
We have enabled diagnostic settings on Azure SQL server.
We need to identify the queries executed in time between a start time and end time and who all executed those queries. how should I do that ?
Also, we have enabled diagnsotic in azure blob on another server. so how to identify the same aspects w.r.t blob storage logs
Thnaks for the help in advance !
Naimish MakwanaPosted Jan 19, 2024, 9:43 AM
Sure, I can help with that.
For Azure SQL Server:
To identify the queries executed in a specific time range, you can use the Query Store feature in Azure SQL Server. Here’s a query that can be useful to see the most executed queries on your Azure SQL Server database12:
To identify who executed those queries, you can use the following query3:
For Azure Blob Storage:
To identify the queries executed in a specific time range, you need to list all blobs in the container and then apply filtering on the client side4. An alternative would be to import this information into an Azure Cognitive Search Index4.
To identify who accessed Azure Blob Storage, you can use the
UserPrincipalNamecolumn to identify the user and parse the column with JSONAuthorizationDetail.actionto identify the action of the user on storage5. You can also find this information in Storage Analytics Logs6.Please note that these are general guidelines and you might need to adjust the queries based on your specific requirements.
Thanks