Forum Discussion
Getting SQL query performance into log analytics
A least for me there isn't a perf counter for what I wanted. It needs to run a query inside sql and send the output to log analytics.
PatrikHansson I am working on the SQL monitoring preview you saw in the tweet. We are calling DMVs to get the sql monitoring data. Currently we don't return a lot of details on query perf stats in the preview version. Is there a DMV that you would like to use for this? For example, sys.dm_exec_query_stats.
- PatrikHanssonAug 26, 2020Brass Contributor
I'm not a SQL guru but would like to get information on queries not behaving nice. It's been a while since I looked at this so I don't remember exactly what queries I was using in smss to get the info I wanted, and since i couldn't get it up on the dashboard at that time I stopped exploring.
But it was something like https://www.sqlserver-dba.com/2016/10/how-to-find-longest-running-queries-in-sql-server.html so I guess it was from https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-exec-query-stats-transact-sql?view=sql-server-ver15.