question

ManuelBustamante-5839 avatar image
0 Votes"
ManuelBustamante-5839 asked PRADEEPCHEEKATLA-MSFT commented

How to see sql request in Log Analytics

Hello Team,

I would like to get in Log Analytics the same information we can find in Monitoring>>Query activity in Synapse Dedicated SQL Pool, which I believe is the same information we can find in system view sys.dm_pdw_exec_requests within SQL.

I followed all steps here:
https://docs.microsoft.com/en-us/answers/questions/278594/how-to-write-queries-for-synapse-on-log-analytics.html

with the difference that I've activated as destination the log analytics workspace AND the blob storage.
The funny thing is that I can see the logs in the blob storage but not in Log Analytics.


My diagnostic settings are:

106966-image.png


As described in the link here above I'm querying SynapseSqlPoolSqlRequests:

106988-image.png

Blob storage:

![107061-image.png][3]



[3]: /answers/storage/attachments/106965-image.png

azure-synapse-analyticsazure-monitor
image.png (96.0 KiB)
image.png (86.0 KiB)
image.png (92.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PRADEEPCHEEKATLA-MSFT avatar image
0 Votes"
PRADEEPCHEEKATLA-MSFT answered PRADEEPCHEEKATLA-MSFT commented

Hello @ManuelBustamante-5839,

Welcome to the Microsoft Q&A platform.

After configuring the diagnostics settings, it would take up to 15-20 minutes for the events to emit from Synapse SQL Pool into the Log Analytics workspace.

As per my repro, it took nearly 20 minutes for the events to appears in the Log Analytics.

107523-image.png

In case, if you are not able to see the events in the log analytics workspace after 30mins, please do let me know.

For more details, refer to Monitor workload - Azure portal.

Hope this helps. Do let us know if you any further queries.


  • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

  • Want a reminder to come back and check responses? Here is how to subscribe to a notification.


image.png (176.6 KiB)
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @PRADEEPCHEEKATLA-MSFT

Thank for your reply. Event after 1h I cannot see the logs in Log Analytics. One thing I didnt mention is that I've activated the option "Managed virtual network" when I created the Synapse Workspace, could this have an impact on the configuration? the Log Analytics workspace is not within the managed virtual network.


Kind regards,

0 Votes 0 ·

Hello @ManuelBustamante-5839,

That should not be a problem. Even my Synapse Analytics workspace created with managed virtual network.

108078-image.png

Could you please try to create a new Log Analytics workspace and try to configure the diagnostics settings and see if that works?


0 Votes 0 ·
image.png (68.0 KiB)

Hello @ManuelBustamante-5839,

Following up to see if your issue was resolved.

0 Votes 0 ·

Hello @PRADEEPCHEEKATLA-MSFT

Yes, the issue was solved.

My steps:
1. I created a new LogAnalytics workspace
2. I attached the Synapse workspace to the new LogAnalytics workspace
3. I queried the old one just to do a last check before to delete it and I saw the logs
4. I re-attached the Synapse workspace to the old LogAnalytics wortkspace

Thank for your help!





0 Votes 0 ·

Hello @ManuelBustamante-5839,

Glad to know that your issue has resolved. You can accept it as answer. This can be beneficial to other community members. Thank you.

0 Votes 0 ·