Trim instance tag in the sqlserver performance counters query (#7351)

This commit is contained in:
Giovanni Luisotto 2020-04-21 22:42:35 +02:00 committed by GitHub
parent 2d61669cfd
commit 82c9f0f7f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -629,9 +629,9 @@ SET @SQL = N'SELECT DISTINCT
WHEN RTRIM(object_name) LIKE ''%:Availability Replica'' WHEN RTRIM(object_name) LIKE ''%:Availability Replica''
AND TRY_CONVERT(uniqueidentifier, spi.instance_name) IS NOT NULL -- for cloud only AND TRY_CONVERT(uniqueidentifier, spi.instance_name) IS NOT NULL -- for cloud only
THEN d.name + RTRIM(SUBSTRING(spi.instance_name, 37, LEN(spi.instance_name))) THEN d.name + RTRIM(SUBSTRING(spi.instance_name, 37, LEN(spi.instance_name)))
ELSE spi.instance_name ELSE RTRIM(spi.instance_name)
END AS instance_name,' END AS instance_name,'
ELSE 'spi.instance_name as instance_name, ' ELSE 'RTRIM(spi.instance_name) as instance_name, '
END END
+ +
'CAST(spi.cntr_value AS BIGINT) AS cntr_value, 'CAST(spi.cntr_value AS BIGINT) AS cntr_value,