Fix sql_instance tag with sqlserver managed instance (#6116)
This commit is contained in:
parent
3f424b88c9
commit
329179c0ff
|
@ -1300,7 +1300,7 @@ const sqlAzureDBResourceGovernance string = `
|
||||||
IF SERVERPROPERTY('EngineEdition') = 5 -- Is this Azure SQL DB?
|
IF SERVERPROPERTY('EngineEdition') = 5 -- Is this Azure SQL DB?
|
||||||
SELECT
|
SELECT
|
||||||
'sqlserver_db_resource_governance' AS [measurement],
|
'sqlserver_db_resource_governance' AS [measurement],
|
||||||
server_name AS [sql_instance],
|
@@servername AS [sql_instance],
|
||||||
DB_NAME() as [database_name],
|
DB_NAME() as [database_name],
|
||||||
slo_name,
|
slo_name,
|
||||||
dtu_limit,
|
dtu_limit,
|
||||||
|
@ -1335,27 +1335,24 @@ SELECT
|
||||||
FROM
|
FROM
|
||||||
sys.dm_user_db_resource_governance WITH (NOLOCK);
|
sys.dm_user_db_resource_governance WITH (NOLOCK);
|
||||||
ELSE
|
ELSE
|
||||||
IF SERVERPROPERTY('EngineEdition') = 8 -- Is this Azure SQL Managed Instance?
|
BEGIN
|
||||||
BEGIN
|
IF SERVERPROPERTY('EngineEdition') = 8 -- Is this Azure SQL Managed Instance?
|
||||||
SELECT
|
SELECT
|
||||||
'sqlserver_instance_resource_governance' AS [measurement],
|
'sqlserver_instance_resource_governance' AS [measurement],
|
||||||
server_name AS [sql_instance],
|
@@SERVERNAME AS [sql_instance],
|
||||||
instance_cap_cpu,
|
instance_cap_cpu,
|
||||||
instance_max_log_rate,
|
instance_max_log_rate,
|
||||||
instance_max_worker_threads,
|
instance_max_worker_threads,
|
||||||
volume_local_iops,
|
tempdb_log_file_number,
|
||||||
volume_external_xstore_iops,
|
volume_local_iops,
|
||||||
volume_managed_xstore_iops,
|
volume_external_xstore_iops,
|
||||||
volume_type_local_iops,
|
volume_managed_xstore_iops,
|
||||||
volume_type_managed_xstore_iops,
|
volume_type_local_iops as voltype_local_iops,
|
||||||
volume_type_external_xstore_iops,
|
volume_type_managed_xstore_iops as voltype_man_xtore_iops,
|
||||||
volume_external_xstore_iops,
|
volume_type_external_xstore_iops as voltype_ext_xtore_iops,
|
||||||
volume_local_max_oustanding_io,
|
volume_external_xstore_iops as vol_ext_xtore_iops
|
||||||
volume_managed_xstore_max_oustanding_io,
|
from
|
||||||
volume_external_xstore_max_oustanding_io,
|
sys.dm_instance_resource_governance
|
||||||
tempdb_log_file_number
|
|
||||||
from
|
|
||||||
sys.dm_instance_resource_governance
|
|
||||||
END;
|
END;
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue