Filter data out from system databases for Azure SQL DB only (#8849)
* Excluding data from system databases like msdb,model which are not relevant for monitoring in Azure SQL Please enter the commit message for your changes. Lines starting * Addressing review comments to handle null scenarios
This commit is contained in:
parent
1d8a65069f
commit
35b75e959c
|
|
@ -438,6 +438,10 @@ WITH PerfCounters AS (
|
|||
ELSE d.[physical_database_name]
|
||||
END
|
||||
WHERE
|
||||
/*filter out unnecessary SQL DB system database counters, other than master and tempdb*/
|
||||
NOT (spi.object_name LIKE 'MSSQL%:Databases%' AND spi.instance_name IN ('model','model_masterdb','model_userdb','msdb','mssqlsystemresource'))
|
||||
AND
|
||||
(
|
||||
counter_name IN (
|
||||
'SQL Compilations/sec'
|
||||
,'SQL Re-Compilations/sec'
|
||||
|
|
@ -540,6 +544,7 @@ WITH PerfCounters AS (
|
|||
,'Latch Waits/sec'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
INSERT INTO @PCounters select * from PerfCounters
|
||||
|
|
|
|||
Loading…
Reference in New Issue