Sample Header Ad - 728x90

decoding instance_name in sys.dm_os_performance_counters on Azure SQL Database

0 votes
2 answers
332 views
doing some work with the SQL Perfmon counters and banging my head against the wall trying to work out how to translate the instance_name column to a database name. So if I run a query like the following SELECT top 10 left(counter_name, 25), left(instance_name,40), cntr_value FROM sys.dm_os_performance_counters WHERE counter_name = 'Log Bytes Received/sec' I get a resultset like Log Bytes Received/sec _Total 0 Log Bytes Received/sec 100f6a49-cd58-432a-8680-ed0f1069c5ea 0 Log Bytes Received/sec dd7b88c8-43c4-48a8-bf97-e174bb5c5eca 0 Log Bytes Received/sec 7a0dc4f3-b236-4c0f-b42c-357bfd521b16 0 Log Bytes Received/sec 5d527545-4bcc-4c66-b315-e1f8fc653245 0 How do I translate the value of instance_name (100f6a49-cd58-432a-8680-ed0f1069c5ea) to a database_name I thought I could look in sys.databases but no luck
Asked by Stephen Morris - Mo64 (4656 rep)
Nov 9, 2021, 07:25 PM
Last activity: Jan 25, 2024, 10:27 AM