namespace SQLInsight.Core.Instances; /// /// Something a collector or rule depends on that not every SQL Server version or configuration offers. /// public enum Capability { /// /// The customer runs the server: backups, patching, files, tempdb and host configuration are theirs to manage. /// Absent on Azure SQL Managed Instance, where Azure does it. /// SelfManagedInfrastructure, /// Dynamic management views (sys.dm_*). SQL Server 2005+. DynamicManagementViews, /// The always-on default trace. SQL Server 2005+. DefaultTrace, /// The VIEW SERVER STATE permission, so monitoring does not need sysadmin. SQL Server 2005+. ViewServerStatePermission, /// Extended Events. SQL Server 2008+. ExtendedEvents, /// The built-in system_health Extended Events session (deadlock graphs). SQL Server 2008+. SystemHealthSession, /// system_health writes to a file target, so history survives the ring buffer. SQL Server 2012+. SystemHealthFileTarget, /// Always On availability group DMVs exist. SQL Server 2012+. AvailabilityGroupDmvs, /// Always On is enabled on this instance (runtime setting, not just the version). HadrEnabled, /// The CONNECT ANY DATABASE permission. SQL Server 2014+. ConnectAnyDatabasePermission, /// Query Store. SQL Server 2016+. QueryStore, /// sys.dm_exec_session_wait_stats. SQL Server 2016+. SessionWaitStats, /// DATABASEPROPERTYEX(..., 'LastGoodCheckDbTime'), so CHECKDB status does not need sysadmin. SQL Server 2016 SP2+. LastGoodCheckDbTime, /// sys.dm_db_log_info, so VLFs can be counted without sysadmin. SQL Server 2016 SP2+. LogInfoDmv, /// /// Memory grant and spill columns in sys.dm_exec_query_stats (total_grant_kb, total_spills …). /// SQL Server 2016 SP2+ and 2017 CU3+. /// QueryStatsMemoryColumns, /// sys.dm_exec_query_plan_stats (last actual execution plan). SQL Server 2019+. LastActualPlan, /// Granular server permissions such as VIEW SERVER PERFORMANCE STATE. SQL Server 2022+. GranularServerPermissions, /// sys.dm_exec_text_query_plan (cached plans as text, per statement). SQL Server 2005 SP2+. TextQueryPlan, }