From 287820e1fdcde1f87978c828a3731280e85c94bb Mon Sep 17 00:00:00 2001 From: Alex Protsenko <53046834+alexprotsenko@users.noreply.github.com> Date: Tue, 5 Nov 2019 17:05:04 +0300 Subject: [PATCH 1/7] Uploaded defaultruleset.csv --- .../sql-assessment-api/defaultruleset.csv | 235 ++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 samples/manage/sql-assessment-api/defaultruleset.csv diff --git a/samples/manage/sql-assessment-api/defaultruleset.csv b/samples/manage/sql-assessment-api/defaultruleset.csv new file mode 100644 index 0000000000..0610d01cc9 --- /dev/null +++ b/samples/manage/sql-assessment-api/defaultruleset.csv @@ -0,0 +1,235 @@ +id,itemType,tags,displayName,description,message,helpLink,object,target.platform,target.engineEdition,level +AutoCreateStats,definition,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']",Auto-Create Statistics should be on,"The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. + + When the Auto Create statistics setting is ON, the Query Optimizer creates statistics on one or more columns of a table or an indexed view, as necessary, to improve query plans and query performance.",Turn Auto-Create Statistics option on to improve query performance.,https://docs.microsoft.com/sql/relational-databases/statistics/statistics#CreateStatistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +AutoUpdateStats,definition,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']",Auto-Update Statistics should be on,"The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. + + When the Auto Update Statistics setting is ON, the Query Optimizer updates statistics when they are used by a query and when they might be out-of-date. Statistics become out-of-date after insert, update, delete, or merge operations change the data distribution in the table or indexed view. The Query Optimizer determines when statistics might be out-of-date by counting the number of data modifications since the last statistics update and comparing the number of modifications to a threshold. The threshold is based on the number of rows in the table or indexed view. The Query Optimizer checks for out-of-date statistics before compiling a query and before executing a cached query plan. Before compiling a query, the Query Optimizer uses the columns, tables, and indexed views in the query predicate to determine which statistics might be out-of-date. Before executing a cached query plan, the Database Engine verifies that the query plan references up-to-date statistics. The AUTO_UPDATE_STATISTICS option applies to statistics created for indexes, single-columns in query predicates, and statistics that are created by using the CREATE STATISTICS statement. This option also applies to filtered statistics.",Turn Auto-Update Statistics option on to improve query performance.,https://docs.microsoft.com/sql/relational-databases/statistics/statistics#UpdateStatistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +QueryStoreOn,definition,"['DefaultRuleset', 'Performance', 'QueryStore', 'Statistics']",Query Store should be active,"The Query Store feature provides you with insight on query plan choice and performance. It simplifies performance troubleshooting by helping you quickly find performance differences caused by query plan changes. Query Store automatically captures a history of queries, plans, and runtime statistics, and retains these for your review. It separates data by time windows so you can see database usage patterns and understand when query plan changes happened on the server. While Query Store collects queries, execution plans and statistics, its size in the database grows until this limit is reached. When that happens, Query Store automatically changes the operation mode to read-only and stops collecting new data, which means that your performance analysis is no longer accurate.",Make sure Query Store actual operation mode is 'Read Write' to keep your performance analysis accurate,https://docs.microsoft.com/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +TF174,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']",TF 174 increases the plan cache bucket count,"Trace Flag 174 increases the SQL Server plan cache bucket count from 40,009 to 160,001 on 64-bit systems. + When the SQL Server plan cache reaches its entry limit, plans that have low cost must be evicted in order to insert new plans. This can cause severe contention on the SOS_CACHESTORE spinlock and a high CPU usage occurs in SQL Server. + On 64-bit systems, the number of buckets for the SQL Server plan cache is 40,009. Therefore, the maximum number of entries that can fit inside the SQL Server plan cache is 160,036. Enabling trace flag 174 on high performance systems increases the size of the cache and can avoid SOS_CACHESTORE spinlock contention.",Consider enabling trace flag 174 to increase the plan cache bucket count.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information +TF634,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'ColumnStore']",TF 634 disables background columnstore compression,"Trace Flag 634 disables the background columnstore compression task. + SQL Server periodically runs the Tuple Mover background task that compresses columnstore index rowgroups with uncompressed data, one such rowgroup at a time. + Columnstore compression improves query performance but also consumes system resources. + You can control the timing of columnstore compression manually, by disabling the background compression task with trace flag 634, and then explicitly invoking ALTER INDEX...REORGANIZE or ALTER INDEX...REBUILD at the time of your choice.",Trace Flag 634 disables the background columnstore compression task. Verify need to set a non-default trace flag with the current system build and configuration.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information +TF652,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'Pages']",TF 652 disables page pre-fetching scans,"Trace Flag 652 disables page pre-fetching for scans. + The read-ahead process reads the full extent of a referenced database page into the buffer pool, before those contiguous database pages are consumed by scans. + Enabling the trace flag can lead to performance issues on queries that leverage pre-fetching.",Trace Flag 652 disables Page Pre-fetching Scans. Verify need to set a non-default trace flag with the current system build and configuration.,http://support.microsoft.com/kb/920093,Server,Windows,OnPremises,Information +TF661,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 661 disables Ghost Cleanup Task,"Trace Flag 661 disables the ghost record removal process. A ghost record is the result of a delete operation. + When you delete a record, the deleted record is kept as a ghost record. Later, the deleted record is purged by the ghost record removal process. When you disable this process, the deleted record is not purged. + Therefore, the space that the deleted record consumes is not freed. This behavior affects space consumption and the performance of scan operations. + If you turn off this trace Flag, the ghost record removal process works correctly.",Trace flag 661 disables the background ghost cleanup task. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/920093,Server,Windows,OnPremises,Information +TF834,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'ColumnStore']",TF 834 enables large-page allocations,"Trace Flag 834 causes the server to use large-page memory (LPM) model for the buffer pool allocations. Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload. Trace flag 834 is NOT recommended on SQL Server instances that use columnstore indexes.",Enable trace flag 834 to use large-page allocations to improve analytical and data warehousing workloads.,https://support.microsoft.com/help/4465518,Server,/^(Windows|Linux)$/,OnPremises,Information +TF834,override,,,"Trace Flag 834 causes the server to use large-page memory (LPM) model for the buffer pool allocations. Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload.",Consider enabling trace flag 834 to use large-page allocations to improve analytical and data warehousing workloads.,https://support.microsoft.com/help/2964518,,,,Warning +TF845,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']",TF 845 is not needed in SQL Server 2012 and higher versions,"Trace Flag 845 supports locking pages in memory in SQL Server Standard edition, which is needed together with trace flag 834 to use the large-page memory (LPM) model for the buffer pool allocations. + Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload. + Starting with SQL Server 2012 this behavior is enabled by default for Standard edition, and trace flag 845 must not be used.",Disable trace flag 845 in SQL Server 2012 and higher versions.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,Windows,OnPremises,Warning +TF902,definition,"['DefaultRuleset', 'TraceFlag', 'UpdateIssues']",TF 902: Database Upgrade Bypass should be disabled,"Trace Flag 902 bypasses execution of database upgrade script when installing a Cumulative Update or Service Pack. + This trace flag is not supported to run it continuously in a production environment. + If you encounter an error during script upgrade mode, it is recommended to contact Microsoft SQL Customer Service and Support (CSS) for further guidance.",Disable trace flag 902 which bypasses database upgrade.,https://support.microsoft.com/help/2163980,Server,Windows,OnPremises,Warning +TF1117,definition,"['DefaultRuleset', 'TraceFlag', 'DBFileConfiguration', 'Performance']",TF 1117 Enables Filegroup-level Autogrow,"Trace Flag 1117 initiates the growth of every file in the filegroup, when a file in the filegroup meets the autogrow threshold, and together with trace flag 1118, can help reduce allocation contention in the SQL Server TempDB database. + This trace flag affects all databases and is recommended only if every database is safe to be grow all files in a filegroup by the same amount.",Consider enabling trace flag 1117 to enable filegroup autogrow.,https://support.microsoft.com/help/2154845,Server,Windows,OnPremises,Information +TF1117,override,,TF 1117 has no effect in SQL Server 2016 and higher versions,"Trace Flag 1117 initiates the growth of every file in the filegroup, when a file in the filegroup meets the autogrow threshold, and together with trace flag 1118, can help reduce allocation contention in the SQL Server TempDB database. + Starting with SQL Server 2016, this behavior is controlled by the AUTOGROW_SINGLE_FILE and AUTOGROW_ALL_FILES options of ALTER DATABASE syntax.",Disable trace flag 1117 in SQL Server 2016 and higher versions.,https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup-options,,,,Warning +TF1118,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'Pages']",TF 1118 Disables Single Page Allocations,"Trace Flag 1118 forces page allocations on uniform extents instead of mixed extents, and together with trace flag 1117, can help reduce allocation contention in the SQL Server TempDB database. + When a new object is created, by default, the first eight pages are allocated from different extents (mixed extents). + Afterwards, when more pages are needed, those are allocated from that same extent (uniform extent). + The SGAM page is used to track these mixed extents, so can quickly become a bottleneck when numerous mixed page allocations are occurring. + This trace flag allocates all eight pages from the same extent when creating new objects, minimizing the need to scan the SGAM page and forces uniform extent allocations instead of mixed page allocations.",Consider enabling trace flag 1118 to force page allocations on uniform extents.,https://support.microsoft.com/help/328551,Server,Windows,OnPremises,Information +TF1118,override,,TF 1118 has no effect in SQL Server 2016 and higher versions,"Trace Flag 1118 forces page allocations on uniform extents instead of mixed extents, and together with trace flag 1117, can help reduce allocation contention in the SQL Server TempDB database. + When a new object is created, by default, the first eight pages are allocated from different extents (mixed extents). + Afterwards, when more pages are needed, those are allocated from that same extent (uniform extent). + The SGAM page is used to track these mixed extents, so can quickly become a bottleneck when numerous mixed page allocations are occurring. + This trace flag allocates all eight pages from the same extent when creating new objects, minimizing the need to scan the SGAM page and forces uniform extent allocations instead of mixed page allocations. + Starting with SQL Server 2016, this behavior is controlled by the SET MIXED_PAGE_ALLOCATION option of ALTER DATABASE syntax.",Disable trace flag 1118 in SQL Server 2016 and higher versions.,https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup-options,,,,Warning +TF1204,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']",TF 1204 returns deadlock information,"Trace Flag 1204 returns the resources and types of locks that are participating in a deadlock, including the affected command. + The resulting information is recorded in the SQL Server Errorlog.",Trace Flag 1204 returns deadlock information.,https://support.microsoft.com/help/832524,Server,/^(Windows|Linux)$/,OnPremises,Information +TF1211,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']",TF 1211: Lock Escalation should be enabled,"Trace Flag 1211 disables lock escalation based on memory pressure, or based on number of locks. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks. If the lock memory grows large enough, attempts to allocate additional locks for any query may fail and cause performance issues. + This trace flag should not be used in order to avoid inability to allocate lock resources because of insufficient memory. If lock escalation needs to be disabled, use trace flag 1224 instead.",Disable trace flag 1211 to allow lock escalation.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF1222,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']",TF 1222 returns deadlock information,"Trace Flag 1222 returns the resources and types of locks that are participating in a deadlock, including the affected command. + The resulting information is recorded in the SQL Server Errorlog, in XML format that does not comply with any XSD schema.",Trace Flag 1222 returns deadlock information.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information +TF1224,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']",TF 1224 should be disabled,"Trace Flag 1224 disables lock escalation based on the number of locks, unless SQL Server is under memory pressure. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks.",Disable trace flag 1224 to allow lock escalation.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF1229,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance', 'CPU']",TF 1229: Lock Partitioning should be enabled,"Trace Flag 1229 disables lock partitioning regardless of the number of CPUs. By default, SQL Server enables lock partitioning when a server has 16 or more CPUs, to improve the scalability characteristics of larger systems. + Disabling lock partitioning may cause can cause spinlock contention and poor performance, or unexpected behaviors when switching partitions.",Disable trace flag 1229 to allow lock partitioning.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF1236,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']",TF 1236: Database Lock Partitioning should be enabled,"Trace Flag 1236 enables database-level lock partitioning. + Lock Partitioning is utilized to improve the scalability characteristics on larger systems.",Enable trace Flag 1236 to allow database lock partitioning.,https://support.microsoft.com/help/2926217,Server,Windows,OnPremises,Warning +TF1236,override,,"TF 1236 is not needed in SQL Server 2012 SP3, SQL Server 2014 SP1 and higher versions.","Trace Flag 1236 enables database-level lock partitioning. + Starting with SQL Server 2012 SP3 and SQL Server 2014 SP1, this behavior is controlled by the engine and trace flag 1236 has no effect.","Disable trace flag 1236 in SQL Server 2012 SP3, SQL Server 2014 SP1 and higher versions.",,,,,Warning +TF1462,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'AvailabilityGroups']",TF 1462 should be disabled to allow Log Stream Compression,"Trace Flag 1462 disables log stream compression for asynchronous availability groups. + This feature is enabled by default on asynchronous replicas to optimize network bandwidth.",Disable trace flag 1462 to allow log stream compression.,https://docs.microsoft.com/sql/database-engine/availability-groups/windows/tune-compression-for-availability-group,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF2312,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",TF 2312 sets the default Cardinality Estimation model,"Trace Flag 2312 sets the Query Optimizer cardinality estimation model to the default version of the database compability level of SQL Server 2014 and higher versions. If the database compatibility level is lower than 120, enabling trace flag 2312 uses the cardinality estimation model of SQL Server 2014 (120).",Trace Flag 2312 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/2801413,Server,Windows,OnPremises,Warning +TF2312,override,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",,,,,,,,Information +TF2312,override,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",,,"TF2312 enables New CE model to SQL Server 2014 or above versions, dependent of the compatibility level of the database",,,,,Information +TF2330,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Indexes']",TF 2330 disables recording of index usage stats,"Trace Flag 2330 disables recording of index usage stats, which could lead to a non-yielding condition in SQL 2005.",Trace Flag 2330 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF2340,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",TF 2340 disables Batch Sorts for optimized nested loops joins,"Trace Flag 2340 causes SQL Server not to use a sort operation (batch sort) for optimized nested loops joins when generating a plan. + Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 2340 disables Batch Sorts for optimized nested loops joins.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information +TF2371,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Statistics']",TF 2371 enables a linear recompilation threshold for statistics,"Trace Flag 2371 causes SQL Server to change the fixed update statistics threshold to a linear update statistics threshold. + This is especially useful to keep statistics updated on large tables.",Enable trace Flag 2371 to allow a linear recompilation threshold for statistics.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,Windows,OnPremises,Information +TF2371,override,,TF 2371 has no effect in SQL Server 2016 and higher versions,"Trace Flag 2371 causes SQL Server to change the fixed update statistics threshold to a linear update statistics threshold. + This is especially useful to keep statistics updated on large tables. Starting with SQL Server 2016, for databases using compatibility level 130 and above, this behavior is controlled by the engine and trace flag 2371 has no effect.",Disable trace flag 2371 in SQL Server 2016 and higher versions when all databases are at compatibility level 130 and above.,,,,,Warning +TF2389,definition,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance']",TF 2389 enables automatic statistics for Ascending Keys,"Trace Flag 2389 enables automatically generated quick statistics for ascending keys (histogram amendment). + This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time. + Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 2389 enables automatic statistics for ascending keys. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/2801413,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information +TF2390,definition,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance', 'Indexes']",TF 2390 enables automatic statistics for Ascending or Unknown Keys,"Trace Flag 2390 enables automatically generated quick statistics for ascending or unknown keys (histogram amendment). + This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time. + Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 2390 enables automatic statistics for ascending or unknown keys. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/2801413,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information +TF2528,definition,"['DefaultRuleset', 'TraceFlag', 'DataIntegrity', 'DBCC']",TF 2528 disables parallel operations for integrity checking,"Trace Flag 2528 disables parallel checking of objects by DBCC CHECKDB, DBCC CHECKFILEGROUP, and DBCC CHECKTABLE. + By default, the degree of parallelism is automatically determined by the query processor. The maximum degree of parallelism is configured just like that of parallel queries. + When parallel checks are disabled, the DBCC commands will take longer to complete. + Starting with SQL Server 2014 SP2, a MAXDOP option is available to override the max degree of parallelism configuration option of sp_configure for the DBCC statements.",Trace Flag 2528 disables parallel operations for integrity checking.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF2549,definition,"['DefaultRuleset', 'TraceFlag', 'DBCC']",TF 2549 optimizes PHYSICAL_ONLY option of DBCC CHECKDB,"Trace Flag 2549 forces the DBCC CHECKDB command to assume each database file is on a unique disk drive but treating different physical files as one logical file. + This trace flag can improve the performance when using the PHYSICAL_ONLY option, but it's not recommended unless it is known that each file is based on a unique physical disk.",Trace Flag 2549 forces DBCC CHECKDB to treat different physical files as one logical file.,https://support.microsoft.com/help/2634571,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF2562,definition,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'TempDB']",TF 2562 forces the DBCC CHECKDB command to execute in a single batch,"Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch regardless of the number of indexes in the database. + This trace flag can improve the performance when using the PHYSICAL_ONLY option, but space requirements for TempDB may increase.",Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch.,https://support.microsoft.com/help/2634571,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF2566,definition,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'DataIntegrity']",TF 2566 disables default data purity check,"Trace Flag 2566 forces the DBCC CHECKDB command to execute without data purity check unless the DATA_PURITY option is specified. + For databases upgraded from earlier versions of SQL Server, it is recommended to run the DBCC CHECKDB WITH DATA_PURITY command at least once, to enable column-value integrity checks to happen by default.",Trace Flag 2566 disables default data purity check.,https://support.microsoft.com/help/945770,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF3023,definition,"['DefaultRuleset', 'TraceFlag', 'Backup']",TF 3023 enables Backup Checksum option by default,"Trace Flag 3023 enables the CHECKSUM option of the BACKUP command by default. + This trace flag forces the CHECKSUM option for BACKUP command even when not explicitely set. + Starting with SQL Server 2014, this behavior is controlled by setting the Backup Checksum Default configuration option.",Trace Flag 3023 enables CHECKSUM option as default for BACKUP command.,https://support.microsoft.com/help/2656988,Server,Windows,OnPremises,Information +TF3042,definition,"['DefaultRuleset', 'TraceFlag', 'Backup']",TF 3042 bypasses the default backup compression pre-allocation algorithm,"Trace Flag 3042 bypasses the default backup compression pre-allocation algorithm to allow the backup file to grow only as needed to reach its final size. + This trace flag can achieve space savings by allocating only the actual size required for the compressed backup, but might increase the overall backup operation time.",Trace Flag 3042 enables the bypass of the default backup compression.,https://docs.microsoft.com/sql/relational-databases/backup-restore/backup-compression-sql-server,Server,/^(Windows|Linux)$/,OnPremises,Information +TF3226,definition,"['DefaultRuleset', 'TraceFlag', 'Backup']",TF 3226 disables ErrorLog entries for every successful backup operation,"Trace Flag 3226 prevents SQL Server from recording an entry to the Errorlog on every successful backup operation. + Backup operations are registered in the Errorlog by default. Frequent backup operations can contribute to massive Errorlog files that become unwieldy.",Trace Flag 3226 disables ErrorLog entries for every successful backup operation.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information +TF4136,override,,,"Trace Flag 4136 disables parameter sniffing unless OPTION(RECOMPILE), WITH RECOMPILE or OPTIMIZE FOR value is used. Starting with SQL Server 2016, to accomplish this at the database level use the PARAMETER_SNIFFING option in ALTER DATABASE SCOPED CONFIGURATION. Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 4136 disables parameter sniffing. Verify need to set a non-default trace flag with the current system build and configuration.,,,,,Information +TF4136,definition,"['DefaultRuleset', 'TraceFlag']",TF 4136 disables Parameter Sniffing,"Trace Flag 4136 disables parameter sniffing unless OPTION(RECOMPILE), WITH RECOMPILE or OPTIMIZE FOR value is used, but does not apply to this SQL Server version. Starting with SQL Server 2016, to accomplish this at the database level use the PARAMETER_SNIFFING option in ALTER DATABASE SCOPED CONFIGURATION. Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 4136 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/980653,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF4137,override,,,"Trace Flag 4137 causes SQL Server to generate a plan using minimum selectivity when estimating AND predicates for filters to account for partial correlation instead of independence, under the query optimizer cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). + Does not apply to CE version 120 or above. Use trace flag 9471 instead. + Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'ASSUME_MIN_SELECTIVITY_FOR_FILTER_ESTIMATES' query hint. + Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 4137 causes SQL Server to generate a plan using partial correlation of filters. Verify need to set a non-default trace flag with the current system build and configuration.,,,,,Information +TF4137,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",TF 4137 causes plans to use partial correlation for filters,"Trace Flag 4137 causes SQL Server to generate a plan using minimum selectivity when estimating AND predicates for filters to account for partial correlation instead of independence, under the query optimizer cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). However it does not apply to this SQL Server version. + Does not apply to CE version 120 or above. Use trace flag 9471 instead. + Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'ASSUME_MIN_SELECTIVITY_FOR_FILTER_ESTIMATES' query hint. + Verify need to set a non-default trace flag with the current system build and configuration.",Trace flag 4137 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/2658214,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF4138,override,,,"Trace Flag 4138 causes SQL Server to generate a plan that does not use row goal adjustments with queries that contain TOP, OPTION (FAST N), IN, or EXISTS keywords. + Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'DISABLE_OPTIMIZER_ROWGOAL' query hint. + Verify need to set a Non-default trace flag with current system build and configuration.",Trace Flag 4138 enables plan that without row goal adjustments. Verify need to set a non-default trace flag with the current system build and configuration.,,,,,Information +TF4138,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",TF 4138 causes plans to not use Row Goal adjustments,"Trace Flag 4138 causes SQL Server to generate a plan that does not use row goal adjustments with queries that contain TOP, OPTION (FAST N), IN, or EXISTS keywords. + Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'DISABLE_OPTIMIZER_ROWGOAL' query hint. However it does not apply to this SQL Server version. + Verify need to set a Non-default trace flag with current system build and configuration.",Trace flag 4138 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/2667211,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF4139,override,,,"Trace Flag 4139 enables automatically generated quick statistics (histogram amendment) regardless of key column status. + This trace flag is recommended to be set in cases where queries access newly inserted key values that may change plan shape, but the new values are not yet updated in the statistics histogram for the affected columns. In this case, regardless of the leading statistics column status (ascending, descending, or stationary), the histogram used to estimate cardinality will be adjusted at query compile time. + This trace flag does not apply to the cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). + Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 4139 enables automatic statistics for any key ordering. Verify need to set a non-default trace flag with the current system build and configuration.,,,,,Information +TF4139,definition,"['DefaultRuleset', 'TraceFlag', 'Statistics']",TF 4139 enables automatic statistics for any key ordering,"Trace Flag 4139 enables automatically generated quick statistics (histogram amendment) regardless of key column status. + However, this trace flag does not apply to this SQL Server version. + Verify need to set a non-default trace flag with the current system build and configuration.",Trace flag 4139 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/2952101,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF4199,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer']",TF 4199 enables Query Optimizer fixes,Trace Flag 4199 enables Query Optimizer fixes released in SQL Server Cumulative Updates and Service Packs.,Trace Flag 4199 enables Query Optimizer fixes. Verify need to set a non-default trace flag with the current system build and configuration.,http://support.microsoft.com/help/974006,Server,/^(Windows|Linux)$/,OnPremises,Information +TF6498,override,,,,Trace Flag 6498 enables concurrent large queries.,,,,,Information +TF6498,override,,,"Trace Flag 6498 enables more than one large query compilation to gain access to the big gateway when there is sufficient memory available. + This trace flag can be used to keep memory usage for the compilation of incoming queries under control, avoiding compilation waits for concurrent large queries. + Starting with SQL Server 2014 SP2 and SQL Server 2016, this behavior is controlled by the engine and trace flag 1236 has no effect.","Disable trace flag 6498 in SQL Server 2014 SP2, SQL Server 2016 and higher versions.",,,,,Warning +TF6498,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory']",TF 6498 enables additional concurrent large queries,"Trace Flag 6498 enables more than one large query compilation to gain access to the big gateway when there is sufficient memory available. + However, this trace flag does not apply to this SQL Server version. + This trace flag can be used to keep memory usage for the compilation of incoming queries under control, avoiding compilation waits for concurrent large queries. + Starting with SQL Server 2014 SP2 and SQL Server 2016, this behavior is controlled by the engine and trace flag 1236 has no effect.",Trace Flag 6498 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/3024815,Server,Windows,OnPremises,Warning +TF6532,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 6532 enables performance improvements for Spatial data,"Trace Flag 6532 enables performance improvements of query operations with spatial data types. + The performance gain will vary, depending on the configuration, the types of queries, and the objects.",Enable trace flag 6532 to enable performance improvements for Spatial data.,https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,Information +TF6532.6533,override,,,"Trace Flag 6532 and trace flag 6533 enable performance improvements of query operations with spatial data types. + The performance gain will vary, depending on the configuration, the types of queries, and the objects.",Enable trace flag 6532 and trace flag 6533 to enable performance improvements for Spatial data.,,,,,Information +TF6532.6533,override,,,,Disable trace flag 6532 in SQL Server 2016 and higher versions.,,,,,Warning +TF6532.6533,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 6532 and TF 6533 enable performance improvements for Spatial data,"Trace flags 6532 and 6533 enable performance improvements of query operations with spatial data types. + However, this trace flag does not apply to this SQL Server version. + Starting with SQL Server 2016, this behavior is controlled by the engine and trace flags 6532 and 6533 have no effect.",Trace flags 6532 and 6533 do not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,Warning +TF6534,override,,,"Trace Flag 6534 enables performance improvements of query operations with spatial data types. + The performance gain will vary, depending on the configuration, the types of queries, and the objects.",Enable trace flag 6534 to enable performance improvement of query operations with spatial data types.,,,,,Information +TF6534,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 6534 enables performance improvements for Spatial data,"Trace Flag 6534 enables performance improvement of query operations with spatial data types. + However, this trace flag does not apply to this SQL Server version. + Verify need to set a Non-default trace flag with current system build and configuration.",Trace flag 6534 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,Warning +TF7412,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting,Trace Flag 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting. Consider enabling TF 7412 to have the ability to access runtime information on query execution plans for any session.,Enable trace flag 7412 to enables the lightweight profiling infrastructure for live query performance troubleshooting.,https://docs.microsoft.com/sql/relational-databases/performance/query-profiling-infrastructure,Server,/^(Windows|Linux)$/,OnPremises,Information +TF9024,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'Memory', 'CPU']",TF 9024 converts a global log pool memory object into NUMA node partitioned memory object.,TF9024 converts a global log pool memory object into NUMA node partitioned memory object.,Verify need to set a Non-default TF with current system build and configuration.,https://support.microsoft.com/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,Server,Windows,OnPremises,Warning +TF9024,override,,,,Consider enabling TF9024 to convert global log pool memory objects into NUMA node partitioned memory objects.,,,,,Information +TF9024,override,,,,"TF9024 is not needed in SQL Server 2012 SP3, SQL Server 2014 SP1 and above.",,,,,Warning +TF8048,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'CPU', 'Memory']",TF 8048 converts NUMA partitioned memory objects into CPU partitioned,TF 8048 converts NUMA partitioned memory objects into CPU partitioned.,Verify need to set a Non-default TF with current system build and configuration.,https://support.microsoft.com/en-us/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,Server,Windows,OnPremises,Warning +TF8048,override,,,,"TF8048 is not needed in SQL Server 2014 SP2, SQL Server 2016 and above.",,,,,Warning +TF8048,override,,,,Consider enabling TF 8048 to convert NUMA partitioned memory objects into CPU partitioned.,,,,,Information +DeprecatedFeatures,definition,"['DefaultRuleset', 'Deprecated', 'Security', 'UpdateIssues', 'Performance']",Deprecated or discontinued features should not be used,This check detects deprecated or discontinued features used on target SQL Server instance. Deprecated features may be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,Detected deprecated or discontinued feature uses: @{DeprecatedFeature}. We recommend to replace them with features actual for SQL Server version @{ProductVersion}.,https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +SystemHealthSession,definition,"['DefaultRuleset', 'XEvent', 'SystemHealth']",system_health XEvent session is not active,"This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. + We recommend that you do not stop, alter, or delete the system health session.",Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,https://docs.microsoft.com/sql/relational-databases/extended-events/use-the-system-health-session,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +SPServerDiagnosticsSession,definition,"['DefaultRuleset', 'XEvent', 'SystemHealth']",sp_server_diagnostics xEvent session is not active,"This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. + We recommend that you do not stop, alter, or delete the system health session.",Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-server-diagnostics-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning +BlackboxTrace,definition,"['DefaultRuleset', 'Traces']",Blackbox trace is configured and running,"This trace is designed to behave similarly to an airplane black box, to help you diagnose intermittent server crashes. It consumes more resources than the default trace and should not be running for extended periods of time.",Make sure you still need the blackbox trace and stop it otherwise.,https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-trace-create-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning +DefaultTrace,definition,"['DefaultRuleset', 'Traces']",No default trace was found or is not active,Default trace provides troubleshooting assistance to database administrators by ensuring that they have the log data necessary to diagnose problems the first time they occur.,Make sure that there is enough space for SQL Server to write the default trace file. Then have the default trace run by disabling and re-enabling it.,https://docs.microsoft.com/sql/relational-databases/policy-based-management/default-trace-log-files-disabled,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +HintsStatistics,definition,"['DefaultRuleset', 'QueryOptimizer', 'Performance', 'Statistics']",Hints are being used,"Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the Query Optimizer might select for a query. Because the SQL Server Query Optimizer typically selects the best execution plan for a query, we recommend that , , and be used only as a last resort by experienced developers and database administrators.","We recommend that , , and be used only as a last resort by experienced developers and database administrators, because the SQL Server Query Optimizer typically selects the best execution plan for a query.",https://docs.microsoft.com/sql/t-sql/queries/hints-transact-sql,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information +HintsUsageInModules,definition,"['DefaultRuleset', 'QueryOptimizer', 'Performance', 'Statistics']",Hints usage in modules,"Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the Query Optimizer might select for a query. Because the SQL Server Query Optimizer typically selects the best execution plan for a query, we recommend that , , and be used only as a last resort by experienced developers and database administrators.",@{Hint} was used in @{type_desc} @{Schema_Name}.@{Object_Name}.,https://docs.microsoft.com/sql/t-sql/queries/hints-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information +PlansUseRatio,definition,"['DefaultRuleset', 'Performance', 'QueryOptimizer']",Amount of single use plans in cache is high,Single use plans waste system resources.,Amount of single use plans in cache is high (@{SingleUsePlansUseRatio:P0}). Consider enabling the Optimize for ad hoc workloads setting on heavy OLTP ad-hoc workloads to conserve resources.,https://docs.microsoft.com/sql/database-engine/configure-windows/optimize-for-ad-hoc-workloads-server-configuration-option,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +HypotheticalIndexes,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Hypothetical indexes found,"Database has indexes that are marked as hypothetical. Hypothetical indexes are created by the Database Tuning Assistant (DTA) during its tests. If a DTA session was interrupted, these indexes may not be deleted. It is recommended to drop these objects as soon as possible.",Index @{IndexName} for @{Schema}.@{Object} is marked as hypothetical. It is recommended to drop hypothetical index @{IndexName} as soon as possible.,,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +HypotheticalStatistics,definition,"['DefaultRuleset', 'Statistics']",Hypothetical statistics found,"Database has statistics that are marked as hypothetical. Hypothetical statistics are created by the Database Tuning Assistant (DTA) during its tests. If a DTA session was interrupted, these statistics may not be deleted. It is recommended to drop these objects as soon as possible.",Statistics @{StatName} for @{Schema}.@{Object} is hypothetical. It is recommended to drop hypothetical statistics @{StatName} as soon as possible.,,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +LatestCU,definition,"['DefaultRuleset', 'Security', 'UpdateIssues']",SQL Server instance is not up to date,"On an installed instance of SQL Server, we recommend that you apply the latest security updates and critical updates including general distribution releases (GDRs), service packs (SPs), and cumulative updates (CUs).",Product version @{ProductVersion} is not the latest available. We recommend keeping your SQL Server up to date and install Service Packs and Cumulative Updates as they are released.,https://support.microsoft.com/help/321185/how-to-determine-the-version-edition-and-update-level-of-sql-server-an https://docs.microsoft.com/sql/database-engine/install-windows/install-sql-server-servicing-updates,Server,/^(Windows|Linux)$/,OnPremises,Warning +LatestCU,override,,SQL Server instance is up to date,,Product version @{ProductVersion} is the latest available.,https://support.microsoft.com/help/321185/how-to-determine-the-version-edition-and-update-level-of-sql-server-an https://docs.microsoft.com/sql/database-engine/install-windows/install-sql-server-servicing-updates,,,,Warning +FKNoIndexes,definition,"['DefaultRuleset', 'Performance', 'Indexes']",Foreign key constraints should have corresponding indexes,"Unlike primary key constraints, creating a foreign key constraint does not automatically create a corresponding index. However, manually creating an index on a foreign key is often useful.",Create a corresponding index for each foreign key. There is no index on the following foreign keys: @{ConstraintName}.,https://docs.microsoft.com/sql/relational-databases/tables/primary-and-foreign-key-constraints,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +MissedIndexes,definition,"['DefaultRuleset', 'Performance', 'Indexes']",Potentially missing indexes,Potentially missing indexes were found based on query history. It may be important to revise them. Please note that this check based on a scoring method and the results may be approximate - for information purposes only.,Create an index on @{Table} with key columns @{KeyCols}@{IncludedCols: and included columns: #},https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information +FullBackup,definition,"['DefaultRuleset', 'Backup']",Full backup is missed or outdated,Database doesn't have any full backup or the latest full backup is over 7 days.,Create a new full backup of the database,https://docs.microsoft.com/sql/relational-databases/backup-restore/create-a-full-database-backup-sql-server,Database,/^(Windows|Linux)$/,OnPremises,Warning +OutdatedTranLogBackup,definition,"['DefaultRuleset', 'Backup']",Transaction Log backup is missed or outdated,"Database does not have any transaction Log backup since the latest full or differential backup, or it's older than 24H.",Create a backup of Transaction Log. Database recovery model: @{recovery_model_desc},https://docs.microsoft.com/sql/relational-databases/backup-restore/back-up-a-transaction-log-sql-server,Database,/^(Windows|Linux)$/,OnPremises,Warning +DbDiffCollation,definition,"['DefaultRuleset', 'DBConfiguration', 'Collation']",Database collation doesn't match the collation of master,"We recommend that the collations of user-defined databases match the collation of master or model. Otherwise, collation conflicts can occur that might prevent code from executing. For example, when a stored procedure joins one table to a temporary table, SQL Server might end the batch and return a collation conflict error if the collations of the user-defined database and the model database are different. This occurs because temporary tables are created in tempdb, which bases its collation on that of model.",Keep database collation the same as the collation for master or model,https://docs.microsoft.com/sql/database-engine/set-collation-user-defined-databases-match-master-model-databases,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +AutoClose,definition,"['DefaultRuleset', 'Performance', 'DBConfiguration']",Auto Close Option should be OFF,"When AUTO_CLOSE is set ON, this can cause performance degradation on frequently accessed databases because of the increased overhead of opening and closing the database after each connection. AUTO_CLOSE also flushes the procedure cache after each connection.",Set AUTO_CLOSE option to OFF,https://docs.microsoft.com/sql/relational-databases/policy-based-management/set-the-auto-close-database-option-to-off,Database,/^(Windows|Linux)$/,OnPremises,Warning +AutoShrink,definition,"['DefaultRuleset', 'DBConfiguration', 'Performance']",Auto Shrink Option should be OFF,"Shrinking databases is the fastest way to achieve fragmentation. SQL Server goes to the last page in the database, moves it to the first free available space, and then repeats the process again. This shuffles the deck, putting your pages out of order.",Set AUTO_SHRINK option to OFF.,https://blogs.msdn.microsoft.com/buckwoody/2009/07/01/sql-server-best-practices-auto-shrink-should-be-off,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +PageVerify,definition,"['DefaultRuleset', 'DBConfiguration', 'DataIntegrity']",PAGE_VERIFY option should be CHECKSUM,"When CHECKSUM is enabled for the PAGE_VERIFY database option, the SQL Server Database Engine calculates a checksum over the contents of the whole page, and stores the value in the page header when a page is written to disk. When the page is read from disk, the checksum is recomputed and compared to the checksum value that is stored in the page header. This helps provide a high level of data-file integrity.",Set PAGE_VERIFY option to CHECKSUM.,https://docs.microsoft.com/sql/relational-databases/policy-based-management/set-the-page-verify-database-option-to-checksum,Database,/^(Windows|Linux)$/,OnPremises,Warning +DbChaining,definition,"['DefaultRuleset', 'DBConfiguration', 'Security']",Cross-Database Access should be disabled,Ownership chaining across databases is turned off by default. Microsoft recommends that you disable cross-database ownership chaining because it exposes you to the additional security risks.,Set DB_CHAINING option to OFF.,https://docs.microsoft.com/dotnet/framework/data/adonet/sql/enabling-cross-database-access-in-sql-server,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +AutoCreateStatsIncremental,definition,"['DefaultRuleset', 'DBConfiguration', 'Statistics', 'Performance']",Incremental option of auto stats should be ON,"Incremental statistics update at partition level is a feature introduced in SQL Server 2014. When the option INCREMENTAL is turn on at the database level, newly auto created column statistics will use incremental statistics on partitioned tables by default.",Set AUTO_CREATE_STATISTICS to ON and set INCREMENTAL to ON,https://docs.microsoft.com/sql/relational-databases/statistics/statistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +TrustWorthy,definition,"['DefaultRuleset', 'DBConfiguration', 'Security']",TRUSTWORTHY should be OFF,"You can use the TRUSTWORTHY database setting to indicate whether the instance of Microsoft SQL Server trusts the database and the contents within the database. By default, this setting is set to OFF to mitigate certain threats that may be present when a database is attached to the server.",Set TRUSTWORTHY option to OFF,https://support.microsoft.com/help/2183687/guidelines-for-using-the-trustworthy-database-setting-in-sql-server,Database,/^(Windows|Linux)$/,OnPremises,Warning +ParameterizationNotSimple,definition,"['DefaultRuleset', 'DBConfiguration', 'Performance', 'QueryOptimizer']",PARAMETERIZATION should be SIMPLE,"When the PARAMETERIZATION database option is set to SIMPLE, the SQL Server query optimizer may choose to parameterize the queries. This means that any literal values that are contained in a query are substituted with parameters. This process is referred to as simple parameterization. When SIMPLE parameterization is in effect, you cannot control which queries are parameterized and which queries are not. However, you can specify that all queries in a database be parameterized by setting the PARAMETERIZATION database option to FORCED. + + Regardless of whether you have a Plan-Stability or not, SQL Server will always auto parameterize your SQL Statements, and reuse the cached execution plan over and over again. It doesn't matter how terrible the execution plan is. Therefore you have to know in exact detail the shape of your execution plans, and whether they can lead to some performance related problems.","Set PARAMETERIZATION = SIMPLE and use forced parameterization only on a certain class of queries, instead of all queries",https://docs.microsoft.com/sql/relational-databases/performance/specify-query-parameterization-behavior-by-using-plan-guides,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +TempDBFilesNotSameSize,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",TempDB data files are not the same size,We recommend that you create all TempDB data files at the same size.,Make all TempDB data files the same size,https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning +TempDBFilesMultiple4,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",Number of TempDB data files should be in multiples of 4,"Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",Make sure number of TempDB data files is in multiples of 4,https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning +TempDBFiles1PerCPU,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",Number of TempDB data files should depend on CPU count,"Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",Make sure to have 1 data file per logical processor (processors count: @{online_logical_processors}),https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning +TempDBFilesNotLess8,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",Number of TempDB data files should be at least 8,"Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.","Add extra data files to TempDB. There are @{physical_name} data files, should be at least 8",https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning +TempDBFilesAutoGrowth,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",TempDB data files have different auto growth settings,"TempDB data files should be of equal size within each filegroup, as SQL Server uses a proportional-fill algorithm that favors allocations in files with more free space.",Make Autogrowth settings the same for each TempDB data file,https://docs.microsoft.com/sql/relational-databases/databases/tempdb-database,Server,/^(Windows|Linux)$/,OnPremises,Warning +FilesAutogrowth,definition,"['DefaultRuleset', 'Performance', 'DBFileConfiguration']",Database files have Autogrowth setting over 1GB,"A data or log file will be extended with auto-growth value to prevent the lack of free space in files. This process can perform significant impact on SQL Server performance if auto-growth value gets over 1 GB. By default, SQL Server will put zeros to a newly allocated space. And the more space it takes, the more time it takes to initialize it.",Set File Growth to less than 1GB for files: @{FileName},https://support.microsoft.com/help/315512/considerations-for-the-autogrow-and-autoshrink-settings-in-sql-server,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +DuplicateIndexes,definition,"['DefaultRuleset', 'Performance', 'Indexes']",There are tables with duplicate indexes,There are tables with duplicate indexes according to their definitions. We recommended to revise all these objects as soon as possible.,Consider removing duplicate indexes in table @{Table}: @{ToDelete},https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +RedundantIndexes,definition,"['DefaultRuleset', 'Performance', 'Indexes']",There are tables with possibly redundant indexes,There are tables with possibly redundant indexes according to the set of key and included columns. We recommended to revise all these objects as soon as possible.,Consider removing redundant indexes in table @{Table}: @{Indexes},https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +UserObjectsInMaster,definition,"['DefaultRuleset', 'masterDB', 'Backup']",User objects in database master,"We highly recommend you not create user objects in the master database. If it's unavoidable for some reason, make sure to back up the database more frequently.",Remove user objects from database master: @{Object_Name},https://docs.microsoft.com/sql/relational-databases/databases/master-database,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +CpuUtilOver70,definition,"['DefaultRuleset', 'Performance', 'CPU']",CPU usage over 70%,"CPU utilization rate in the last 2 hours is over 70% - consider review queries with high CPU usage or add additional hardware resources. Also, potential causes include memory pressure, low query plan reuse, non-optimized queries.",Investigate high CPU utilization by SQL Server: over 70% in the last 2 hours,https://docs.microsoft.com/previous-versions/technet-magazine/cc137784(v=msdn.10),Server,Windows,"OnPremises, ManagedInstance",Warning +CpuUtilOver90,definition,"['DefaultRuleset', 'Performance', 'CPU']",CPU usage over 90%,"CPU utilization rate in the last 2 hours is over 90% - consider review queries with high CPU usage or add additional hardware resources. Also, potential causes include memory pressure, low query plan reuse, non-optimized queries.",Investigate high CPU utilization by SQL Server: over 90% in the last 2 hours,https://docs.microsoft.com/previous-versions/technet-magazine/cc137784(v=msdn.10),Server,Windows,"OnPremises, ManagedInstance",Warning +ReplErrors24H,definition,"['DefaultRuleset', 'Replication']",Replication errors in the last 24 hours,This check searches for errors in distribution database agent's history table for the last 24 hours.,Review replication errors for the following publications: @{publication},https://docs.microsoft.com/sql/relational-databases/replication/sql-server-replication,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity10,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 10,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity16,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 16,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity17,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 17,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity19,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 19,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity20,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 20,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity21,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 21,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity22,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 22,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity23,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 23,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity24,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 24,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +WeakPassword,definition,"['DefaultRuleset', 'Security', 'WeakPassword']",Weak password,Some user logins have weak passwords.,Make sure to set strong passwords on the following logins: @{PasswordData},https://docs.microsoft.com/sql/relational-databases/security/strong-passwords,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +VLFCount,definition,"['DefaultRuleset', 'Backup', 'Performance']",VLF count,"The SQL Server Database Engine divides each physical log file internally into a number of virtual log files (VLFs). Virtual log files have no fixed size, and there is no fixed number of virtual log files for a physical log file. The Database Engine chooses the size of the virtual log files dynamically while it is creating or extending log files. The Database Engine tries to maintain a small number of virtual files. The size of the virtual files after a log file has been extended is the sum of the size of the existing log and the size of the new file increment. The size or number of virtual log files cannot be configured or set by administrators. + + If the log files grow to a large size in many small increments, they will have many virtual log files. This can slow down database startup and also log backup and restore operations. Conversely, if the log files are set to a large size with few or just one increment, they will have few very large virtual log files. + + We recommend that you assign log files a size value close to the final size required, using the required increments to achieve optimal VLF distribution, and also have a relatively large growth_increment value.",Update transaction log settings to reduce the number of VLFs (current number is: @{RecoveryUnitId}),https://docs.microsoft.com/sql/relational-databases/sql-server-transaction-log-architecture-and-management-guide,Database,Windows,"OnPremises, ManagedInstance",Warning +TF8015,definition,"['DefaultRuleset', 'TraceFlag', 'CPU', 'NUMA']",TF 8015 disables auto-detection and NUMA setup,"SQL Server allows you to group CPUs into nodes referred to as soft-NUMA. You usually configure soft-NUMA when you have many CPUs and do not have hardware NUMA, but you can also use soft-NUMA to subdivide hardware NUMA nodes into smaller groups.",Disable trace flag 8015 for this SQL Server instance. This TF does not apply to this SQL Server version,https://techcommunity.microsoft.com/t5/SQL-Server-Support/How-It-Works-Soft-NUMA-I-O-Completion-Thread-Lazy-Writer-Workers/ba-p/316044,Server,Windows,OnPremises,Warning +TF8032,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 8032 reverts the cache limit parameters to the SQL Server 2005 RTM,Trace Flag 8032 reverts the cache limit parameters to the SQL Server 2005 RTM setting but can cause poor performance if large caches make less memory available for other memory consumers like BP.,The cache limit parameters reverted to the SQL Server 2005 RTM setting but can cause poor performance if large caches make less memory available for other memory consumers like BP,,Server,Windows,OnPremises,Warning +TF8744,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 8744 disables pre-fetching for the Nested Loop operator,Trace flag 8744 disables pre-fetching for the Nested Loops operator. Incorrect use of this trace flag may cause additional physical reads when SQL Server executes plans that contain the Nested Loops operator.,Disable trace flag 8744 for this SQL Server instance. This TF does not apply to this SQL Server version,https://support.microsoft.com/en-us/help/920093/tuning-options-for-sql-server-when-running-in-high-performance-workloa,Server,Windows,OnPremises,Warning +TF9347,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 9347 disables batch mode for sort operator,Trace flag 9347 disables batch mode for sort operator. SQL Server 2016 (13.x) introduced a new batch mode sort operator that boosts performance for many analytical queries.,Disable trace flag 9347 for this SQL Server instance. This TF does not apply to this SQL Server version,,Server,Windows,OnPremises,Warning +TF9349,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 9349 disables batch mode for top N sort operator,Trace flag 9349 disables batch mode for top N sort operator. SQL Server 2016 (13.x) introduced a new batch mode top sort operator that boosts performance for many analytical queries.,Disable trace flag 9349 for this SQL Server instance. This TF does not apply to this SQL Server version,,Server,Windows,OnPremises,Warning +TF9389,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'TempDB']",TF 9389 enables dynamic memory grant for batch mode operators,"Trace flag 9389 enables additional dynamic memory grant for batch mode operators. If a query does not get all the memory it needs, it spills data to TempDB, incurring additional I/O and potentially impacting query performance. If the dynamic memory grant trace flag is enabled, a batch mode operator may ask for additional memory and avoid spilling to TempDB if additional memory is available.",Disable trace flag 9389 for this SQL Server instance. The TF does not apply to this SQL Server version,,Server,Windows,"OnPremises, ManagedInstance",Warning +TF9476,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'QueryOptimizer']",TF 9476 causes SQL Server to generate a plan using the Simple Containment instead of the default Base Containment under New CE,"Trace flag 9476 causes SQL Server to generate a plan using the Simple Containment assumption instead of the default Base Containment assumption, under the query optimizer cardinality estimation model of SQL Server 2014 (12.x) through SQL Server 2017 versions.",Disable trace flag 9476 for this SQL Server instance. The TF does not apply to this SQL Server version,,Server,Windows,OnPremises,Warning +TF9481,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","TF 9481 enables Legacy CE model, irrespective of the compatibility level of the database","Trace flag 9481 enables you to set the query optimizer cardinality estimation model to the SQL Server 2012 (11.x) and earlier versions, irrespective of the compatibility level of the database.",Disable trace flag 9481 for this SQL Server instance. The TF does not apply to this SQL Server version,,Server,Windows,OnPremises,Warning +TF10204,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'ColumnStore']",TF 10204 disables merge/recompress during columnstore index reorganization,"Trace flag 10204 disables merge/recompress during columnstore index reorganization. In SQL Server 2016 (13.x), when a columnstore index is reorganized, there is new functionality to automatically merge any small compressed rowgroups into larger compressed rowgroups, as well as recompressing any rowgroups that have a large number of deleted rows.",Disable trace flag 10204 for this SQL Server instance. The TF does not apply to this SQL Server version,,Server,Windows,OnPremises,Warning +SPNaming,definition,"['DefaultRuleset', 'Naming']",Stored Procedure Naming,"In SQL Server, the sp_ prefix designates system stored procedures. If you use that prefix for your stored procedures, the name of your procedure might conflict with the name of a system stored procedure that will be created in the future. If such a conflict occurs, your application might break if your application refers to the procedure without qualifying the reference by schema. In this situation, the name will bind to the system procedure instead of to your procedure.",Rename the following stored procedures to get rid of the sp_ prefix: @{ObjectName},https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172115(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",Warning +ObjectNamingSpecialChar,definition,"['DefaultRuleset', 'Naming']",Object Naming,"If you name a database object by using any character in the following table, you make it more difficult not only to reference that object but also to read code that contains the name of that object.",Rename the following objects to get rid of special characters: @{ObjectName},https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172134(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",Warning +ColumnNamingSpecialChar,definition,"['DefaultRuleset', 'Naming']",Column Naming,"If you name a database object by using any character in the following table, you make it more difficult not only to reference that object but also to read code that contains the name of that object.",Rename the following columns to get rid of special characters: @{ObjectName},https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172134(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",Warning +FnNaming,definition,"['DefaultRuleset', 'Naming']",User Function Naming,"In SQL Server, the fn_ prefix designates system functions. If you use that prefix for your functions, the name of your function might conflict with the name of a system function that will be created in the future. If such a conflict occurs, your application might break if your application refers to the function without qualifying the reference by schema. In this situation, the name will bind to the system function instead of to your function.",Rename the following functions to get rid of the fn_ prefix: @{ObjectName},https://docs.microsoft.com/sql/t-sql/statements/create-function-transact-sql,Database,Windows,"OnPremises, ManagedInstance",Warning +ObjectNamingResKeywords,definition,"['DefaultRuleset', 'Naming']",Object names contain reserved keywords,"Microsoft SQL Server uses reserved keywords for defining, manipulating, and accessing databases. Reserved keywords are part of the grammar of the Transact-SQL language that is used by SQL Server to parse and understand Transact-SQL statements and batches. Although it is syntactically possible to use SQL Server reserved keywords as identifiers and object names in Transact-SQL scripts, you can do this only by using delimited identifiers.",Rename the following objects to get rid of reserved keywords: @{ObjectName},https://docs.microsoft.com/sql/t-sql/language-elements/reserved-keywords-transact-sql,Database,Windows,"OnPremises, ManagedInstance",Warning +DeprFeaturesInModules,definition,"['DefaultRuleset', 'Security', 'Deprecated', 'LongRunningChecks', 'UpdateIssues']",Use of deprecated or discontinued features in modules,Deprecated features are scheduled to be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,Consider getting rid of the following deprecated or discontinued features in @{ObjectName}: @{Keyword},https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Database,Windows,"OnPremises, ManagedInstance",Warning +DeprFeaturesInJobs,definition,"['DefaultRuleset', 'Security', 'Deprecated', 'Agent', 'Jobs', 'LongRunningChecks', 'UpdateIssues']",Use of deprecated or discontinued features in modules,Deprecated features are scheduled to be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,Consider getting rid of the following deprecated or discontinued features in job @{ObjectName}: @{Keyword},https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Server,Windows,"OnPremises, ManagedInstance",Warning +NUMANodeSingleCPU,definition,"['DefaultRuleset', 'NUMA', 'CPU', 'Memory', 'Performance']",Single CPU assigned to NUMA node,"Microsoft SQL Server is non-uniform memory access (NUMA) aware. NUMA architecture provides a scalable solution to performance problem. Computers with hardware NUMA have more than one system bus, each serving a small set of processors. Each group of processors has its own memory and possibly its own I/O channels, but each CPU can access memory associated with other groups in a coherent way. Each group is called a NUMA node. The number of CPUs within a NUMA node depends on the hardware vendor. Your hardware manufacturer can tell you if your computer supports hardware NUMA.",Consider assigning additional CPUs to NUMA nodes that have only one assigned CPU,https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms178144(v=sql.105),Server,Windows,"OnPremises, ManagedInstance",Warning +NUMANodeNoCPU,definition,"['DefaultRuleset', 'NUMA', 'Performance', 'CPU', 'Memory']",NUMA nodes without CPUs,"Microsoft SQL Server is non-uniform memory access (NUMA) aware. NUMA architecture provides a scalable solution to performance problem. Computers with hardware NUMA have more than one system bus, each serving a small set of processors. Each group of processors has its own memory and possibly its own I/O channels, but each CPU can access memory associated with other groups in a coherent way. Each group is called a NUMA node. The number of CPUs within a NUMA node depends on the hardware vendor. Your hardware manufacturer can tell you if your computer supports hardware NUMA.",Make sure that all NUMA nodes have assigned CPUs,https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms178144(v=sql.105),Server,Windows,"OnPremises, ManagedInstance",Warning +IndexKeyGuid,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Guid in clustered index key column,"A big reason for a clustered index is when you often want to retrieve rows for a range of values for a given column. Because the data is physically arranged in that order, the rows can be extracted very efficiently. Something like a GUID, while excellent for a primary key, could be positively detrimental to performance, as there will be additional cost for inserts and no perceptible benefit on selects.",Get rid of GUIDs in the following clustered indexes' keys: @{IndexName},https://azure.microsoft.com/blog/uniqueidentifier-and-clustered-indexes/,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +IndexesLargeKeys,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Indexes keys with more than 900 bytes,"When you design an index that contains many key columns, or large-size columns, calculate the size of the index key to make sure that you do not exceed the maximum index key size. SQL Server retains the 900-byte limit for the maximum total size of all index key columns. This excludes nonkey columns that are included in the definition of nonclustered indexes.",Get rid of keys larger than 900 bytes in index @{FullName},http://msdn.microsoft.com/library/ms191241.aspx,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +DisabledIndexes,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Disabled Indexes exist,"If you need to load a lot of data quickly, you can disable nonclustered indexes in order to improve performance. After the data load finishes, enable the nonclustered indexes again by rebuilding them. This technique works best in large data warehouse environments where entire dimension tables might be reloaded from scratch every night. Disabling nonclustered indexes is safer than dropping and recreating them because scripting indexes is hard. Unfortunately, sometimes our load processes crash before enabling the indexes again, or sometimes we manually load data and we forget to rebuild them.",Remove or enable this disabled index: @{FullName},https://docs.microsoft.com/sql/relational-databases/indexes/disable-indexes-and-constraints,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +IndexesFillFactor,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Index fill factor lower 80%,"The fill-factor option is provided for fine-tuning index data storage and performance. When an index is created or rebuilt, the fill-factor value determines the percentage of space on each leaf-level page to be filled with data, reserving the remainder on each page as free space for future growth. For example, specifying a fill-factor value of 80 means that 20 percent of each leaf-level page will be left empty, providing space for index expansion as data is added to the underlying table. The empty space is reserved between the index rows rather than at the end of the index.",Review index @{FullName} as its fill factor @{FillFactor} is lower than 80 percent,https://docs.microsoft.com/sql/relational-databases/indexes/specify-fill-factor-for-an-index,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +NonUniqueClusterIndex,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Non-unique clustered indexes,"Index uniqueness is highly desirable attribute of a clustering key, and goes hand-in-hand with index narrowness. SQL Server does not require a clustered index to be unique, but yet it must have some means of uniquely identifying every row. That’s why, for non-unique clustered indexes, SQL Server adds to every duplicate instance of a clustering key value a 4-byte integer value called a uniqueifier. This uniqueifier is added everywhere the clustering key is stored. That means the uniqueifier is stored in both clustered and non-clustered indexes. As you can imagine, if there are many rows using the same clustering key value, this can become quite expensive.",Review this clustered index @{FullName} as it is non-unique,https://docs.microsoft.com/sql/relational-databases/indexes/clustered-and-nonclustered-indexes-described,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +SuspectPages,definition,"['DefaultRuleSet', 'Pages', 'DataIntegrity']",Suspect pages,"The suspect_pages table is used for maintaining information about suspect pages, and is relevant in helping to decide whether a restore is necessary.",Run DBCC CHECKDB to verify affected database. Suspect pages were found: @{EventType},https://docs.microsoft.com/sql/relational-databases/backup-restore/manage-the-suspect-pages-table-sql-server,Database,/^(Windows|Linux)$/,,Warning +SparseFiles,definition,"['DefaultRuleSet', 'Snapshots', 'Backup', 'DataIntegrity']",Sparse files,"If the file is sparse or compressed, the NTFS file system may deallocate disk space in the file. This sets the range of bytes to zeroes (0) without extending the file size.",Get rid of sparse files: @{SparseFiles},"https://blogs.msdn.microsoft.com/jorgepc/2010/11/25/what-are-sparse-files-and-why-should-i-care-as-sql-server-dba/, https://techcommunity.microsoft.com/t5/SQL-Server-Support/Did-your-backup-program-utility-leave-your-SQL-Server-running-in/ba-p/315840",Database,/^(Windows|Linux)$/,,Warning +TableNoIndex,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Tables without indexes,"Each table in the database has one or more pages. To keep track of those pages, SQL Server uses a special set of pages, called IAM (for Index Allocation Map) pages. In spite of the word “Index” in the name, IAMs are used for non-indexed tables as well. These are called heaps. All the data is there, but the only way to find anything is to read it starting at the beginning. For a very large table, this will be terribly inefficient.",Review table @{TableName} and create reasonable indexes,https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +TableNoClusteredIndex,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Tables without clustered indexes,"Tables without clustered indexes are called heaps. They’re scattered on disk anywhere that SQL Server can find a spot, and they’re not stored in any order whatsoever. This can make for really fast inserts – SQL Server can just throw the data down – but slow selects, updates, and deletes.",Review table @{TableName} and consider creating a clustered index,https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +TablePSAlign,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Table index not aligned with PS,"Table partitioning is a complex way to break out your large tables into smaller, more manageable chunks, but it comes with a lot of management heartache. One of the challenges is making sure that your indexes are partitioned and aligned the same way as your clustered index.",Consider recreating index @{IndexName} in table @{TableName} to have it aligned with your schema,https://docs.microsoft.com/sql/relational-databases/partitions/partitioned-tables-and-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +LoginNoPassword,definition,"['DefaultRuleset', 'Security', 'WeakPassword']",Logins with no passwords,Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.,Make sure to set strong passwords on the following logins: @{PasswordData},https://docs.microsoft.com/sql/relational-databases/security/password-policy,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +LoginEqPassword,definition,"['DefaultRuleset', 'Security', 'WeakPassword']",Logins with passwords that are same as the login names,Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.,Please review logins with password equals to login: @{PasswordData},https://docs.microsoft.com/sql/relational-databases/security/password-policy,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +SystemHealth,definition,"['DefaultRuleset', 'XEvent', 'SystemHealth', 'Performance']",System Health important messages,"The system_health session is an Extended Events session that is included by default with SQL Server. This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine",Error @{Error_Number} has occured @{Error_Count} times. Last time was @{Last_Logged_Days_Ago} days ago,https://docs.microsoft.com/sql/relational-databases/extended-events/use-the-system-health-session,Server,Windows,"OnPremises, ManagedInstance",Warning +RarelyUsedIndex,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Rarely used index,"Rarely used indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used quite often. It makes sense to compare impact of writing operations versus rare reading speedup.",Make sure you need index @{IndexName} as it's used too rarely,https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +UnusedIndex,definition,"['DefaultRuleset', 'Index', 'Performance']",Unused index,"Unused indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used anywhere.",Make sure you need index @{IndexName} as it's unused,https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +SkewedCompatibilityLevel,definition,"['DefaultRuleset', 'CompatibilityLevel', 'Security', 'Performance', 'UpdateIssues']",Database with skewed compatibility level,Some databases may have a compatibility level lower than the allowed level by the Database Engine.,Update database compatibility level (current level: @{CompatibilityLevel}),https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-compatibility-level,Database,/^(Windows|Linux)$/,,Warning +['DefaultRuleset'],override,,,,,,,,,Warning From 6d9416acb29b2c5412cf23c270cdd6fbf1859a28 Mon Sep 17 00:00:00 2001 From: Alex Protsenko <53046834+alexprotsenko@users.noreply.github.com> Date: Tue, 5 Nov 2019 17:07:20 +0300 Subject: [PATCH 2/7] changed column order in defaultruleset.csv --- .../sql-assessment-api/defaultruleset.csv | 390 +++++++++--------- 1 file changed, 195 insertions(+), 195 deletions(-) diff --git a/samples/manage/sql-assessment-api/defaultruleset.csv b/samples/manage/sql-assessment-api/defaultruleset.csv index 0610d01cc9..a48da0e41c 100644 --- a/samples/manage/sql-assessment-api/defaultruleset.csv +++ b/samples/manage/sql-assessment-api/defaultruleset.csv @@ -1,235 +1,235 @@ -id,itemType,tags,displayName,description,message,helpLink,object,target.platform,target.engineEdition,level -AutoCreateStats,definition,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']",Auto-Create Statistics should be on,"The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. +id,displayName,message,itemType,tags,description,helpLink,object,target.platform,target.engineEdition,level +AutoCreateStats,Auto-Create Statistics should be on,Turn Auto-Create Statistics option on to improve query performance.,definition,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']","The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. - When the Auto Create statistics setting is ON, the Query Optimizer creates statistics on one or more columns of a table or an indexed view, as necessary, to improve query plans and query performance.",Turn Auto-Create Statistics option on to improve query performance.,https://docs.microsoft.com/sql/relational-databases/statistics/statistics#CreateStatistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -AutoUpdateStats,definition,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']",Auto-Update Statistics should be on,"The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. + When the Auto Create statistics setting is ON, the Query Optimizer creates statistics on one or more columns of a table or an indexed view, as necessary, to improve query plans and query performance.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics#CreateStatistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +AutoUpdateStats,Auto-Update Statistics should be on,Turn Auto-Update Statistics option on to improve query performance.,definition,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']","The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. - When the Auto Update Statistics setting is ON, the Query Optimizer updates statistics when they are used by a query and when they might be out-of-date. Statistics become out-of-date after insert, update, delete, or merge operations change the data distribution in the table or indexed view. The Query Optimizer determines when statistics might be out-of-date by counting the number of data modifications since the last statistics update and comparing the number of modifications to a threshold. The threshold is based on the number of rows in the table or indexed view. The Query Optimizer checks for out-of-date statistics before compiling a query and before executing a cached query plan. Before compiling a query, the Query Optimizer uses the columns, tables, and indexed views in the query predicate to determine which statistics might be out-of-date. Before executing a cached query plan, the Database Engine verifies that the query plan references up-to-date statistics. The AUTO_UPDATE_STATISTICS option applies to statistics created for indexes, single-columns in query predicates, and statistics that are created by using the CREATE STATISTICS statement. This option also applies to filtered statistics.",Turn Auto-Update Statistics option on to improve query performance.,https://docs.microsoft.com/sql/relational-databases/statistics/statistics#UpdateStatistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -QueryStoreOn,definition,"['DefaultRuleset', 'Performance', 'QueryStore', 'Statistics']",Query Store should be active,"The Query Store feature provides you with insight on query plan choice and performance. It simplifies performance troubleshooting by helping you quickly find performance differences caused by query plan changes. Query Store automatically captures a history of queries, plans, and runtime statistics, and retains these for your review. It separates data by time windows so you can see database usage patterns and understand when query plan changes happened on the server. While Query Store collects queries, execution plans and statistics, its size in the database grows until this limit is reached. When that happens, Query Store automatically changes the operation mode to read-only and stops collecting new data, which means that your performance analysis is no longer accurate.",Make sure Query Store actual operation mode is 'Read Write' to keep your performance analysis accurate,https://docs.microsoft.com/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -TF174,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']",TF 174 increases the plan cache bucket count,"Trace Flag 174 increases the SQL Server plan cache bucket count from 40,009 to 160,001 on 64-bit systems. + When the Auto Update Statistics setting is ON, the Query Optimizer updates statistics when they are used by a query and when they might be out-of-date. Statistics become out-of-date after insert, update, delete, or merge operations change the data distribution in the table or indexed view. The Query Optimizer determines when statistics might be out-of-date by counting the number of data modifications since the last statistics update and comparing the number of modifications to a threshold. The threshold is based on the number of rows in the table or indexed view. The Query Optimizer checks for out-of-date statistics before compiling a query and before executing a cached query plan. Before compiling a query, the Query Optimizer uses the columns, tables, and indexed views in the query predicate to determine which statistics might be out-of-date. Before executing a cached query plan, the Database Engine verifies that the query plan references up-to-date statistics. The AUTO_UPDATE_STATISTICS option applies to statistics created for indexes, single-columns in query predicates, and statistics that are created by using the CREATE STATISTICS statement. This option also applies to filtered statistics.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics#UpdateStatistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +QueryStoreOn,Query Store should be active,Make sure Query Store actual operation mode is 'Read Write' to keep your performance analysis accurate,definition,"['DefaultRuleset', 'Performance', 'QueryStore', 'Statistics']","The Query Store feature provides you with insight on query plan choice and performance. It simplifies performance troubleshooting by helping you quickly find performance differences caused by query plan changes. Query Store automatically captures a history of queries, plans, and runtime statistics, and retains these for your review. It separates data by time windows so you can see database usage patterns and understand when query plan changes happened on the server. While Query Store collects queries, execution plans and statistics, its size in the database grows until this limit is reached. When that happens, Query Store automatically changes the operation mode to read-only and stops collecting new data, which means that your performance analysis is no longer accurate.",https://docs.microsoft.com/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +TF174,TF 174 increases the plan cache bucket count,Consider enabling trace flag 174 to increase the plan cache bucket count.,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']","Trace Flag 174 increases the SQL Server plan cache bucket count from 40,009 to 160,001 on 64-bit systems. When the SQL Server plan cache reaches its entry limit, plans that have low cost must be evicted in order to insert new plans. This can cause severe contention on the SOS_CACHESTORE spinlock and a high CPU usage occurs in SQL Server. - On 64-bit systems, the number of buckets for the SQL Server plan cache is 40,009. Therefore, the maximum number of entries that can fit inside the SQL Server plan cache is 160,036. Enabling trace flag 174 on high performance systems increases the size of the cache and can avoid SOS_CACHESTORE spinlock contention.",Consider enabling trace flag 174 to increase the plan cache bucket count.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information -TF634,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'ColumnStore']",TF 634 disables background columnstore compression,"Trace Flag 634 disables the background columnstore compression task. + On 64-bit systems, the number of buckets for the SQL Server plan cache is 40,009. Therefore, the maximum number of entries that can fit inside the SQL Server plan cache is 160,036. Enabling trace flag 174 on high performance systems increases the size of the cache and can avoid SOS_CACHESTORE spinlock contention.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information +TF634,TF 634 disables background columnstore compression,Trace Flag 634 disables the background columnstore compression task. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'ColumnStore']","Trace Flag 634 disables the background columnstore compression task. SQL Server periodically runs the Tuple Mover background task that compresses columnstore index rowgroups with uncompressed data, one such rowgroup at a time. Columnstore compression improves query performance but also consumes system resources. - You can control the timing of columnstore compression manually, by disabling the background compression task with trace flag 634, and then explicitly invoking ALTER INDEX...REORGANIZE or ALTER INDEX...REBUILD at the time of your choice.",Trace Flag 634 disables the background columnstore compression task. Verify need to set a non-default trace flag with the current system build and configuration.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information -TF652,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'Pages']",TF 652 disables page pre-fetching scans,"Trace Flag 652 disables page pre-fetching for scans. + You can control the timing of columnstore compression manually, by disabling the background compression task with trace flag 634, and then explicitly invoking ALTER INDEX...REORGANIZE or ALTER INDEX...REBUILD at the time of your choice.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information +TF652,TF 652 disables page pre-fetching scans,Trace Flag 652 disables Page Pre-fetching Scans. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'Pages']","Trace Flag 652 disables page pre-fetching for scans. The read-ahead process reads the full extent of a referenced database page into the buffer pool, before those contiguous database pages are consumed by scans. - Enabling the trace flag can lead to performance issues on queries that leverage pre-fetching.",Trace Flag 652 disables Page Pre-fetching Scans. Verify need to set a non-default trace flag with the current system build and configuration.,http://support.microsoft.com/kb/920093,Server,Windows,OnPremises,Information -TF661,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 661 disables Ghost Cleanup Task,"Trace Flag 661 disables the ghost record removal process. A ghost record is the result of a delete operation. + Enabling the trace flag can lead to performance issues on queries that leverage pre-fetching.",http://support.microsoft.com/kb/920093,Server,Windows,OnPremises,Information +TF661,TF 661 disables Ghost Cleanup Task,Trace flag 661 disables the background ghost cleanup task. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 661 disables the ghost record removal process. A ghost record is the result of a delete operation. When you delete a record, the deleted record is kept as a ghost record. Later, the deleted record is purged by the ghost record removal process. When you disable this process, the deleted record is not purged. Therefore, the space that the deleted record consumes is not freed. This behavior affects space consumption and the performance of scan operations. - If you turn off this trace Flag, the ghost record removal process works correctly.",Trace flag 661 disables the background ghost cleanup task. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/920093,Server,Windows,OnPremises,Information -TF834,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'ColumnStore']",TF 834 enables large-page allocations,"Trace Flag 834 causes the server to use large-page memory (LPM) model for the buffer pool allocations. Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload. Trace flag 834 is NOT recommended on SQL Server instances that use columnstore indexes.",Enable trace flag 834 to use large-page allocations to improve analytical and data warehousing workloads.,https://support.microsoft.com/help/4465518,Server,/^(Windows|Linux)$/,OnPremises,Information -TF834,override,,,"Trace Flag 834 causes the server to use large-page memory (LPM) model for the buffer pool allocations. Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload.",Consider enabling trace flag 834 to use large-page allocations to improve analytical and data warehousing workloads.,https://support.microsoft.com/help/2964518,,,,Warning -TF845,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']",TF 845 is not needed in SQL Server 2012 and higher versions,"Trace Flag 845 supports locking pages in memory in SQL Server Standard edition, which is needed together with trace flag 834 to use the large-page memory (LPM) model for the buffer pool allocations. + If you turn off this trace Flag, the ghost record removal process works correctly.",https://support.microsoft.com/help/920093,Server,Windows,OnPremises,Information +TF834,TF 834 enables large-page allocations,Enable trace flag 834 to use large-page allocations to improve analytical and data warehousing workloads.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'ColumnStore']","Trace Flag 834 causes the server to use large-page memory (LPM) model for the buffer pool allocations. Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload. Trace flag 834 is NOT recommended on SQL Server instances that use columnstore indexes.",https://support.microsoft.com/help/4465518,Server,/^(Windows|Linux)$/,OnPremises,Information +TF834,,Consider enabling trace flag 834 to use large-page allocations to improve analytical and data warehousing workloads.,override,,"Trace Flag 834 causes the server to use large-page memory (LPM) model for the buffer pool allocations. Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload.",https://support.microsoft.com/help/2964518,,,,Warning +TF845,TF 845 is not needed in SQL Server 2012 and higher versions,Disable trace flag 845 in SQL Server 2012 and higher versions.,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']","Trace Flag 845 supports locking pages in memory in SQL Server Standard edition, which is needed together with trace flag 834 to use the large-page memory (LPM) model for the buffer pool allocations. Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload. - Starting with SQL Server 2012 this behavior is enabled by default for Standard edition, and trace flag 845 must not be used.",Disable trace flag 845 in SQL Server 2012 and higher versions.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,Windows,OnPremises,Warning -TF902,definition,"['DefaultRuleset', 'TraceFlag', 'UpdateIssues']",TF 902: Database Upgrade Bypass should be disabled,"Trace Flag 902 bypasses execution of database upgrade script when installing a Cumulative Update or Service Pack. + Starting with SQL Server 2012 this behavior is enabled by default for Standard edition, and trace flag 845 must not be used.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,Windows,OnPremises,Warning +TF902,TF 902: Database Upgrade Bypass should be disabled,Disable trace flag 902 which bypasses database upgrade.,definition,"['DefaultRuleset', 'TraceFlag', 'UpdateIssues']","Trace Flag 902 bypasses execution of database upgrade script when installing a Cumulative Update or Service Pack. This trace flag is not supported to run it continuously in a production environment. - If you encounter an error during script upgrade mode, it is recommended to contact Microsoft SQL Customer Service and Support (CSS) for further guidance.",Disable trace flag 902 which bypasses database upgrade.,https://support.microsoft.com/help/2163980,Server,Windows,OnPremises,Warning -TF1117,definition,"['DefaultRuleset', 'TraceFlag', 'DBFileConfiguration', 'Performance']",TF 1117 Enables Filegroup-level Autogrow,"Trace Flag 1117 initiates the growth of every file in the filegroup, when a file in the filegroup meets the autogrow threshold, and together with trace flag 1118, can help reduce allocation contention in the SQL Server TempDB database. - This trace flag affects all databases and is recommended only if every database is safe to be grow all files in a filegroup by the same amount.",Consider enabling trace flag 1117 to enable filegroup autogrow.,https://support.microsoft.com/help/2154845,Server,Windows,OnPremises,Information -TF1117,override,,TF 1117 has no effect in SQL Server 2016 and higher versions,"Trace Flag 1117 initiates the growth of every file in the filegroup, when a file in the filegroup meets the autogrow threshold, and together with trace flag 1118, can help reduce allocation contention in the SQL Server TempDB database. - Starting with SQL Server 2016, this behavior is controlled by the AUTOGROW_SINGLE_FILE and AUTOGROW_ALL_FILES options of ALTER DATABASE syntax.",Disable trace flag 1117 in SQL Server 2016 and higher versions.,https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup-options,,,,Warning -TF1118,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'Pages']",TF 1118 Disables Single Page Allocations,"Trace Flag 1118 forces page allocations on uniform extents instead of mixed extents, and together with trace flag 1117, can help reduce allocation contention in the SQL Server TempDB database. + If you encounter an error during script upgrade mode, it is recommended to contact Microsoft SQL Customer Service and Support (CSS) for further guidance.",https://support.microsoft.com/help/2163980,Server,Windows,OnPremises,Warning +TF1117,TF 1117 Enables Filegroup-level Autogrow,Consider enabling trace flag 1117 to enable filegroup autogrow.,definition,"['DefaultRuleset', 'TraceFlag', 'DBFileConfiguration', 'Performance']","Trace Flag 1117 initiates the growth of every file in the filegroup, when a file in the filegroup meets the autogrow threshold, and together with trace flag 1118, can help reduce allocation contention in the SQL Server TempDB database. + This trace flag affects all databases and is recommended only if every database is safe to be grow all files in a filegroup by the same amount.",https://support.microsoft.com/help/2154845,Server,Windows,OnPremises,Information +TF1117,TF 1117 has no effect in SQL Server 2016 and higher versions,Disable trace flag 1117 in SQL Server 2016 and higher versions.,override,,"Trace Flag 1117 initiates the growth of every file in the filegroup, when a file in the filegroup meets the autogrow threshold, and together with trace flag 1118, can help reduce allocation contention in the SQL Server TempDB database. + Starting with SQL Server 2016, this behavior is controlled by the AUTOGROW_SINGLE_FILE and AUTOGROW_ALL_FILES options of ALTER DATABASE syntax.",https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup-options,,,,Warning +TF1118,TF 1118 Disables Single Page Allocations,Consider enabling trace flag 1118 to force page allocations on uniform extents.,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'Pages']","Trace Flag 1118 forces page allocations on uniform extents instead of mixed extents, and together with trace flag 1117, can help reduce allocation contention in the SQL Server TempDB database. When a new object is created, by default, the first eight pages are allocated from different extents (mixed extents). Afterwards, when more pages are needed, those are allocated from that same extent (uniform extent). The SGAM page is used to track these mixed extents, so can quickly become a bottleneck when numerous mixed page allocations are occurring. - This trace flag allocates all eight pages from the same extent when creating new objects, minimizing the need to scan the SGAM page and forces uniform extent allocations instead of mixed page allocations.",Consider enabling trace flag 1118 to force page allocations on uniform extents.,https://support.microsoft.com/help/328551,Server,Windows,OnPremises,Information -TF1118,override,,TF 1118 has no effect in SQL Server 2016 and higher versions,"Trace Flag 1118 forces page allocations on uniform extents instead of mixed extents, and together with trace flag 1117, can help reduce allocation contention in the SQL Server TempDB database. + This trace flag allocates all eight pages from the same extent when creating new objects, minimizing the need to scan the SGAM page and forces uniform extent allocations instead of mixed page allocations.",https://support.microsoft.com/help/328551,Server,Windows,OnPremises,Information +TF1118,TF 1118 has no effect in SQL Server 2016 and higher versions,Disable trace flag 1118 in SQL Server 2016 and higher versions.,override,,"Trace Flag 1118 forces page allocations on uniform extents instead of mixed extents, and together with trace flag 1117, can help reduce allocation contention in the SQL Server TempDB database. When a new object is created, by default, the first eight pages are allocated from different extents (mixed extents). Afterwards, when more pages are needed, those are allocated from that same extent (uniform extent). The SGAM page is used to track these mixed extents, so can quickly become a bottleneck when numerous mixed page allocations are occurring. This trace flag allocates all eight pages from the same extent when creating new objects, minimizing the need to scan the SGAM page and forces uniform extent allocations instead of mixed page allocations. - Starting with SQL Server 2016, this behavior is controlled by the SET MIXED_PAGE_ALLOCATION option of ALTER DATABASE syntax.",Disable trace flag 1118 in SQL Server 2016 and higher versions.,https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup-options,,,,Warning -TF1204,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']",TF 1204 returns deadlock information,"Trace Flag 1204 returns the resources and types of locks that are participating in a deadlock, including the affected command. - The resulting information is recorded in the SQL Server Errorlog.",Trace Flag 1204 returns deadlock information.,https://support.microsoft.com/help/832524,Server,/^(Windows|Linux)$/,OnPremises,Information -TF1211,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']",TF 1211: Lock Escalation should be enabled,"Trace Flag 1211 disables lock escalation based on memory pressure, or based on number of locks. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks. If the lock memory grows large enough, attempts to allocate additional locks for any query may fail and cause performance issues. - This trace flag should not be used in order to avoid inability to allocate lock resources because of insufficient memory. If lock escalation needs to be disabled, use trace flag 1224 instead.",Disable trace flag 1211 to allow lock escalation.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF1222,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']",TF 1222 returns deadlock information,"Trace Flag 1222 returns the resources and types of locks that are participating in a deadlock, including the affected command. - The resulting information is recorded in the SQL Server Errorlog, in XML format that does not comply with any XSD schema.",Trace Flag 1222 returns deadlock information.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information -TF1224,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']",TF 1224 should be disabled,"Trace Flag 1224 disables lock escalation based on the number of locks, unless SQL Server is under memory pressure. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks.",Disable trace flag 1224 to allow lock escalation.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF1229,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance', 'CPU']",TF 1229: Lock Partitioning should be enabled,"Trace Flag 1229 disables lock partitioning regardless of the number of CPUs. By default, SQL Server enables lock partitioning when a server has 16 or more CPUs, to improve the scalability characteristics of larger systems. - Disabling lock partitioning may cause can cause spinlock contention and poor performance, or unexpected behaviors when switching partitions.",Disable trace flag 1229 to allow lock partitioning.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF1236,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']",TF 1236: Database Lock Partitioning should be enabled,"Trace Flag 1236 enables database-level lock partitioning. - Lock Partitioning is utilized to improve the scalability characteristics on larger systems.",Enable trace Flag 1236 to allow database lock partitioning.,https://support.microsoft.com/help/2926217,Server,Windows,OnPremises,Warning -TF1236,override,,"TF 1236 is not needed in SQL Server 2012 SP3, SQL Server 2014 SP1 and higher versions.","Trace Flag 1236 enables database-level lock partitioning. - Starting with SQL Server 2012 SP3 and SQL Server 2014 SP1, this behavior is controlled by the engine and trace flag 1236 has no effect.","Disable trace flag 1236 in SQL Server 2012 SP3, SQL Server 2014 SP1 and higher versions.",,,,,Warning -TF1462,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'AvailabilityGroups']",TF 1462 should be disabled to allow Log Stream Compression,"Trace Flag 1462 disables log stream compression for asynchronous availability groups. - This feature is enabled by default on asynchronous replicas to optimize network bandwidth.",Disable trace flag 1462 to allow log stream compression.,https://docs.microsoft.com/sql/database-engine/availability-groups/windows/tune-compression-for-availability-group,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF2312,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",TF 2312 sets the default Cardinality Estimation model,"Trace Flag 2312 sets the Query Optimizer cardinality estimation model to the default version of the database compability level of SQL Server 2014 and higher versions. If the database compatibility level is lower than 120, enabling trace flag 2312 uses the cardinality estimation model of SQL Server 2014 (120).",Trace Flag 2312 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/2801413,Server,Windows,OnPremises,Warning -TF2312,override,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",,,,,,,,Information -TF2312,override,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",,,"TF2312 enables New CE model to SQL Server 2014 or above versions, dependent of the compatibility level of the database",,,,,Information -TF2330,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Indexes']",TF 2330 disables recording of index usage stats,"Trace Flag 2330 disables recording of index usage stats, which could lead to a non-yielding condition in SQL 2005.",Trace Flag 2330 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF2340,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",TF 2340 disables Batch Sorts for optimized nested loops joins,"Trace Flag 2340 causes SQL Server not to use a sort operation (batch sort) for optimized nested loops joins when generating a plan. - Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 2340 disables Batch Sorts for optimized nested loops joins.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information -TF2371,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Statistics']",TF 2371 enables a linear recompilation threshold for statistics,"Trace Flag 2371 causes SQL Server to change the fixed update statistics threshold to a linear update statistics threshold. - This is especially useful to keep statistics updated on large tables.",Enable trace Flag 2371 to allow a linear recompilation threshold for statistics.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,Windows,OnPremises,Information -TF2371,override,,TF 2371 has no effect in SQL Server 2016 and higher versions,"Trace Flag 2371 causes SQL Server to change the fixed update statistics threshold to a linear update statistics threshold. - This is especially useful to keep statistics updated on large tables. Starting with SQL Server 2016, for databases using compatibility level 130 and above, this behavior is controlled by the engine and trace flag 2371 has no effect.",Disable trace flag 2371 in SQL Server 2016 and higher versions when all databases are at compatibility level 130 and above.,,,,,Warning -TF2389,definition,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance']",TF 2389 enables automatic statistics for Ascending Keys,"Trace Flag 2389 enables automatically generated quick statistics for ascending keys (histogram amendment). + Starting with SQL Server 2016, this behavior is controlled by the SET MIXED_PAGE_ALLOCATION option of ALTER DATABASE syntax.",https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup-options,,,,Warning +TF1204,TF 1204 returns deadlock information,Trace Flag 1204 returns deadlock information.,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1204 returns the resources and types of locks that are participating in a deadlock, including the affected command. + The resulting information is recorded in the SQL Server Errorlog.",https://support.microsoft.com/help/832524,Server,/^(Windows|Linux)$/,OnPremises,Information +TF1211,TF 1211: Lock Escalation should be enabled,Disable trace flag 1211 to allow lock escalation.,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1211 disables lock escalation based on memory pressure, or based on number of locks. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks. If the lock memory grows large enough, attempts to allocate additional locks for any query may fail and cause performance issues. + This trace flag should not be used in order to avoid inability to allocate lock resources because of insufficient memory. If lock escalation needs to be disabled, use trace flag 1224 instead.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF1222,TF 1222 returns deadlock information,Trace Flag 1222 returns deadlock information.,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1222 returns the resources and types of locks that are participating in a deadlock, including the affected command. + The resulting information is recorded in the SQL Server Errorlog, in XML format that does not comply with any XSD schema.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information +TF1224,TF 1224 should be disabled,Disable trace flag 1224 to allow lock escalation.,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1224 disables lock escalation based on the number of locks, unless SQL Server is under memory pressure. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF1229,TF 1229: Lock Partitioning should be enabled,Disable trace flag 1229 to allow lock partitioning.,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance', 'CPU']","Trace Flag 1229 disables lock partitioning regardless of the number of CPUs. By default, SQL Server enables lock partitioning when a server has 16 or more CPUs, to improve the scalability characteristics of larger systems. + Disabling lock partitioning may cause can cause spinlock contention and poor performance, or unexpected behaviors when switching partitions.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF1236,TF 1236: Database Lock Partitioning should be enabled,Enable trace Flag 1236 to allow database lock partitioning.,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1236 enables database-level lock partitioning. + Lock Partitioning is utilized to improve the scalability characteristics on larger systems.",https://support.microsoft.com/help/2926217,Server,Windows,OnPremises,Warning +TF1236,"TF 1236 is not needed in SQL Server 2012 SP3, SQL Server 2014 SP1 and higher versions.","Disable trace flag 1236 in SQL Server 2012 SP3, SQL Server 2014 SP1 and higher versions.",override,,"Trace Flag 1236 enables database-level lock partitioning. + Starting with SQL Server 2012 SP3 and SQL Server 2014 SP1, this behavior is controlled by the engine and trace flag 1236 has no effect.",,,,,Warning +TF1462,TF 1462 should be disabled to allow Log Stream Compression,Disable trace flag 1462 to allow log stream compression.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'AvailabilityGroups']","Trace Flag 1462 disables log stream compression for asynchronous availability groups. + This feature is enabled by default on asynchronous replicas to optimize network bandwidth.",https://docs.microsoft.com/sql/database-engine/availability-groups/windows/tune-compression-for-availability-group,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF2312,TF 2312 sets the default Cardinality Estimation model,Trace Flag 2312 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 2312 sets the Query Optimizer cardinality estimation model to the default version of the database compability level of SQL Server 2014 and higher versions. If the database compatibility level is lower than 120, enabling trace flag 2312 uses the cardinality estimation model of SQL Server 2014 (120).",https://support.microsoft.com/help/2801413,Server,Windows,OnPremises,Warning +TF2312,,,override,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",,,,,,Information +TF2312,,"TF2312 enables New CE model to SQL Server 2014 or above versions, dependent of the compatibility level of the database",override,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",,,,,,Information +TF2330,TF 2330 disables recording of index usage stats,Trace Flag 2330 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Indexes']","Trace Flag 2330 disables recording of index usage stats, which could lead to a non-yielding condition in SQL 2005.",,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF2340,TF 2340 disables Batch Sorts for optimized nested loops joins,Trace Flag 2340 disables Batch Sorts for optimized nested loops joins.,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 2340 causes SQL Server not to use a sort operation (batch sort) for optimized nested loops joins when generating a plan. + Verify need to set a non-default trace flag with the current system build and configuration.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information +TF2371,TF 2371 enables a linear recompilation threshold for statistics,Enable trace Flag 2371 to allow a linear recompilation threshold for statistics.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Statistics']","Trace Flag 2371 causes SQL Server to change the fixed update statistics threshold to a linear update statistics threshold. + This is especially useful to keep statistics updated on large tables.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,Windows,OnPremises,Information +TF2371,TF 2371 has no effect in SQL Server 2016 and higher versions,Disable trace flag 2371 in SQL Server 2016 and higher versions when all databases are at compatibility level 130 and above.,override,,"Trace Flag 2371 causes SQL Server to change the fixed update statistics threshold to a linear update statistics threshold. + This is especially useful to keep statistics updated on large tables. Starting with SQL Server 2016, for databases using compatibility level 130 and above, this behavior is controlled by the engine and trace flag 2371 has no effect.",,,,,Warning +TF2389,TF 2389 enables automatic statistics for Ascending Keys,Trace Flag 2389 enables automatic statistics for ascending keys. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance']","Trace Flag 2389 enables automatically generated quick statistics for ascending keys (histogram amendment). This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time. - Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 2389 enables automatic statistics for ascending keys. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/2801413,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information -TF2390,definition,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance', 'Indexes']",TF 2390 enables automatic statistics for Ascending or Unknown Keys,"Trace Flag 2390 enables automatically generated quick statistics for ascending or unknown keys (histogram amendment). + Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2801413,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information +TF2390,TF 2390 enables automatic statistics for Ascending or Unknown Keys,Trace Flag 2390 enables automatic statistics for ascending or unknown keys. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance', 'Indexes']","Trace Flag 2390 enables automatically generated quick statistics for ascending or unknown keys (histogram amendment). This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time. - Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 2390 enables automatic statistics for ascending or unknown keys. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/2801413,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information -TF2528,definition,"['DefaultRuleset', 'TraceFlag', 'DataIntegrity', 'DBCC']",TF 2528 disables parallel operations for integrity checking,"Trace Flag 2528 disables parallel checking of objects by DBCC CHECKDB, DBCC CHECKFILEGROUP, and DBCC CHECKTABLE. + Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2801413,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information +TF2528,TF 2528 disables parallel operations for integrity checking,Trace Flag 2528 disables parallel operations for integrity checking.,definition,"['DefaultRuleset', 'TraceFlag', 'DataIntegrity', 'DBCC']","Trace Flag 2528 disables parallel checking of objects by DBCC CHECKDB, DBCC CHECKFILEGROUP, and DBCC CHECKTABLE. By default, the degree of parallelism is automatically determined by the query processor. The maximum degree of parallelism is configured just like that of parallel queries. When parallel checks are disabled, the DBCC commands will take longer to complete. - Starting with SQL Server 2014 SP2, a MAXDOP option is available to override the max degree of parallelism configuration option of sp_configure for the DBCC statements.",Trace Flag 2528 disables parallel operations for integrity checking.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF2549,definition,"['DefaultRuleset', 'TraceFlag', 'DBCC']",TF 2549 optimizes PHYSICAL_ONLY option of DBCC CHECKDB,"Trace Flag 2549 forces the DBCC CHECKDB command to assume each database file is on a unique disk drive but treating different physical files as one logical file. - This trace flag can improve the performance when using the PHYSICAL_ONLY option, but it's not recommended unless it is known that each file is based on a unique physical disk.",Trace Flag 2549 forces DBCC CHECKDB to treat different physical files as one logical file.,https://support.microsoft.com/help/2634571,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF2562,definition,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'TempDB']",TF 2562 forces the DBCC CHECKDB command to execute in a single batch,"Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch regardless of the number of indexes in the database. - This trace flag can improve the performance when using the PHYSICAL_ONLY option, but space requirements for TempDB may increase.",Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch.,https://support.microsoft.com/help/2634571,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF2566,definition,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'DataIntegrity']",TF 2566 disables default data purity check,"Trace Flag 2566 forces the DBCC CHECKDB command to execute without data purity check unless the DATA_PURITY option is specified. - For databases upgraded from earlier versions of SQL Server, it is recommended to run the DBCC CHECKDB WITH DATA_PURITY command at least once, to enable column-value integrity checks to happen by default.",Trace Flag 2566 disables default data purity check.,https://support.microsoft.com/help/945770,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF3023,definition,"['DefaultRuleset', 'TraceFlag', 'Backup']",TF 3023 enables Backup Checksum option by default,"Trace Flag 3023 enables the CHECKSUM option of the BACKUP command by default. + Starting with SQL Server 2014 SP2, a MAXDOP option is available to override the max degree of parallelism configuration option of sp_configure for the DBCC statements.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF2549,TF 2549 optimizes PHYSICAL_ONLY option of DBCC CHECKDB,Trace Flag 2549 forces DBCC CHECKDB to treat different physical files as one logical file.,definition,"['DefaultRuleset', 'TraceFlag', 'DBCC']","Trace Flag 2549 forces the DBCC CHECKDB command to assume each database file is on a unique disk drive but treating different physical files as one logical file. + This trace flag can improve the performance when using the PHYSICAL_ONLY option, but it's not recommended unless it is known that each file is based on a unique physical disk.",https://support.microsoft.com/help/2634571,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF2562,TF 2562 forces the DBCC CHECKDB command to execute in a single batch,Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch.,definition,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'TempDB']","Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch regardless of the number of indexes in the database. + This trace flag can improve the performance when using the PHYSICAL_ONLY option, but space requirements for TempDB may increase.",https://support.microsoft.com/help/2634571,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF2566,TF 2566 disables default data purity check,Trace Flag 2566 disables default data purity check.,definition,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'DataIntegrity']","Trace Flag 2566 forces the DBCC CHECKDB command to execute without data purity check unless the DATA_PURITY option is specified. + For databases upgraded from earlier versions of SQL Server, it is recommended to run the DBCC CHECKDB WITH DATA_PURITY command at least once, to enable column-value integrity checks to happen by default.",https://support.microsoft.com/help/945770,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF3023,TF 3023 enables Backup Checksum option by default,Trace Flag 3023 enables CHECKSUM option as default for BACKUP command.,definition,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3023 enables the CHECKSUM option of the BACKUP command by default. This trace flag forces the CHECKSUM option for BACKUP command even when not explicitely set. - Starting with SQL Server 2014, this behavior is controlled by setting the Backup Checksum Default configuration option.",Trace Flag 3023 enables CHECKSUM option as default for BACKUP command.,https://support.microsoft.com/help/2656988,Server,Windows,OnPremises,Information -TF3042,definition,"['DefaultRuleset', 'TraceFlag', 'Backup']",TF 3042 bypasses the default backup compression pre-allocation algorithm,"Trace Flag 3042 bypasses the default backup compression pre-allocation algorithm to allow the backup file to grow only as needed to reach its final size. - This trace flag can achieve space savings by allocating only the actual size required for the compressed backup, but might increase the overall backup operation time.",Trace Flag 3042 enables the bypass of the default backup compression.,https://docs.microsoft.com/sql/relational-databases/backup-restore/backup-compression-sql-server,Server,/^(Windows|Linux)$/,OnPremises,Information -TF3226,definition,"['DefaultRuleset', 'TraceFlag', 'Backup']",TF 3226 disables ErrorLog entries for every successful backup operation,"Trace Flag 3226 prevents SQL Server from recording an entry to the Errorlog on every successful backup operation. - Backup operations are registered in the Errorlog by default. Frequent backup operations can contribute to massive Errorlog files that become unwieldy.",Trace Flag 3226 disables ErrorLog entries for every successful backup operation.,https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information -TF4136,override,,,"Trace Flag 4136 disables parameter sniffing unless OPTION(RECOMPILE), WITH RECOMPILE or OPTIMIZE FOR value is used. Starting with SQL Server 2016, to accomplish this at the database level use the PARAMETER_SNIFFING option in ALTER DATABASE SCOPED CONFIGURATION. Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 4136 disables parameter sniffing. Verify need to set a non-default trace flag with the current system build and configuration.,,,,,Information -TF4136,definition,"['DefaultRuleset', 'TraceFlag']",TF 4136 disables Parameter Sniffing,"Trace Flag 4136 disables parameter sniffing unless OPTION(RECOMPILE), WITH RECOMPILE or OPTIMIZE FOR value is used, but does not apply to this SQL Server version. Starting with SQL Server 2016, to accomplish this at the database level use the PARAMETER_SNIFFING option in ALTER DATABASE SCOPED CONFIGURATION. Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 4136 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/980653,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF4137,override,,,"Trace Flag 4137 causes SQL Server to generate a plan using minimum selectivity when estimating AND predicates for filters to account for partial correlation instead of independence, under the query optimizer cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). + Starting with SQL Server 2014, this behavior is controlled by setting the Backup Checksum Default configuration option.",https://support.microsoft.com/help/2656988,Server,Windows,OnPremises,Information +TF3042,TF 3042 bypasses the default backup compression pre-allocation algorithm,Trace Flag 3042 enables the bypass of the default backup compression.,definition,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3042 bypasses the default backup compression pre-allocation algorithm to allow the backup file to grow only as needed to reach its final size. + This trace flag can achieve space savings by allocating only the actual size required for the compressed backup, but might increase the overall backup operation time.",https://docs.microsoft.com/sql/relational-databases/backup-restore/backup-compression-sql-server,Server,/^(Windows|Linux)$/,OnPremises,Information +TF3226,TF 3226 disables ErrorLog entries for every successful backup operation,Trace Flag 3226 disables ErrorLog entries for every successful backup operation.,definition,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3226 prevents SQL Server from recording an entry to the Errorlog on every successful backup operation. + Backup operations are registered in the Errorlog by default. Frequent backup operations can contribute to massive Errorlog files that become unwieldy.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information +TF4136,,Trace Flag 4136 disables parameter sniffing. Verify need to set a non-default trace flag with the current system build and configuration.,override,,"Trace Flag 4136 disables parameter sniffing unless OPTION(RECOMPILE), WITH RECOMPILE or OPTIMIZE FOR value is used. Starting with SQL Server 2016, to accomplish this at the database level use the PARAMETER_SNIFFING option in ALTER DATABASE SCOPED CONFIGURATION. Verify need to set a non-default trace flag with the current system build and configuration.",,,,,Information +TF4136,TF 4136 disables Parameter Sniffing,Trace Flag 4136 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag']","Trace Flag 4136 disables parameter sniffing unless OPTION(RECOMPILE), WITH RECOMPILE or OPTIMIZE FOR value is used, but does not apply to this SQL Server version. Starting with SQL Server 2016, to accomplish this at the database level use the PARAMETER_SNIFFING option in ALTER DATABASE SCOPED CONFIGURATION. Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/980653,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF4137,,Trace Flag 4137 causes SQL Server to generate a plan using partial correlation of filters. Verify need to set a non-default trace flag with the current system build and configuration.,override,,"Trace Flag 4137 causes SQL Server to generate a plan using minimum selectivity when estimating AND predicates for filters to account for partial correlation instead of independence, under the query optimizer cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). Does not apply to CE version 120 or above. Use trace flag 9471 instead. Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'ASSUME_MIN_SELECTIVITY_FOR_FILTER_ESTIMATES' query hint. - Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 4137 causes SQL Server to generate a plan using partial correlation of filters. Verify need to set a non-default trace flag with the current system build and configuration.,,,,,Information -TF4137,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",TF 4137 causes plans to use partial correlation for filters,"Trace Flag 4137 causes SQL Server to generate a plan using minimum selectivity when estimating AND predicates for filters to account for partial correlation instead of independence, under the query optimizer cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). However it does not apply to this SQL Server version. + Verify need to set a non-default trace flag with the current system build and configuration.",,,,,Information +TF4137,TF 4137 causes plans to use partial correlation for filters,Trace flag 4137 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 4137 causes SQL Server to generate a plan using minimum selectivity when estimating AND predicates for filters to account for partial correlation instead of independence, under the query optimizer cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). However it does not apply to this SQL Server version. Does not apply to CE version 120 or above. Use trace flag 9471 instead. Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'ASSUME_MIN_SELECTIVITY_FOR_FILTER_ESTIMATES' query hint. - Verify need to set a non-default trace flag with the current system build and configuration.",Trace flag 4137 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/2658214,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF4138,override,,,"Trace Flag 4138 causes SQL Server to generate a plan that does not use row goal adjustments with queries that contain TOP, OPTION (FAST N), IN, or EXISTS keywords. + Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2658214,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF4138,,Trace Flag 4138 enables plan that without row goal adjustments. Verify need to set a non-default trace flag with the current system build and configuration.,override,,"Trace Flag 4138 causes SQL Server to generate a plan that does not use row goal adjustments with queries that contain TOP, OPTION (FAST N), IN, or EXISTS keywords. Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'DISABLE_OPTIMIZER_ROWGOAL' query hint. - Verify need to set a Non-default trace flag with current system build and configuration.",Trace Flag 4138 enables plan that without row goal adjustments. Verify need to set a non-default trace flag with the current system build and configuration.,,,,,Information -TF4138,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",TF 4138 causes plans to not use Row Goal adjustments,"Trace Flag 4138 causes SQL Server to generate a plan that does not use row goal adjustments with queries that contain TOP, OPTION (FAST N), IN, or EXISTS keywords. + Verify need to set a Non-default trace flag with current system build and configuration.",,,,,Information +TF4138,TF 4138 causes plans to not use Row Goal adjustments,Trace flag 4138 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 4138 causes SQL Server to generate a plan that does not use row goal adjustments with queries that contain TOP, OPTION (FAST N), IN, or EXISTS keywords. Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'DISABLE_OPTIMIZER_ROWGOAL' query hint. However it does not apply to this SQL Server version. - Verify need to set a Non-default trace flag with current system build and configuration.",Trace flag 4138 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/2667211,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF4139,override,,,"Trace Flag 4139 enables automatically generated quick statistics (histogram amendment) regardless of key column status. + Verify need to set a Non-default trace flag with current system build and configuration.",https://support.microsoft.com/help/2667211,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF4139,,Trace Flag 4139 enables automatic statistics for any key ordering. Verify need to set a non-default trace flag with the current system build and configuration.,override,,"Trace Flag 4139 enables automatically generated quick statistics (histogram amendment) regardless of key column status. This trace flag is recommended to be set in cases where queries access newly inserted key values that may change plan shape, but the new values are not yet updated in the statistics histogram for the affected columns. In this case, regardless of the leading statistics column status (ascending, descending, or stationary), the histogram used to estimate cardinality will be adjusted at query compile time. This trace flag does not apply to the cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). - Verify need to set a non-default trace flag with the current system build and configuration.",Trace Flag 4139 enables automatic statistics for any key ordering. Verify need to set a non-default trace flag with the current system build and configuration.,,,,,Information -TF4139,definition,"['DefaultRuleset', 'TraceFlag', 'Statistics']",TF 4139 enables automatic statistics for any key ordering,"Trace Flag 4139 enables automatically generated quick statistics (histogram amendment) regardless of key column status. + Verify need to set a non-default trace flag with the current system build and configuration.",,,,,Information +TF4139,TF 4139 enables automatic statistics for any key ordering,Trace flag 4139 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Statistics']","Trace Flag 4139 enables automatically generated quick statistics (histogram amendment) regardless of key column status. However, this trace flag does not apply to this SQL Server version. - Verify need to set a non-default trace flag with the current system build and configuration.",Trace flag 4139 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/2952101,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF4199,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer']",TF 4199 enables Query Optimizer fixes,Trace Flag 4199 enables Query Optimizer fixes released in SQL Server Cumulative Updates and Service Packs.,Trace Flag 4199 enables Query Optimizer fixes. Verify need to set a non-default trace flag with the current system build and configuration.,http://support.microsoft.com/help/974006,Server,/^(Windows|Linux)$/,OnPremises,Information -TF6498,override,,,,Trace Flag 6498 enables concurrent large queries.,,,,,Information -TF6498,override,,,"Trace Flag 6498 enables more than one large query compilation to gain access to the big gateway when there is sufficient memory available. + Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2952101,Server,/^(Windows|Linux)$/,OnPremises,Warning +TF4199,TF 4199 enables Query Optimizer fixes,Trace Flag 4199 enables Query Optimizer fixes. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer']",Trace Flag 4199 enables Query Optimizer fixes released in SQL Server Cumulative Updates and Service Packs.,http://support.microsoft.com/help/974006,Server,/^(Windows|Linux)$/,OnPremises,Information +TF6498,,Trace Flag 6498 enables concurrent large queries.,override,,,,,,,Information +TF6498,,"Disable trace flag 6498 in SQL Server 2014 SP2, SQL Server 2016 and higher versions.",override,,"Trace Flag 6498 enables more than one large query compilation to gain access to the big gateway when there is sufficient memory available. This trace flag can be used to keep memory usage for the compilation of incoming queries under control, avoiding compilation waits for concurrent large queries. - Starting with SQL Server 2014 SP2 and SQL Server 2016, this behavior is controlled by the engine and trace flag 1236 has no effect.","Disable trace flag 6498 in SQL Server 2014 SP2, SQL Server 2016 and higher versions.",,,,,Warning -TF6498,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory']",TF 6498 enables additional concurrent large queries,"Trace Flag 6498 enables more than one large query compilation to gain access to the big gateway when there is sufficient memory available. + Starting with SQL Server 2014 SP2 and SQL Server 2016, this behavior is controlled by the engine and trace flag 1236 has no effect.",,,,,Warning +TF6498,TF 6498 enables additional concurrent large queries,Trace Flag 6498 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory']","Trace Flag 6498 enables more than one large query compilation to gain access to the big gateway when there is sufficient memory available. However, this trace flag does not apply to this SQL Server version. This trace flag can be used to keep memory usage for the compilation of incoming queries under control, avoiding compilation waits for concurrent large queries. - Starting with SQL Server 2014 SP2 and SQL Server 2016, this behavior is controlled by the engine and trace flag 1236 has no effect.",Trace Flag 6498 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/3024815,Server,Windows,OnPremises,Warning -TF6532,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 6532 enables performance improvements for Spatial data,"Trace Flag 6532 enables performance improvements of query operations with spatial data types. - The performance gain will vary, depending on the configuration, the types of queries, and the objects.",Enable trace flag 6532 to enable performance improvements for Spatial data.,https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,Information -TF6532.6533,override,,,"Trace Flag 6532 and trace flag 6533 enable performance improvements of query operations with spatial data types. - The performance gain will vary, depending on the configuration, the types of queries, and the objects.",Enable trace flag 6532 and trace flag 6533 to enable performance improvements for Spatial data.,,,,,Information -TF6532.6533,override,,,,Disable trace flag 6532 in SQL Server 2016 and higher versions.,,,,,Warning -TF6532.6533,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 6532 and TF 6533 enable performance improvements for Spatial data,"Trace flags 6532 and 6533 enable performance improvements of query operations with spatial data types. + Starting with SQL Server 2014 SP2 and SQL Server 2016, this behavior is controlled by the engine and trace flag 1236 has no effect.",https://support.microsoft.com/help/3024815,Server,Windows,OnPremises,Warning +TF6532,TF 6532 enables performance improvements for Spatial data,Enable trace flag 6532 to enable performance improvements for Spatial data.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 6532 enables performance improvements of query operations with spatial data types. + The performance gain will vary, depending on the configuration, the types of queries, and the objects.",https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,Information +TF6532.6533,,Enable trace flag 6532 and trace flag 6533 to enable performance improvements for Spatial data.,override,,"Trace Flag 6532 and trace flag 6533 enable performance improvements of query operations with spatial data types. + The performance gain will vary, depending on the configuration, the types of queries, and the objects.",,,,,Information +TF6532.6533,,Disable trace flag 6532 in SQL Server 2016 and higher versions.,override,,,,,,,Warning +TF6532.6533,TF 6532 and TF 6533 enable performance improvements for Spatial data,Trace flags 6532 and 6533 do not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace flags 6532 and 6533 enable performance improvements of query operations with spatial data types. However, this trace flag does not apply to this SQL Server version. - Starting with SQL Server 2016, this behavior is controlled by the engine and trace flags 6532 and 6533 have no effect.",Trace flags 6532 and 6533 do not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,Warning -TF6534,override,,,"Trace Flag 6534 enables performance improvements of query operations with spatial data types. - The performance gain will vary, depending on the configuration, the types of queries, and the objects.",Enable trace flag 6534 to enable performance improvement of query operations with spatial data types.,,,,,Information -TF6534,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 6534 enables performance improvements for Spatial data,"Trace Flag 6534 enables performance improvement of query operations with spatial data types. + Starting with SQL Server 2016, this behavior is controlled by the engine and trace flags 6532 and 6533 have no effect.",https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,Warning +TF6534,,Enable trace flag 6534 to enable performance improvement of query operations with spatial data types.,override,,"Trace Flag 6534 enables performance improvements of query operations with spatial data types. + The performance gain will vary, depending on the configuration, the types of queries, and the objects.",,,,,Information +TF6534,TF 6534 enables performance improvements for Spatial data,Trace flag 6534 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 6534 enables performance improvement of query operations with spatial data types. However, this trace flag does not apply to this SQL Server version. - Verify need to set a Non-default trace flag with current system build and configuration.",Trace flag 6534 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,Warning -TF7412,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting,Trace Flag 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting. Consider enabling TF 7412 to have the ability to access runtime information on query execution plans for any session.,Enable trace flag 7412 to enables the lightweight profiling infrastructure for live query performance troubleshooting.,https://docs.microsoft.com/sql/relational-databases/performance/query-profiling-infrastructure,Server,/^(Windows|Linux)$/,OnPremises,Information -TF9024,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'Memory', 'CPU']",TF 9024 converts a global log pool memory object into NUMA node partitioned memory object.,TF9024 converts a global log pool memory object into NUMA node partitioned memory object.,Verify need to set a Non-default TF with current system build and configuration.,https://support.microsoft.com/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,Server,Windows,OnPremises,Warning -TF9024,override,,,,Consider enabling TF9024 to convert global log pool memory objects into NUMA node partitioned memory objects.,,,,,Information -TF9024,override,,,,"TF9024 is not needed in SQL Server 2012 SP3, SQL Server 2014 SP1 and above.",,,,,Warning -TF8048,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'CPU', 'Memory']",TF 8048 converts NUMA partitioned memory objects into CPU partitioned,TF 8048 converts NUMA partitioned memory objects into CPU partitioned.,Verify need to set a Non-default TF with current system build and configuration.,https://support.microsoft.com/en-us/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,Server,Windows,OnPremises,Warning -TF8048,override,,,,"TF8048 is not needed in SQL Server 2014 SP2, SQL Server 2016 and above.",,,,,Warning -TF8048,override,,,,Consider enabling TF 8048 to convert NUMA partitioned memory objects into CPU partitioned.,,,,,Information -DeprecatedFeatures,definition,"['DefaultRuleset', 'Deprecated', 'Security', 'UpdateIssues', 'Performance']",Deprecated or discontinued features should not be used,This check detects deprecated or discontinued features used on target SQL Server instance. Deprecated features may be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,Detected deprecated or discontinued feature uses: @{DeprecatedFeature}. We recommend to replace them with features actual for SQL Server version @{ProductVersion}.,https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -SystemHealthSession,definition,"['DefaultRuleset', 'XEvent', 'SystemHealth']",system_health XEvent session is not active,"This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. - We recommend that you do not stop, alter, or delete the system health session.",Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,https://docs.microsoft.com/sql/relational-databases/extended-events/use-the-system-health-session,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -SPServerDiagnosticsSession,definition,"['DefaultRuleset', 'XEvent', 'SystemHealth']",sp_server_diagnostics xEvent session is not active,"This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. - We recommend that you do not stop, alter, or delete the system health session.",Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-server-diagnostics-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning -BlackboxTrace,definition,"['DefaultRuleset', 'Traces']",Blackbox trace is configured and running,"This trace is designed to behave similarly to an airplane black box, to help you diagnose intermittent server crashes. It consumes more resources than the default trace and should not be running for extended periods of time.",Make sure you still need the blackbox trace and stop it otherwise.,https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-trace-create-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning -DefaultTrace,definition,"['DefaultRuleset', 'Traces']",No default trace was found or is not active,Default trace provides troubleshooting assistance to database administrators by ensuring that they have the log data necessary to diagnose problems the first time they occur.,Make sure that there is enough space for SQL Server to write the default trace file. Then have the default trace run by disabling and re-enabling it.,https://docs.microsoft.com/sql/relational-databases/policy-based-management/default-trace-log-files-disabled,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -HintsStatistics,definition,"['DefaultRuleset', 'QueryOptimizer', 'Performance', 'Statistics']",Hints are being used,"Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the Query Optimizer might select for a query. Because the SQL Server Query Optimizer typically selects the best execution plan for a query, we recommend that , , and be used only as a last resort by experienced developers and database administrators.","We recommend that , , and be used only as a last resort by experienced developers and database administrators, because the SQL Server Query Optimizer typically selects the best execution plan for a query.",https://docs.microsoft.com/sql/t-sql/queries/hints-transact-sql,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information -HintsUsageInModules,definition,"['DefaultRuleset', 'QueryOptimizer', 'Performance', 'Statistics']",Hints usage in modules,"Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the Query Optimizer might select for a query. Because the SQL Server Query Optimizer typically selects the best execution plan for a query, we recommend that , , and be used only as a last resort by experienced developers and database administrators.",@{Hint} was used in @{type_desc} @{Schema_Name}.@{Object_Name}.,https://docs.microsoft.com/sql/t-sql/queries/hints-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information -PlansUseRatio,definition,"['DefaultRuleset', 'Performance', 'QueryOptimizer']",Amount of single use plans in cache is high,Single use plans waste system resources.,Amount of single use plans in cache is high (@{SingleUsePlansUseRatio:P0}). Consider enabling the Optimize for ad hoc workloads setting on heavy OLTP ad-hoc workloads to conserve resources.,https://docs.microsoft.com/sql/database-engine/configure-windows/optimize-for-ad-hoc-workloads-server-configuration-option,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -HypotheticalIndexes,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Hypothetical indexes found,"Database has indexes that are marked as hypothetical. Hypothetical indexes are created by the Database Tuning Assistant (DTA) during its tests. If a DTA session was interrupted, these indexes may not be deleted. It is recommended to drop these objects as soon as possible.",Index @{IndexName} for @{Schema}.@{Object} is marked as hypothetical. It is recommended to drop hypothetical index @{IndexName} as soon as possible.,,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -HypotheticalStatistics,definition,"['DefaultRuleset', 'Statistics']",Hypothetical statistics found,"Database has statistics that are marked as hypothetical. Hypothetical statistics are created by the Database Tuning Assistant (DTA) during its tests. If a DTA session was interrupted, these statistics may not be deleted. It is recommended to drop these objects as soon as possible.",Statistics @{StatName} for @{Schema}.@{Object} is hypothetical. It is recommended to drop hypothetical statistics @{StatName} as soon as possible.,,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -LatestCU,definition,"['DefaultRuleset', 'Security', 'UpdateIssues']",SQL Server instance is not up to date,"On an installed instance of SQL Server, we recommend that you apply the latest security updates and critical updates including general distribution releases (GDRs), service packs (SPs), and cumulative updates (CUs).",Product version @{ProductVersion} is not the latest available. We recommend keeping your SQL Server up to date and install Service Packs and Cumulative Updates as they are released.,https://support.microsoft.com/help/321185/how-to-determine-the-version-edition-and-update-level-of-sql-server-an https://docs.microsoft.com/sql/database-engine/install-windows/install-sql-server-servicing-updates,Server,/^(Windows|Linux)$/,OnPremises,Warning -LatestCU,override,,SQL Server instance is up to date,,Product version @{ProductVersion} is the latest available.,https://support.microsoft.com/help/321185/how-to-determine-the-version-edition-and-update-level-of-sql-server-an https://docs.microsoft.com/sql/database-engine/install-windows/install-sql-server-servicing-updates,,,,Warning -FKNoIndexes,definition,"['DefaultRuleset', 'Performance', 'Indexes']",Foreign key constraints should have corresponding indexes,"Unlike primary key constraints, creating a foreign key constraint does not automatically create a corresponding index. However, manually creating an index on a foreign key is often useful.",Create a corresponding index for each foreign key. There is no index on the following foreign keys: @{ConstraintName}.,https://docs.microsoft.com/sql/relational-databases/tables/primary-and-foreign-key-constraints,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -MissedIndexes,definition,"['DefaultRuleset', 'Performance', 'Indexes']",Potentially missing indexes,Potentially missing indexes were found based on query history. It may be important to revise them. Please note that this check based on a scoring method and the results may be approximate - for information purposes only.,Create an index on @{Table} with key columns @{KeyCols}@{IncludedCols: and included columns: #},https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information -FullBackup,definition,"['DefaultRuleset', 'Backup']",Full backup is missed or outdated,Database doesn't have any full backup or the latest full backup is over 7 days.,Create a new full backup of the database,https://docs.microsoft.com/sql/relational-databases/backup-restore/create-a-full-database-backup-sql-server,Database,/^(Windows|Linux)$/,OnPremises,Warning -OutdatedTranLogBackup,definition,"['DefaultRuleset', 'Backup']",Transaction Log backup is missed or outdated,"Database does not have any transaction Log backup since the latest full or differential backup, or it's older than 24H.",Create a backup of Transaction Log. Database recovery model: @{recovery_model_desc},https://docs.microsoft.com/sql/relational-databases/backup-restore/back-up-a-transaction-log-sql-server,Database,/^(Windows|Linux)$/,OnPremises,Warning -DbDiffCollation,definition,"['DefaultRuleset', 'DBConfiguration', 'Collation']",Database collation doesn't match the collation of master,"We recommend that the collations of user-defined databases match the collation of master or model. Otherwise, collation conflicts can occur that might prevent code from executing. For example, when a stored procedure joins one table to a temporary table, SQL Server might end the batch and return a collation conflict error if the collations of the user-defined database and the model database are different. This occurs because temporary tables are created in tempdb, which bases its collation on that of model.",Keep database collation the same as the collation for master or model,https://docs.microsoft.com/sql/database-engine/set-collation-user-defined-databases-match-master-model-databases,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -AutoClose,definition,"['DefaultRuleset', 'Performance', 'DBConfiguration']",Auto Close Option should be OFF,"When AUTO_CLOSE is set ON, this can cause performance degradation on frequently accessed databases because of the increased overhead of opening and closing the database after each connection. AUTO_CLOSE also flushes the procedure cache after each connection.",Set AUTO_CLOSE option to OFF,https://docs.microsoft.com/sql/relational-databases/policy-based-management/set-the-auto-close-database-option-to-off,Database,/^(Windows|Linux)$/,OnPremises,Warning -AutoShrink,definition,"['DefaultRuleset', 'DBConfiguration', 'Performance']",Auto Shrink Option should be OFF,"Shrinking databases is the fastest way to achieve fragmentation. SQL Server goes to the last page in the database, moves it to the first free available space, and then repeats the process again. This shuffles the deck, putting your pages out of order.",Set AUTO_SHRINK option to OFF.,https://blogs.msdn.microsoft.com/buckwoody/2009/07/01/sql-server-best-practices-auto-shrink-should-be-off,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -PageVerify,definition,"['DefaultRuleset', 'DBConfiguration', 'DataIntegrity']",PAGE_VERIFY option should be CHECKSUM,"When CHECKSUM is enabled for the PAGE_VERIFY database option, the SQL Server Database Engine calculates a checksum over the contents of the whole page, and stores the value in the page header when a page is written to disk. When the page is read from disk, the checksum is recomputed and compared to the checksum value that is stored in the page header. This helps provide a high level of data-file integrity.",Set PAGE_VERIFY option to CHECKSUM.,https://docs.microsoft.com/sql/relational-databases/policy-based-management/set-the-page-verify-database-option-to-checksum,Database,/^(Windows|Linux)$/,OnPremises,Warning -DbChaining,definition,"['DefaultRuleset', 'DBConfiguration', 'Security']",Cross-Database Access should be disabled,Ownership chaining across databases is turned off by default. Microsoft recommends that you disable cross-database ownership chaining because it exposes you to the additional security risks.,Set DB_CHAINING option to OFF.,https://docs.microsoft.com/dotnet/framework/data/adonet/sql/enabling-cross-database-access-in-sql-server,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -AutoCreateStatsIncremental,definition,"['DefaultRuleset', 'DBConfiguration', 'Statistics', 'Performance']",Incremental option of auto stats should be ON,"Incremental statistics update at partition level is a feature introduced in SQL Server 2014. When the option INCREMENTAL is turn on at the database level, newly auto created column statistics will use incremental statistics on partitioned tables by default.",Set AUTO_CREATE_STATISTICS to ON and set INCREMENTAL to ON,https://docs.microsoft.com/sql/relational-databases/statistics/statistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -TrustWorthy,definition,"['DefaultRuleset', 'DBConfiguration', 'Security']",TRUSTWORTHY should be OFF,"You can use the TRUSTWORTHY database setting to indicate whether the instance of Microsoft SQL Server trusts the database and the contents within the database. By default, this setting is set to OFF to mitigate certain threats that may be present when a database is attached to the server.",Set TRUSTWORTHY option to OFF,https://support.microsoft.com/help/2183687/guidelines-for-using-the-trustworthy-database-setting-in-sql-server,Database,/^(Windows|Linux)$/,OnPremises,Warning -ParameterizationNotSimple,definition,"['DefaultRuleset', 'DBConfiguration', 'Performance', 'QueryOptimizer']",PARAMETERIZATION should be SIMPLE,"When the PARAMETERIZATION database option is set to SIMPLE, the SQL Server query optimizer may choose to parameterize the queries. This means that any literal values that are contained in a query are substituted with parameters. This process is referred to as simple parameterization. When SIMPLE parameterization is in effect, you cannot control which queries are parameterized and which queries are not. However, you can specify that all queries in a database be parameterized by setting the PARAMETERIZATION database option to FORCED. + Verify need to set a Non-default trace flag with current system build and configuration.",https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,Warning +TF7412,TF 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting,Enable trace flag 7412 to enables the lightweight profiling infrastructure for live query performance troubleshooting.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace Flag 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting. Consider enabling TF 7412 to have the ability to access runtime information on query execution plans for any session.,https://docs.microsoft.com/sql/relational-databases/performance/query-profiling-infrastructure,Server,/^(Windows|Linux)$/,OnPremises,Information +TF9024,TF 9024 converts a global log pool memory object into NUMA node partitioned memory object.,Verify need to set a Non-default TF with current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'Memory', 'CPU']",TF9024 converts a global log pool memory object into NUMA node partitioned memory object.,https://support.microsoft.com/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,Server,Windows,OnPremises,Warning +TF9024,,Consider enabling TF9024 to convert global log pool memory objects into NUMA node partitioned memory objects.,override,,,,,,,Information +TF9024,,"TF9024 is not needed in SQL Server 2012 SP3, SQL Server 2014 SP1 and above.",override,,,,,,,Warning +TF8048,TF 8048 converts NUMA partitioned memory objects into CPU partitioned,Verify need to set a Non-default TF with current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'CPU', 'Memory']",TF 8048 converts NUMA partitioned memory objects into CPU partitioned.,https://support.microsoft.com/en-us/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,Server,Windows,OnPremises,Warning +TF8048,,"TF8048 is not needed in SQL Server 2014 SP2, SQL Server 2016 and above.",override,,,,,,,Warning +TF8048,,Consider enabling TF 8048 to convert NUMA partitioned memory objects into CPU partitioned.,override,,,,,,,Information +DeprecatedFeatures,Deprecated or discontinued features should not be used,Detected deprecated or discontinued feature uses: @{DeprecatedFeature}. We recommend to replace them with features actual for SQL Server version @{ProductVersion}.,definition,"['DefaultRuleset', 'Deprecated', 'Security', 'UpdateIssues', 'Performance']",This check detects deprecated or discontinued features used on target SQL Server instance. Deprecated features may be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +SystemHealthSession,system_health XEvent session is not active,Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,definition,"['DefaultRuleset', 'XEvent', 'SystemHealth']","This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. + We recommend that you do not stop, alter, or delete the system health session.",https://docs.microsoft.com/sql/relational-databases/extended-events/use-the-system-health-session,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +SPServerDiagnosticsSession,sp_server_diagnostics xEvent session is not active,Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,definition,"['DefaultRuleset', 'XEvent', 'SystemHealth']","This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. + We recommend that you do not stop, alter, or delete the system health session.",https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-server-diagnostics-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning +BlackboxTrace,Blackbox trace is configured and running,Make sure you still need the blackbox trace and stop it otherwise.,definition,"['DefaultRuleset', 'Traces']","This trace is designed to behave similarly to an airplane black box, to help you diagnose intermittent server crashes. It consumes more resources than the default trace and should not be running for extended periods of time.",https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-trace-create-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning +DefaultTrace,No default trace was found or is not active,Make sure that there is enough space for SQL Server to write the default trace file. Then have the default trace run by disabling and re-enabling it.,definition,"['DefaultRuleset', 'Traces']",Default trace provides troubleshooting assistance to database administrators by ensuring that they have the log data necessary to diagnose problems the first time they occur.,https://docs.microsoft.com/sql/relational-databases/policy-based-management/default-trace-log-files-disabled,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +HintsStatistics,Hints are being used,"We recommend that , , and be used only as a last resort by experienced developers and database administrators, because the SQL Server Query Optimizer typically selects the best execution plan for a query.",definition,"['DefaultRuleset', 'QueryOptimizer', 'Performance', 'Statistics']","Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the Query Optimizer might select for a query. Because the SQL Server Query Optimizer typically selects the best execution plan for a query, we recommend that , , and be used only as a last resort by experienced developers and database administrators.",https://docs.microsoft.com/sql/t-sql/queries/hints-transact-sql,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information +HintsUsageInModules,Hints usage in modules,@{Hint} was used in @{type_desc} @{Schema_Name}.@{Object_Name}.,definition,"['DefaultRuleset', 'QueryOptimizer', 'Performance', 'Statistics']","Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the Query Optimizer might select for a query. Because the SQL Server Query Optimizer typically selects the best execution plan for a query, we recommend that , , and be used only as a last resort by experienced developers and database administrators.",https://docs.microsoft.com/sql/t-sql/queries/hints-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information +PlansUseRatio,Amount of single use plans in cache is high,Amount of single use plans in cache is high (@{SingleUsePlansUseRatio:P0}). Consider enabling the Optimize for ad hoc workloads setting on heavy OLTP ad-hoc workloads to conserve resources.,definition,"['DefaultRuleset', 'Performance', 'QueryOptimizer']",Single use plans waste system resources.,https://docs.microsoft.com/sql/database-engine/configure-windows/optimize-for-ad-hoc-workloads-server-configuration-option,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +HypotheticalIndexes,Hypothetical indexes found,Index @{IndexName} for @{Schema}.@{Object} is marked as hypothetical. It is recommended to drop hypothetical index @{IndexName} as soon as possible.,definition,"['DefaultRuleset', 'Indexes', 'Performance']","Database has indexes that are marked as hypothetical. Hypothetical indexes are created by the Database Tuning Assistant (DTA) during its tests. If a DTA session was interrupted, these indexes may not be deleted. It is recommended to drop these objects as soon as possible.",,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +HypotheticalStatistics,Hypothetical statistics found,Statistics @{StatName} for @{Schema}.@{Object} is hypothetical. It is recommended to drop hypothetical statistics @{StatName} as soon as possible.,definition,"['DefaultRuleset', 'Statistics']","Database has statistics that are marked as hypothetical. Hypothetical statistics are created by the Database Tuning Assistant (DTA) during its tests. If a DTA session was interrupted, these statistics may not be deleted. It is recommended to drop these objects as soon as possible.",,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +LatestCU,SQL Server instance is not up to date,Product version @{ProductVersion} is not the latest available. We recommend keeping your SQL Server up to date and install Service Packs and Cumulative Updates as they are released.,definition,"['DefaultRuleset', 'Security', 'UpdateIssues']","On an installed instance of SQL Server, we recommend that you apply the latest security updates and critical updates including general distribution releases (GDRs), service packs (SPs), and cumulative updates (CUs).",https://support.microsoft.com/help/321185/how-to-determine-the-version-edition-and-update-level-of-sql-server-an https://docs.microsoft.com/sql/database-engine/install-windows/install-sql-server-servicing-updates,Server,/^(Windows|Linux)$/,OnPremises,Warning +LatestCU,SQL Server instance is up to date,Product version @{ProductVersion} is the latest available.,override,,,https://support.microsoft.com/help/321185/how-to-determine-the-version-edition-and-update-level-of-sql-server-an https://docs.microsoft.com/sql/database-engine/install-windows/install-sql-server-servicing-updates,,,,Warning +FKNoIndexes,Foreign key constraints should have corresponding indexes,Create a corresponding index for each foreign key. There is no index on the following foreign keys: @{ConstraintName}.,definition,"['DefaultRuleset', 'Performance', 'Indexes']","Unlike primary key constraints, creating a foreign key constraint does not automatically create a corresponding index. However, manually creating an index on a foreign key is often useful.",https://docs.microsoft.com/sql/relational-databases/tables/primary-and-foreign-key-constraints,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +MissedIndexes,Potentially missing indexes,Create an index on @{Table} with key columns @{KeyCols}@{IncludedCols: and included columns: #},definition,"['DefaultRuleset', 'Performance', 'Indexes']",Potentially missing indexes were found based on query history. It may be important to revise them. Please note that this check based on a scoring method and the results may be approximate - for information purposes only.,https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information +FullBackup,Full backup is missed or outdated,Create a new full backup of the database,definition,"['DefaultRuleset', 'Backup']",Database doesn't have any full backup or the latest full backup is over 7 days.,https://docs.microsoft.com/sql/relational-databases/backup-restore/create-a-full-database-backup-sql-server,Database,/^(Windows|Linux)$/,OnPremises,Warning +OutdatedTranLogBackup,Transaction Log backup is missed or outdated,Create a backup of Transaction Log. Database recovery model: @{recovery_model_desc},definition,"['DefaultRuleset', 'Backup']","Database does not have any transaction Log backup since the latest full or differential backup, or it's older than 24H.",https://docs.microsoft.com/sql/relational-databases/backup-restore/back-up-a-transaction-log-sql-server,Database,/^(Windows|Linux)$/,OnPremises,Warning +DbDiffCollation,Database collation doesn't match the collation of master,Keep database collation the same as the collation for master or model,definition,"['DefaultRuleset', 'DBConfiguration', 'Collation']","We recommend that the collations of user-defined databases match the collation of master or model. Otherwise, collation conflicts can occur that might prevent code from executing. For example, when a stored procedure joins one table to a temporary table, SQL Server might end the batch and return a collation conflict error if the collations of the user-defined database and the model database are different. This occurs because temporary tables are created in tempdb, which bases its collation on that of model.",https://docs.microsoft.com/sql/database-engine/set-collation-user-defined-databases-match-master-model-databases,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +AutoClose,Auto Close Option should be OFF,Set AUTO_CLOSE option to OFF,definition,"['DefaultRuleset', 'Performance', 'DBConfiguration']","When AUTO_CLOSE is set ON, this can cause performance degradation on frequently accessed databases because of the increased overhead of opening and closing the database after each connection. AUTO_CLOSE also flushes the procedure cache after each connection.",https://docs.microsoft.com/sql/relational-databases/policy-based-management/set-the-auto-close-database-option-to-off,Database,/^(Windows|Linux)$/,OnPremises,Warning +AutoShrink,Auto Shrink Option should be OFF,Set AUTO_SHRINK option to OFF.,definition,"['DefaultRuleset', 'DBConfiguration', 'Performance']","Shrinking databases is the fastest way to achieve fragmentation. SQL Server goes to the last page in the database, moves it to the first free available space, and then repeats the process again. This shuffles the deck, putting your pages out of order.",https://blogs.msdn.microsoft.com/buckwoody/2009/07/01/sql-server-best-practices-auto-shrink-should-be-off,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +PageVerify,PAGE_VERIFY option should be CHECKSUM,Set PAGE_VERIFY option to CHECKSUM.,definition,"['DefaultRuleset', 'DBConfiguration', 'DataIntegrity']","When CHECKSUM is enabled for the PAGE_VERIFY database option, the SQL Server Database Engine calculates a checksum over the contents of the whole page, and stores the value in the page header when a page is written to disk. When the page is read from disk, the checksum is recomputed and compared to the checksum value that is stored in the page header. This helps provide a high level of data-file integrity.",https://docs.microsoft.com/sql/relational-databases/policy-based-management/set-the-page-verify-database-option-to-checksum,Database,/^(Windows|Linux)$/,OnPremises,Warning +DbChaining,Cross-Database Access should be disabled,Set DB_CHAINING option to OFF.,definition,"['DefaultRuleset', 'DBConfiguration', 'Security']",Ownership chaining across databases is turned off by default. Microsoft recommends that you disable cross-database ownership chaining because it exposes you to the additional security risks.,https://docs.microsoft.com/dotnet/framework/data/adonet/sql/enabling-cross-database-access-in-sql-server,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +AutoCreateStatsIncremental,Incremental option of auto stats should be ON,Set AUTO_CREATE_STATISTICS to ON and set INCREMENTAL to ON,definition,"['DefaultRuleset', 'DBConfiguration', 'Statistics', 'Performance']","Incremental statistics update at partition level is a feature introduced in SQL Server 2014. When the option INCREMENTAL is turn on at the database level, newly auto created column statistics will use incremental statistics on partitioned tables by default.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +TrustWorthy,TRUSTWORTHY should be OFF,Set TRUSTWORTHY option to OFF,definition,"['DefaultRuleset', 'DBConfiguration', 'Security']","You can use the TRUSTWORTHY database setting to indicate whether the instance of Microsoft SQL Server trusts the database and the contents within the database. By default, this setting is set to OFF to mitigate certain threats that may be present when a database is attached to the server.",https://support.microsoft.com/help/2183687/guidelines-for-using-the-trustworthy-database-setting-in-sql-server,Database,/^(Windows|Linux)$/,OnPremises,Warning +ParameterizationNotSimple,PARAMETERIZATION should be SIMPLE,"Set PARAMETERIZATION = SIMPLE and use forced parameterization only on a certain class of queries, instead of all queries",definition,"['DefaultRuleset', 'DBConfiguration', 'Performance', 'QueryOptimizer']","When the PARAMETERIZATION database option is set to SIMPLE, the SQL Server query optimizer may choose to parameterize the queries. This means that any literal values that are contained in a query are substituted with parameters. This process is referred to as simple parameterization. When SIMPLE parameterization is in effect, you cannot control which queries are parameterized and which queries are not. However, you can specify that all queries in a database be parameterized by setting the PARAMETERIZATION database option to FORCED. - Regardless of whether you have a Plan-Stability or not, SQL Server will always auto parameterize your SQL Statements, and reuse the cached execution plan over and over again. It doesn't matter how terrible the execution plan is. Therefore you have to know in exact detail the shape of your execution plans, and whether they can lead to some performance related problems.","Set PARAMETERIZATION = SIMPLE and use forced parameterization only on a certain class of queries, instead of all queries",https://docs.microsoft.com/sql/relational-databases/performance/specify-query-parameterization-behavior-by-using-plan-guides,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -TempDBFilesNotSameSize,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",TempDB data files are not the same size,We recommend that you create all TempDB data files at the same size.,Make all TempDB data files the same size,https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning -TempDBFilesMultiple4,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",Number of TempDB data files should be in multiples of 4,"Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",Make sure number of TempDB data files is in multiples of 4,https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning -TempDBFiles1PerCPU,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",Number of TempDB data files should depend on CPU count,"Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",Make sure to have 1 data file per logical processor (processors count: @{online_logical_processors}),https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning -TempDBFilesNotLess8,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",Number of TempDB data files should be at least 8,"Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.","Add extra data files to TempDB. There are @{physical_name} data files, should be at least 8",https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning -TempDBFilesAutoGrowth,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",TempDB data files have different auto growth settings,"TempDB data files should be of equal size within each filegroup, as SQL Server uses a proportional-fill algorithm that favors allocations in files with more free space.",Make Autogrowth settings the same for each TempDB data file,https://docs.microsoft.com/sql/relational-databases/databases/tempdb-database,Server,/^(Windows|Linux)$/,OnPremises,Warning -FilesAutogrowth,definition,"['DefaultRuleset', 'Performance', 'DBFileConfiguration']",Database files have Autogrowth setting over 1GB,"A data or log file will be extended with auto-growth value to prevent the lack of free space in files. This process can perform significant impact on SQL Server performance if auto-growth value gets over 1 GB. By default, SQL Server will put zeros to a newly allocated space. And the more space it takes, the more time it takes to initialize it.",Set File Growth to less than 1GB for files: @{FileName},https://support.microsoft.com/help/315512/considerations-for-the-autogrow-and-autoshrink-settings-in-sql-server,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -DuplicateIndexes,definition,"['DefaultRuleset', 'Performance', 'Indexes']",There are tables with duplicate indexes,There are tables with duplicate indexes according to their definitions. We recommended to revise all these objects as soon as possible.,Consider removing duplicate indexes in table @{Table}: @{ToDelete},https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -RedundantIndexes,definition,"['DefaultRuleset', 'Performance', 'Indexes']",There are tables with possibly redundant indexes,There are tables with possibly redundant indexes according to the set of key and included columns. We recommended to revise all these objects as soon as possible.,Consider removing redundant indexes in table @{Table}: @{Indexes},https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -UserObjectsInMaster,definition,"['DefaultRuleset', 'masterDB', 'Backup']",User objects in database master,"We highly recommend you not create user objects in the master database. If it's unavoidable for some reason, make sure to back up the database more frequently.",Remove user objects from database master: @{Object_Name},https://docs.microsoft.com/sql/relational-databases/databases/master-database,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -CpuUtilOver70,definition,"['DefaultRuleset', 'Performance', 'CPU']",CPU usage over 70%,"CPU utilization rate in the last 2 hours is over 70% - consider review queries with high CPU usage or add additional hardware resources. Also, potential causes include memory pressure, low query plan reuse, non-optimized queries.",Investigate high CPU utilization by SQL Server: over 70% in the last 2 hours,https://docs.microsoft.com/previous-versions/technet-magazine/cc137784(v=msdn.10),Server,Windows,"OnPremises, ManagedInstance",Warning -CpuUtilOver90,definition,"['DefaultRuleset', 'Performance', 'CPU']",CPU usage over 90%,"CPU utilization rate in the last 2 hours is over 90% - consider review queries with high CPU usage or add additional hardware resources. Also, potential causes include memory pressure, low query plan reuse, non-optimized queries.",Investigate high CPU utilization by SQL Server: over 90% in the last 2 hours,https://docs.microsoft.com/previous-versions/technet-magazine/cc137784(v=msdn.10),Server,Windows,"OnPremises, ManagedInstance",Warning -ReplErrors24H,definition,"['DefaultRuleset', 'Replication']",Replication errors in the last 24 hours,This check searches for errors in distribution database agent's history table for the last 24 hours.,Review replication errors for the following publications: @{publication},https://docs.microsoft.com/sql/relational-databases/replication/sql-server-replication,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity10,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 10,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity16,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 16,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity17,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 17,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity19,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 19,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity20,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 20,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity21,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 21,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity22,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 22,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity23,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 23,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity24,definition,"['DefaultRuleset', 'Agent']",Agent doesn't rise alerts for errors with severity 24,"Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",Consider creating alerts for the following errors: @{error_ids},https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -WeakPassword,definition,"['DefaultRuleset', 'Security', 'WeakPassword']",Weak password,Some user logins have weak passwords.,Make sure to set strong passwords on the following logins: @{PasswordData},https://docs.microsoft.com/sql/relational-databases/security/strong-passwords,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -VLFCount,definition,"['DefaultRuleset', 'Backup', 'Performance']",VLF count,"The SQL Server Database Engine divides each physical log file internally into a number of virtual log files (VLFs). Virtual log files have no fixed size, and there is no fixed number of virtual log files for a physical log file. The Database Engine chooses the size of the virtual log files dynamically while it is creating or extending log files. The Database Engine tries to maintain a small number of virtual files. The size of the virtual files after a log file has been extended is the sum of the size of the existing log and the size of the new file increment. The size or number of virtual log files cannot be configured or set by administrators. + Regardless of whether you have a Plan-Stability or not, SQL Server will always auto parameterize your SQL Statements, and reuse the cached execution plan over and over again. It doesn't matter how terrible the execution plan is. Therefore you have to know in exact detail the shape of your execution plans, and whether they can lead to some performance related problems.",https://docs.microsoft.com/sql/relational-databases/performance/specify-query-parameterization-behavior-by-using-plan-guides,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +TempDBFilesNotSameSize,TempDB data files are not the same size,Make all TempDB data files the same size,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",We recommend that you create all TempDB data files at the same size.,https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning +TempDBFilesMultiple4,Number of TempDB data files should be in multiples of 4,Make sure number of TempDB data files is in multiples of 4,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']","Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning +TempDBFiles1PerCPU,Number of TempDB data files should depend on CPU count,Make sure to have 1 data file per logical processor (processors count: @{online_logical_processors}),definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']","Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning +TempDBFilesNotLess8,Number of TempDB data files should be at least 8,"Add extra data files to TempDB. There are @{physical_name} data files, should be at least 8",definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']","Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning +TempDBFilesAutoGrowth,TempDB data files have different auto growth settings,Make Autogrowth settings the same for each TempDB data file,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']","TempDB data files should be of equal size within each filegroup, as SQL Server uses a proportional-fill algorithm that favors allocations in files with more free space.",https://docs.microsoft.com/sql/relational-databases/databases/tempdb-database,Server,/^(Windows|Linux)$/,OnPremises,Warning +FilesAutogrowth,Database files have Autogrowth setting over 1GB,Set File Growth to less than 1GB for files: @{FileName},definition,"['DefaultRuleset', 'Performance', 'DBFileConfiguration']","A data or log file will be extended with auto-growth value to prevent the lack of free space in files. This process can perform significant impact on SQL Server performance if auto-growth value gets over 1 GB. By default, SQL Server will put zeros to a newly allocated space. And the more space it takes, the more time it takes to initialize it.",https://support.microsoft.com/help/315512/considerations-for-the-autogrow-and-autoshrink-settings-in-sql-server,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +DuplicateIndexes,There are tables with duplicate indexes,Consider removing duplicate indexes in table @{Table}: @{ToDelete},definition,"['DefaultRuleset', 'Performance', 'Indexes']",There are tables with duplicate indexes according to their definitions. We recommended to revise all these objects as soon as possible.,https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +RedundantIndexes,There are tables with possibly redundant indexes,Consider removing redundant indexes in table @{Table}: @{Indexes},definition,"['DefaultRuleset', 'Performance', 'Indexes']",There are tables with possibly redundant indexes according to the set of key and included columns. We recommended to revise all these objects as soon as possible.,https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +UserObjectsInMaster,User objects in database master,Remove user objects from database master: @{Object_Name},definition,"['DefaultRuleset', 'masterDB', 'Backup']","We highly recommend you not create user objects in the master database. If it's unavoidable for some reason, make sure to back up the database more frequently.",https://docs.microsoft.com/sql/relational-databases/databases/master-database,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +CpuUtilOver70,CPU usage over 70%,Investigate high CPU utilization by SQL Server: over 70% in the last 2 hours,definition,"['DefaultRuleset', 'Performance', 'CPU']","CPU utilization rate in the last 2 hours is over 70% - consider review queries with high CPU usage or add additional hardware resources. Also, potential causes include memory pressure, low query plan reuse, non-optimized queries.",https://docs.microsoft.com/previous-versions/technet-magazine/cc137784(v=msdn.10),Server,Windows,"OnPremises, ManagedInstance",Warning +CpuUtilOver90,CPU usage over 90%,Investigate high CPU utilization by SQL Server: over 90% in the last 2 hours,definition,"['DefaultRuleset', 'Performance', 'CPU']","CPU utilization rate in the last 2 hours is over 90% - consider review queries with high CPU usage or add additional hardware resources. Also, potential causes include memory pressure, low query plan reuse, non-optimized queries.",https://docs.microsoft.com/previous-versions/technet-magazine/cc137784(v=msdn.10),Server,Windows,"OnPremises, ManagedInstance",Warning +ReplErrors24H,Replication errors in the last 24 hours,Review replication errors for the following publications: @{publication},definition,"['DefaultRuleset', 'Replication']",This check searches for errors in distribution database agent's history table for the last 24 hours.,https://docs.microsoft.com/sql/relational-databases/replication/sql-server-replication,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity10,Agent doesn't rise alerts for errors with severity 10,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity16,Agent doesn't rise alerts for errors with severity 16,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity17,Agent doesn't rise alerts for errors with severity 17,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity19,Agent doesn't rise alerts for errors with severity 19,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity20,Agent doesn't rise alerts for errors with severity 20,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity21,Agent doesn't rise alerts for errors with severity 21,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity22,Agent doesn't rise alerts for errors with severity 22,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity23,Agent doesn't rise alerts for errors with severity 23,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +AgentAlertsSeverity24,Agent doesn't rise alerts for errors with severity 24,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning +WeakPassword,Weak password,Make sure to set strong passwords on the following logins: @{PasswordData},definition,"['DefaultRuleset', 'Security', 'WeakPassword']",Some user logins have weak passwords.,https://docs.microsoft.com/sql/relational-databases/security/strong-passwords,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +VLFCount,VLF count,Update transaction log settings to reduce the number of VLFs (current number is: @{RecoveryUnitId}),definition,"['DefaultRuleset', 'Backup', 'Performance']","The SQL Server Database Engine divides each physical log file internally into a number of virtual log files (VLFs). Virtual log files have no fixed size, and there is no fixed number of virtual log files for a physical log file. The Database Engine chooses the size of the virtual log files dynamically while it is creating or extending log files. The Database Engine tries to maintain a small number of virtual files. The size of the virtual files after a log file has been extended is the sum of the size of the existing log and the size of the new file increment. The size or number of virtual log files cannot be configured or set by administrators. If the log files grow to a large size in many small increments, they will have many virtual log files. This can slow down database startup and also log backup and restore operations. Conversely, if the log files are set to a large size with few or just one increment, they will have few very large virtual log files. - We recommend that you assign log files a size value close to the final size required, using the required increments to achieve optimal VLF distribution, and also have a relatively large growth_increment value.",Update transaction log settings to reduce the number of VLFs (current number is: @{RecoveryUnitId}),https://docs.microsoft.com/sql/relational-databases/sql-server-transaction-log-architecture-and-management-guide,Database,Windows,"OnPremises, ManagedInstance",Warning -TF8015,definition,"['DefaultRuleset', 'TraceFlag', 'CPU', 'NUMA']",TF 8015 disables auto-detection and NUMA setup,"SQL Server allows you to group CPUs into nodes referred to as soft-NUMA. You usually configure soft-NUMA when you have many CPUs and do not have hardware NUMA, but you can also use soft-NUMA to subdivide hardware NUMA nodes into smaller groups.",Disable trace flag 8015 for this SQL Server instance. This TF does not apply to this SQL Server version,https://techcommunity.microsoft.com/t5/SQL-Server-Support/How-It-Works-Soft-NUMA-I-O-Completion-Thread-Lazy-Writer-Workers/ba-p/316044,Server,Windows,OnPremises,Warning -TF8032,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 8032 reverts the cache limit parameters to the SQL Server 2005 RTM,Trace Flag 8032 reverts the cache limit parameters to the SQL Server 2005 RTM setting but can cause poor performance if large caches make less memory available for other memory consumers like BP.,The cache limit parameters reverted to the SQL Server 2005 RTM setting but can cause poor performance if large caches make less memory available for other memory consumers like BP,,Server,Windows,OnPremises,Warning -TF8744,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 8744 disables pre-fetching for the Nested Loop operator,Trace flag 8744 disables pre-fetching for the Nested Loops operator. Incorrect use of this trace flag may cause additional physical reads when SQL Server executes plans that contain the Nested Loops operator.,Disable trace flag 8744 for this SQL Server instance. This TF does not apply to this SQL Server version,https://support.microsoft.com/en-us/help/920093/tuning-options-for-sql-server-when-running-in-high-performance-workloa,Server,Windows,OnPremises,Warning -TF9347,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 9347 disables batch mode for sort operator,Trace flag 9347 disables batch mode for sort operator. SQL Server 2016 (13.x) introduced a new batch mode sort operator that boosts performance for many analytical queries.,Disable trace flag 9347 for this SQL Server instance. This TF does not apply to this SQL Server version,,Server,Windows,OnPremises,Warning -TF9349,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",TF 9349 disables batch mode for top N sort operator,Trace flag 9349 disables batch mode for top N sort operator. SQL Server 2016 (13.x) introduced a new batch mode top sort operator that boosts performance for many analytical queries.,Disable trace flag 9349 for this SQL Server instance. This TF does not apply to this SQL Server version,,Server,Windows,OnPremises,Warning -TF9389,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'TempDB']",TF 9389 enables dynamic memory grant for batch mode operators,"Trace flag 9389 enables additional dynamic memory grant for batch mode operators. If a query does not get all the memory it needs, it spills data to TempDB, incurring additional I/O and potentially impacting query performance. If the dynamic memory grant trace flag is enabled, a batch mode operator may ask for additional memory and avoid spilling to TempDB if additional memory is available.",Disable trace flag 9389 for this SQL Server instance. The TF does not apply to this SQL Server version,,Server,Windows,"OnPremises, ManagedInstance",Warning -TF9476,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'QueryOptimizer']",TF 9476 causes SQL Server to generate a plan using the Simple Containment instead of the default Base Containment under New CE,"Trace flag 9476 causes SQL Server to generate a plan using the Simple Containment assumption instead of the default Base Containment assumption, under the query optimizer cardinality estimation model of SQL Server 2014 (12.x) through SQL Server 2017 versions.",Disable trace flag 9476 for this SQL Server instance. The TF does not apply to this SQL Server version,,Server,Windows,OnPremises,Warning -TF9481,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","TF 9481 enables Legacy CE model, irrespective of the compatibility level of the database","Trace flag 9481 enables you to set the query optimizer cardinality estimation model to the SQL Server 2012 (11.x) and earlier versions, irrespective of the compatibility level of the database.",Disable trace flag 9481 for this SQL Server instance. The TF does not apply to this SQL Server version,,Server,Windows,OnPremises,Warning -TF10204,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'ColumnStore']",TF 10204 disables merge/recompress during columnstore index reorganization,"Trace flag 10204 disables merge/recompress during columnstore index reorganization. In SQL Server 2016 (13.x), when a columnstore index is reorganized, there is new functionality to automatically merge any small compressed rowgroups into larger compressed rowgroups, as well as recompressing any rowgroups that have a large number of deleted rows.",Disable trace flag 10204 for this SQL Server instance. The TF does not apply to this SQL Server version,,Server,Windows,OnPremises,Warning -SPNaming,definition,"['DefaultRuleset', 'Naming']",Stored Procedure Naming,"In SQL Server, the sp_ prefix designates system stored procedures. If you use that prefix for your stored procedures, the name of your procedure might conflict with the name of a system stored procedure that will be created in the future. If such a conflict occurs, your application might break if your application refers to the procedure without qualifying the reference by schema. In this situation, the name will bind to the system procedure instead of to your procedure.",Rename the following stored procedures to get rid of the sp_ prefix: @{ObjectName},https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172115(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",Warning -ObjectNamingSpecialChar,definition,"['DefaultRuleset', 'Naming']",Object Naming,"If you name a database object by using any character in the following table, you make it more difficult not only to reference that object but also to read code that contains the name of that object.",Rename the following objects to get rid of special characters: @{ObjectName},https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172134(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",Warning -ColumnNamingSpecialChar,definition,"['DefaultRuleset', 'Naming']",Column Naming,"If you name a database object by using any character in the following table, you make it more difficult not only to reference that object but also to read code that contains the name of that object.",Rename the following columns to get rid of special characters: @{ObjectName},https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172134(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",Warning -FnNaming,definition,"['DefaultRuleset', 'Naming']",User Function Naming,"In SQL Server, the fn_ prefix designates system functions. If you use that prefix for your functions, the name of your function might conflict with the name of a system function that will be created in the future. If such a conflict occurs, your application might break if your application refers to the function without qualifying the reference by schema. In this situation, the name will bind to the system function instead of to your function.",Rename the following functions to get rid of the fn_ prefix: @{ObjectName},https://docs.microsoft.com/sql/t-sql/statements/create-function-transact-sql,Database,Windows,"OnPremises, ManagedInstance",Warning -ObjectNamingResKeywords,definition,"['DefaultRuleset', 'Naming']",Object names contain reserved keywords,"Microsoft SQL Server uses reserved keywords for defining, manipulating, and accessing databases. Reserved keywords are part of the grammar of the Transact-SQL language that is used by SQL Server to parse and understand Transact-SQL statements and batches. Although it is syntactically possible to use SQL Server reserved keywords as identifiers and object names in Transact-SQL scripts, you can do this only by using delimited identifiers.",Rename the following objects to get rid of reserved keywords: @{ObjectName},https://docs.microsoft.com/sql/t-sql/language-elements/reserved-keywords-transact-sql,Database,Windows,"OnPremises, ManagedInstance",Warning -DeprFeaturesInModules,definition,"['DefaultRuleset', 'Security', 'Deprecated', 'LongRunningChecks', 'UpdateIssues']",Use of deprecated or discontinued features in modules,Deprecated features are scheduled to be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,Consider getting rid of the following deprecated or discontinued features in @{ObjectName}: @{Keyword},https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Database,Windows,"OnPremises, ManagedInstance",Warning -DeprFeaturesInJobs,definition,"['DefaultRuleset', 'Security', 'Deprecated', 'Agent', 'Jobs', 'LongRunningChecks', 'UpdateIssues']",Use of deprecated or discontinued features in modules,Deprecated features are scheduled to be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,Consider getting rid of the following deprecated or discontinued features in job @{ObjectName}: @{Keyword},https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Server,Windows,"OnPremises, ManagedInstance",Warning -NUMANodeSingleCPU,definition,"['DefaultRuleset', 'NUMA', 'CPU', 'Memory', 'Performance']",Single CPU assigned to NUMA node,"Microsoft SQL Server is non-uniform memory access (NUMA) aware. NUMA architecture provides a scalable solution to performance problem. Computers with hardware NUMA have more than one system bus, each serving a small set of processors. Each group of processors has its own memory and possibly its own I/O channels, but each CPU can access memory associated with other groups in a coherent way. Each group is called a NUMA node. The number of CPUs within a NUMA node depends on the hardware vendor. Your hardware manufacturer can tell you if your computer supports hardware NUMA.",Consider assigning additional CPUs to NUMA nodes that have only one assigned CPU,https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms178144(v=sql.105),Server,Windows,"OnPremises, ManagedInstance",Warning -NUMANodeNoCPU,definition,"['DefaultRuleset', 'NUMA', 'Performance', 'CPU', 'Memory']",NUMA nodes without CPUs,"Microsoft SQL Server is non-uniform memory access (NUMA) aware. NUMA architecture provides a scalable solution to performance problem. Computers with hardware NUMA have more than one system bus, each serving a small set of processors. Each group of processors has its own memory and possibly its own I/O channels, but each CPU can access memory associated with other groups in a coherent way. Each group is called a NUMA node. The number of CPUs within a NUMA node depends on the hardware vendor. Your hardware manufacturer can tell you if your computer supports hardware NUMA.",Make sure that all NUMA nodes have assigned CPUs,https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms178144(v=sql.105),Server,Windows,"OnPremises, ManagedInstance",Warning -IndexKeyGuid,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Guid in clustered index key column,"A big reason for a clustered index is when you often want to retrieve rows for a range of values for a given column. Because the data is physically arranged in that order, the rows can be extracted very efficiently. Something like a GUID, while excellent for a primary key, could be positively detrimental to performance, as there will be additional cost for inserts and no perceptible benefit on selects.",Get rid of GUIDs in the following clustered indexes' keys: @{IndexName},https://azure.microsoft.com/blog/uniqueidentifier-and-clustered-indexes/,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -IndexesLargeKeys,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Indexes keys with more than 900 bytes,"When you design an index that contains many key columns, or large-size columns, calculate the size of the index key to make sure that you do not exceed the maximum index key size. SQL Server retains the 900-byte limit for the maximum total size of all index key columns. This excludes nonkey columns that are included in the definition of nonclustered indexes.",Get rid of keys larger than 900 bytes in index @{FullName},http://msdn.microsoft.com/library/ms191241.aspx,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -DisabledIndexes,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Disabled Indexes exist,"If you need to load a lot of data quickly, you can disable nonclustered indexes in order to improve performance. After the data load finishes, enable the nonclustered indexes again by rebuilding them. This technique works best in large data warehouse environments where entire dimension tables might be reloaded from scratch every night. Disabling nonclustered indexes is safer than dropping and recreating them because scripting indexes is hard. Unfortunately, sometimes our load processes crash before enabling the indexes again, or sometimes we manually load data and we forget to rebuild them.",Remove or enable this disabled index: @{FullName},https://docs.microsoft.com/sql/relational-databases/indexes/disable-indexes-and-constraints,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -IndexesFillFactor,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Index fill factor lower 80%,"The fill-factor option is provided for fine-tuning index data storage and performance. When an index is created or rebuilt, the fill-factor value determines the percentage of space on each leaf-level page to be filled with data, reserving the remainder on each page as free space for future growth. For example, specifying a fill-factor value of 80 means that 20 percent of each leaf-level page will be left empty, providing space for index expansion as data is added to the underlying table. The empty space is reserved between the index rows rather than at the end of the index.",Review index @{FullName} as its fill factor @{FillFactor} is lower than 80 percent,https://docs.microsoft.com/sql/relational-databases/indexes/specify-fill-factor-for-an-index,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -NonUniqueClusterIndex,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Non-unique clustered indexes,"Index uniqueness is highly desirable attribute of a clustering key, and goes hand-in-hand with index narrowness. SQL Server does not require a clustered index to be unique, but yet it must have some means of uniquely identifying every row. That’s why, for non-unique clustered indexes, SQL Server adds to every duplicate instance of a clustering key value a 4-byte integer value called a uniqueifier. This uniqueifier is added everywhere the clustering key is stored. That means the uniqueifier is stored in both clustered and non-clustered indexes. As you can imagine, if there are many rows using the same clustering key value, this can become quite expensive.",Review this clustered index @{FullName} as it is non-unique,https://docs.microsoft.com/sql/relational-databases/indexes/clustered-and-nonclustered-indexes-described,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -SuspectPages,definition,"['DefaultRuleSet', 'Pages', 'DataIntegrity']",Suspect pages,"The suspect_pages table is used for maintaining information about suspect pages, and is relevant in helping to decide whether a restore is necessary.",Run DBCC CHECKDB to verify affected database. Suspect pages were found: @{EventType},https://docs.microsoft.com/sql/relational-databases/backup-restore/manage-the-suspect-pages-table-sql-server,Database,/^(Windows|Linux)$/,,Warning -SparseFiles,definition,"['DefaultRuleSet', 'Snapshots', 'Backup', 'DataIntegrity']",Sparse files,"If the file is sparse or compressed, the NTFS file system may deallocate disk space in the file. This sets the range of bytes to zeroes (0) without extending the file size.",Get rid of sparse files: @{SparseFiles},"https://blogs.msdn.microsoft.com/jorgepc/2010/11/25/what-are-sparse-files-and-why-should-i-care-as-sql-server-dba/, https://techcommunity.microsoft.com/t5/SQL-Server-Support/Did-your-backup-program-utility-leave-your-SQL-Server-running-in/ba-p/315840",Database,/^(Windows|Linux)$/,,Warning -TableNoIndex,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Tables without indexes,"Each table in the database has one or more pages. To keep track of those pages, SQL Server uses a special set of pages, called IAM (for Index Allocation Map) pages. In spite of the word “Index” in the name, IAMs are used for non-indexed tables as well. These are called heaps. All the data is there, but the only way to find anything is to read it starting at the beginning. For a very large table, this will be terribly inefficient.",Review table @{TableName} and create reasonable indexes,https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -TableNoClusteredIndex,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Tables without clustered indexes,"Tables without clustered indexes are called heaps. They’re scattered on disk anywhere that SQL Server can find a spot, and they’re not stored in any order whatsoever. This can make for really fast inserts – SQL Server can just throw the data down – but slow selects, updates, and deletes.",Review table @{TableName} and consider creating a clustered index,https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -TablePSAlign,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Table index not aligned with PS,"Table partitioning is a complex way to break out your large tables into smaller, more manageable chunks, but it comes with a lot of management heartache. One of the challenges is making sure that your indexes are partitioned and aligned the same way as your clustered index.",Consider recreating index @{IndexName} in table @{TableName} to have it aligned with your schema,https://docs.microsoft.com/sql/relational-databases/partitions/partitioned-tables-and-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -LoginNoPassword,definition,"['DefaultRuleset', 'Security', 'WeakPassword']",Logins with no passwords,Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.,Make sure to set strong passwords on the following logins: @{PasswordData},https://docs.microsoft.com/sql/relational-databases/security/password-policy,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -LoginEqPassword,definition,"['DefaultRuleset', 'Security', 'WeakPassword']",Logins with passwords that are same as the login names,Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.,Please review logins with password equals to login: @{PasswordData},https://docs.microsoft.com/sql/relational-databases/security/password-policy,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -SystemHealth,definition,"['DefaultRuleset', 'XEvent', 'SystemHealth', 'Performance']",System Health important messages,"The system_health session is an Extended Events session that is included by default with SQL Server. This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine",Error @{Error_Number} has occured @{Error_Count} times. Last time was @{Last_Logged_Days_Ago} days ago,https://docs.microsoft.com/sql/relational-databases/extended-events/use-the-system-health-session,Server,Windows,"OnPremises, ManagedInstance",Warning -RarelyUsedIndex,definition,"['DefaultRuleset', 'Indexes', 'Performance']",Rarely used index,"Rarely used indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used quite often. It makes sense to compare impact of writing operations versus rare reading speedup.",Make sure you need index @{IndexName} as it's used too rarely,https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -UnusedIndex,definition,"['DefaultRuleset', 'Index', 'Performance']",Unused index,"Unused indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used anywhere.",Make sure you need index @{IndexName} as it's unused,https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -SkewedCompatibilityLevel,definition,"['DefaultRuleset', 'CompatibilityLevel', 'Security', 'Performance', 'UpdateIssues']",Database with skewed compatibility level,Some databases may have a compatibility level lower than the allowed level by the Database Engine.,Update database compatibility level (current level: @{CompatibilityLevel}),https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-compatibility-level,Database,/^(Windows|Linux)$/,,Warning -['DefaultRuleset'],override,,,,,,,,,Warning + We recommend that you assign log files a size value close to the final size required, using the required increments to achieve optimal VLF distribution, and also have a relatively large growth_increment value.",https://docs.microsoft.com/sql/relational-databases/sql-server-transaction-log-architecture-and-management-guide,Database,Windows,"OnPremises, ManagedInstance",Warning +TF8015,TF 8015 disables auto-detection and NUMA setup,Disable trace flag 8015 for this SQL Server instance. This TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'CPU', 'NUMA']","SQL Server allows you to group CPUs into nodes referred to as soft-NUMA. You usually configure soft-NUMA when you have many CPUs and do not have hardware NUMA, but you can also use soft-NUMA to subdivide hardware NUMA nodes into smaller groups.",https://techcommunity.microsoft.com/t5/SQL-Server-Support/How-It-Works-Soft-NUMA-I-O-Completion-Thread-Lazy-Writer-Workers/ba-p/316044,Server,Windows,OnPremises,Warning +TF8032,TF 8032 reverts the cache limit parameters to the SQL Server 2005 RTM,The cache limit parameters reverted to the SQL Server 2005 RTM setting but can cause poor performance if large caches make less memory available for other memory consumers like BP,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace Flag 8032 reverts the cache limit parameters to the SQL Server 2005 RTM setting but can cause poor performance if large caches make less memory available for other memory consumers like BP.,,Server,Windows,OnPremises,Warning +TF8744,TF 8744 disables pre-fetching for the Nested Loop operator,Disable trace flag 8744 for this SQL Server instance. This TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace flag 8744 disables pre-fetching for the Nested Loops operator. Incorrect use of this trace flag may cause additional physical reads when SQL Server executes plans that contain the Nested Loops operator.,https://support.microsoft.com/en-us/help/920093/tuning-options-for-sql-server-when-running-in-high-performance-workloa,Server,Windows,OnPremises,Warning +TF9347,TF 9347 disables batch mode for sort operator,Disable trace flag 9347 for this SQL Server instance. This TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace flag 9347 disables batch mode for sort operator. SQL Server 2016 (13.x) introduced a new batch mode sort operator that boosts performance for many analytical queries.,,Server,Windows,OnPremises,Warning +TF9349,TF 9349 disables batch mode for top N sort operator,Disable trace flag 9349 for this SQL Server instance. This TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace flag 9349 disables batch mode for top N sort operator. SQL Server 2016 (13.x) introduced a new batch mode top sort operator that boosts performance for many analytical queries.,,Server,Windows,OnPremises,Warning +TF9389,TF 9389 enables dynamic memory grant for batch mode operators,Disable trace flag 9389 for this SQL Server instance. The TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'TempDB']","Trace flag 9389 enables additional dynamic memory grant for batch mode operators. If a query does not get all the memory it needs, it spills data to TempDB, incurring additional I/O and potentially impacting query performance. If the dynamic memory grant trace flag is enabled, a batch mode operator may ask for additional memory and avoid spilling to TempDB if additional memory is available.",,Server,Windows,"OnPremises, ManagedInstance",Warning +TF9476,TF 9476 causes SQL Server to generate a plan using the Simple Containment instead of the default Base Containment under New CE,Disable trace flag 9476 for this SQL Server instance. The TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'QueryOptimizer']","Trace flag 9476 causes SQL Server to generate a plan using the Simple Containment assumption instead of the default Base Containment assumption, under the query optimizer cardinality estimation model of SQL Server 2014 (12.x) through SQL Server 2017 versions.",,Server,Windows,OnPremises,Warning +TF9481,"TF 9481 enables Legacy CE model, irrespective of the compatibility level of the database",Disable trace flag 9481 for this SQL Server instance. The TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace flag 9481 enables you to set the query optimizer cardinality estimation model to the SQL Server 2012 (11.x) and earlier versions, irrespective of the compatibility level of the database.",,Server,Windows,OnPremises,Warning +TF10204,TF 10204 disables merge/recompress during columnstore index reorganization,Disable trace flag 10204 for this SQL Server instance. The TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'ColumnStore']","Trace flag 10204 disables merge/recompress during columnstore index reorganization. In SQL Server 2016 (13.x), when a columnstore index is reorganized, there is new functionality to automatically merge any small compressed rowgroups into larger compressed rowgroups, as well as recompressing any rowgroups that have a large number of deleted rows.",,Server,Windows,OnPremises,Warning +SPNaming,Stored Procedure Naming,Rename the following stored procedures to get rid of the sp_ prefix: @{ObjectName},definition,"['DefaultRuleset', 'Naming']","In SQL Server, the sp_ prefix designates system stored procedures. If you use that prefix for your stored procedures, the name of your procedure might conflict with the name of a system stored procedure that will be created in the future. If such a conflict occurs, your application might break if your application refers to the procedure without qualifying the reference by schema. In this situation, the name will bind to the system procedure instead of to your procedure.",https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172115(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",Warning +ObjectNamingSpecialChar,Object Naming,Rename the following objects to get rid of special characters: @{ObjectName},definition,"['DefaultRuleset', 'Naming']","If you name a database object by using any character in the following table, you make it more difficult not only to reference that object but also to read code that contains the name of that object.",https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172134(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",Warning +ColumnNamingSpecialChar,Column Naming,Rename the following columns to get rid of special characters: @{ObjectName},definition,"['DefaultRuleset', 'Naming']","If you name a database object by using any character in the following table, you make it more difficult not only to reference that object but also to read code that contains the name of that object.",https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172134(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",Warning +FnNaming,User Function Naming,Rename the following functions to get rid of the fn_ prefix: @{ObjectName},definition,"['DefaultRuleset', 'Naming']","In SQL Server, the fn_ prefix designates system functions. If you use that prefix for your functions, the name of your function might conflict with the name of a system function that will be created in the future. If such a conflict occurs, your application might break if your application refers to the function without qualifying the reference by schema. In this situation, the name will bind to the system function instead of to your function.",https://docs.microsoft.com/sql/t-sql/statements/create-function-transact-sql,Database,Windows,"OnPremises, ManagedInstance",Warning +ObjectNamingResKeywords,Object names contain reserved keywords,Rename the following objects to get rid of reserved keywords: @{ObjectName},definition,"['DefaultRuleset', 'Naming']","Microsoft SQL Server uses reserved keywords for defining, manipulating, and accessing databases. Reserved keywords are part of the grammar of the Transact-SQL language that is used by SQL Server to parse and understand Transact-SQL statements and batches. Although it is syntactically possible to use SQL Server reserved keywords as identifiers and object names in Transact-SQL scripts, you can do this only by using delimited identifiers.",https://docs.microsoft.com/sql/t-sql/language-elements/reserved-keywords-transact-sql,Database,Windows,"OnPremises, ManagedInstance",Warning +DeprFeaturesInModules,Use of deprecated or discontinued features in modules,Consider getting rid of the following deprecated or discontinued features in @{ObjectName}: @{Keyword},definition,"['DefaultRuleset', 'Security', 'Deprecated', 'LongRunningChecks', 'UpdateIssues']",Deprecated features are scheduled to be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Database,Windows,"OnPremises, ManagedInstance",Warning +DeprFeaturesInJobs,Use of deprecated or discontinued features in modules,Consider getting rid of the following deprecated or discontinued features in job @{ObjectName}: @{Keyword},definition,"['DefaultRuleset', 'Security', 'Deprecated', 'Agent', 'Jobs', 'LongRunningChecks', 'UpdateIssues']",Deprecated features are scheduled to be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Server,Windows,"OnPremises, ManagedInstance",Warning +NUMANodeSingleCPU,Single CPU assigned to NUMA node,Consider assigning additional CPUs to NUMA nodes that have only one assigned CPU,definition,"['DefaultRuleset', 'NUMA', 'CPU', 'Memory', 'Performance']","Microsoft SQL Server is non-uniform memory access (NUMA) aware. NUMA architecture provides a scalable solution to performance problem. Computers with hardware NUMA have more than one system bus, each serving a small set of processors. Each group of processors has its own memory and possibly its own I/O channels, but each CPU can access memory associated with other groups in a coherent way. Each group is called a NUMA node. The number of CPUs within a NUMA node depends on the hardware vendor. Your hardware manufacturer can tell you if your computer supports hardware NUMA.",https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms178144(v=sql.105),Server,Windows,"OnPremises, ManagedInstance",Warning +NUMANodeNoCPU,NUMA nodes without CPUs,Make sure that all NUMA nodes have assigned CPUs,definition,"['DefaultRuleset', 'NUMA', 'Performance', 'CPU', 'Memory']","Microsoft SQL Server is non-uniform memory access (NUMA) aware. NUMA architecture provides a scalable solution to performance problem. Computers with hardware NUMA have more than one system bus, each serving a small set of processors. Each group of processors has its own memory and possibly its own I/O channels, but each CPU can access memory associated with other groups in a coherent way. Each group is called a NUMA node. The number of CPUs within a NUMA node depends on the hardware vendor. Your hardware manufacturer can tell you if your computer supports hardware NUMA.",https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms178144(v=sql.105),Server,Windows,"OnPremises, ManagedInstance",Warning +IndexKeyGuid,Guid in clustered index key column,Get rid of GUIDs in the following clustered indexes' keys: @{IndexName},definition,"['DefaultRuleset', 'Indexes', 'Performance']","A big reason for a clustered index is when you often want to retrieve rows for a range of values for a given column. Because the data is physically arranged in that order, the rows can be extracted very efficiently. Something like a GUID, while excellent for a primary key, could be positively detrimental to performance, as there will be additional cost for inserts and no perceptible benefit on selects.",https://azure.microsoft.com/blog/uniqueidentifier-and-clustered-indexes/,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +IndexesLargeKeys,Indexes keys with more than 900 bytes,Get rid of keys larger than 900 bytes in index @{FullName},definition,"['DefaultRuleset', 'Indexes', 'Performance']","When you design an index that contains many key columns, or large-size columns, calculate the size of the index key to make sure that you do not exceed the maximum index key size. SQL Server retains the 900-byte limit for the maximum total size of all index key columns. This excludes nonkey columns that are included in the definition of nonclustered indexes.",http://msdn.microsoft.com/library/ms191241.aspx,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +DisabledIndexes,Disabled Indexes exist,Remove or enable this disabled index: @{FullName},definition,"['DefaultRuleset', 'Indexes', 'Performance']","If you need to load a lot of data quickly, you can disable nonclustered indexes in order to improve performance. After the data load finishes, enable the nonclustered indexes again by rebuilding them. This technique works best in large data warehouse environments where entire dimension tables might be reloaded from scratch every night. Disabling nonclustered indexes is safer than dropping and recreating them because scripting indexes is hard. Unfortunately, sometimes our load processes crash before enabling the indexes again, or sometimes we manually load data and we forget to rebuild them.",https://docs.microsoft.com/sql/relational-databases/indexes/disable-indexes-and-constraints,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +IndexesFillFactor,Index fill factor lower 80%,Review index @{FullName} as its fill factor @{FillFactor} is lower than 80 percent,definition,"['DefaultRuleset', 'Indexes', 'Performance']","The fill-factor option is provided for fine-tuning index data storage and performance. When an index is created or rebuilt, the fill-factor value determines the percentage of space on each leaf-level page to be filled with data, reserving the remainder on each page as free space for future growth. For example, specifying a fill-factor value of 80 means that 20 percent of each leaf-level page will be left empty, providing space for index expansion as data is added to the underlying table. The empty space is reserved between the index rows rather than at the end of the index.",https://docs.microsoft.com/sql/relational-databases/indexes/specify-fill-factor-for-an-index,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +NonUniqueClusterIndex,Non-unique clustered indexes,Review this clustered index @{FullName} as it is non-unique,definition,"['DefaultRuleset', 'Indexes', 'Performance']","Index uniqueness is highly desirable attribute of a clustering key, and goes hand-in-hand with index narrowness. SQL Server does not require a clustered index to be unique, but yet it must have some means of uniquely identifying every row. That’s why, for non-unique clustered indexes, SQL Server adds to every duplicate instance of a clustering key value a 4-byte integer value called a uniqueifier. This uniqueifier is added everywhere the clustering key is stored. That means the uniqueifier is stored in both clustered and non-clustered indexes. As you can imagine, if there are many rows using the same clustering key value, this can become quite expensive.",https://docs.microsoft.com/sql/relational-databases/indexes/clustered-and-nonclustered-indexes-described,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +SuspectPages,Suspect pages,Run DBCC CHECKDB to verify affected database. Suspect pages were found: @{EventType},definition,"['DefaultRuleSet', 'Pages', 'DataIntegrity']","The suspect_pages table is used for maintaining information about suspect pages, and is relevant in helping to decide whether a restore is necessary.",https://docs.microsoft.com/sql/relational-databases/backup-restore/manage-the-suspect-pages-table-sql-server,Database,/^(Windows|Linux)$/,,Warning +SparseFiles,Sparse files,Get rid of sparse files: @{SparseFiles},definition,"['DefaultRuleSet', 'Snapshots', 'Backup', 'DataIntegrity']","If the file is sparse or compressed, the NTFS file system may deallocate disk space in the file. This sets the range of bytes to zeroes (0) without extending the file size.","https://blogs.msdn.microsoft.com/jorgepc/2010/11/25/what-are-sparse-files-and-why-should-i-care-as-sql-server-dba/, https://techcommunity.microsoft.com/t5/SQL-Server-Support/Did-your-backup-program-utility-leave-your-SQL-Server-running-in/ba-p/315840",Database,/^(Windows|Linux)$/,,Warning +TableNoIndex,Tables without indexes,Review table @{TableName} and create reasonable indexes,definition,"['DefaultRuleset', 'Indexes', 'Performance']","Each table in the database has one or more pages. To keep track of those pages, SQL Server uses a special set of pages, called IAM (for Index Allocation Map) pages. In spite of the word “Index” in the name, IAMs are used for non-indexed tables as well. These are called heaps. All the data is there, but the only way to find anything is to read it starting at the beginning. For a very large table, this will be terribly inefficient.",https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +TableNoClusteredIndex,Tables without clustered indexes,Review table @{TableName} and consider creating a clustered index,definition,"['DefaultRuleset', 'Indexes', 'Performance']","Tables without clustered indexes are called heaps. They’re scattered on disk anywhere that SQL Server can find a spot, and they’re not stored in any order whatsoever. This can make for really fast inserts – SQL Server can just throw the data down – but slow selects, updates, and deletes.",https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +TablePSAlign,Table index not aligned with PS,Consider recreating index @{IndexName} in table @{TableName} to have it aligned with your schema,definition,"['DefaultRuleset', 'Indexes', 'Performance']","Table partitioning is a complex way to break out your large tables into smaller, more manageable chunks, but it comes with a lot of management heartache. One of the challenges is making sure that your indexes are partitioned and aligned the same way as your clustered index.",https://docs.microsoft.com/sql/relational-databases/partitions/partitioned-tables-and-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +LoginNoPassword,Logins with no passwords,Make sure to set strong passwords on the following logins: @{PasswordData},definition,"['DefaultRuleset', 'Security', 'WeakPassword']",Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.,https://docs.microsoft.com/sql/relational-databases/security/password-policy,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +LoginEqPassword,Logins with passwords that are same as the login names,Please review logins with password equals to login: @{PasswordData},definition,"['DefaultRuleset', 'Security', 'WeakPassword']",Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.,https://docs.microsoft.com/sql/relational-databases/security/password-policy,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +SystemHealth,System Health important messages,Error @{Error_Number} has occured @{Error_Count} times. Last time was @{Last_Logged_Days_Ago} days ago,definition,"['DefaultRuleset', 'XEvent', 'SystemHealth', 'Performance']","The system_health session is an Extended Events session that is included by default with SQL Server. This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine",https://docs.microsoft.com/sql/relational-databases/extended-events/use-the-system-health-session,Server,Windows,"OnPremises, ManagedInstance",Warning +RarelyUsedIndex,Rarely used index,Make sure you need index @{IndexName} as it's used too rarely,definition,"['DefaultRuleset', 'Indexes', 'Performance']","Rarely used indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used quite often. It makes sense to compare impact of writing operations versus rare reading speedup.",https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +UnusedIndex,Unused index,Make sure you need index @{IndexName} as it's unused,definition,"['DefaultRuleset', 'Index', 'Performance']","Unused indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used anywhere.",https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning +SkewedCompatibilityLevel,Database with skewed compatibility level,Update database compatibility level (current level: @{CompatibilityLevel}),definition,"['DefaultRuleset', 'CompatibilityLevel', 'Security', 'Performance', 'UpdateIssues']",Some databases may have a compatibility level lower than the allowed level by the Database Engine.,https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-compatibility-level,Database,/^(Windows|Linux)$/,,Warning +['DefaultRuleset'],,,override,,,,,,,Warning From c96fde299fdef6e6508089cbde9eac8156593704 Mon Sep 17 00:00:00 2001 From: Alex Protsenko <53046834+alexprotsenko@users.noreply.github.com> Date: Tue, 5 Nov 2019 17:14:58 +0300 Subject: [PATCH 3/7] Removed defaultruleset.csv to rename it --- .../sql-assessment-api/defaultruleset.csv | 235 ------------------ 1 file changed, 235 deletions(-) delete mode 100644 samples/manage/sql-assessment-api/defaultruleset.csv diff --git a/samples/manage/sql-assessment-api/defaultruleset.csv b/samples/manage/sql-assessment-api/defaultruleset.csv deleted file mode 100644 index a48da0e41c..0000000000 --- a/samples/manage/sql-assessment-api/defaultruleset.csv +++ /dev/null @@ -1,235 +0,0 @@ -id,displayName,message,itemType,tags,description,helpLink,object,target.platform,target.engineEdition,level -AutoCreateStats,Auto-Create Statistics should be on,Turn Auto-Create Statistics option on to improve query performance.,definition,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']","The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. - - When the Auto Create statistics setting is ON, the Query Optimizer creates statistics on one or more columns of a table or an indexed view, as necessary, to improve query plans and query performance.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics#CreateStatistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -AutoUpdateStats,Auto-Update Statistics should be on,Turn Auto-Update Statistics option on to improve query performance.,definition,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']","The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. - - When the Auto Update Statistics setting is ON, the Query Optimizer updates statistics when they are used by a query and when they might be out-of-date. Statistics become out-of-date after insert, update, delete, or merge operations change the data distribution in the table or indexed view. The Query Optimizer determines when statistics might be out-of-date by counting the number of data modifications since the last statistics update and comparing the number of modifications to a threshold. The threshold is based on the number of rows in the table or indexed view. The Query Optimizer checks for out-of-date statistics before compiling a query and before executing a cached query plan. Before compiling a query, the Query Optimizer uses the columns, tables, and indexed views in the query predicate to determine which statistics might be out-of-date. Before executing a cached query plan, the Database Engine verifies that the query plan references up-to-date statistics. The AUTO_UPDATE_STATISTICS option applies to statistics created for indexes, single-columns in query predicates, and statistics that are created by using the CREATE STATISTICS statement. This option also applies to filtered statistics.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics#UpdateStatistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -QueryStoreOn,Query Store should be active,Make sure Query Store actual operation mode is 'Read Write' to keep your performance analysis accurate,definition,"['DefaultRuleset', 'Performance', 'QueryStore', 'Statistics']","The Query Store feature provides you with insight on query plan choice and performance. It simplifies performance troubleshooting by helping you quickly find performance differences caused by query plan changes. Query Store automatically captures a history of queries, plans, and runtime statistics, and retains these for your review. It separates data by time windows so you can see database usage patterns and understand when query plan changes happened on the server. While Query Store collects queries, execution plans and statistics, its size in the database grows until this limit is reached. When that happens, Query Store automatically changes the operation mode to read-only and stops collecting new data, which means that your performance analysis is no longer accurate.",https://docs.microsoft.com/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -TF174,TF 174 increases the plan cache bucket count,Consider enabling trace flag 174 to increase the plan cache bucket count.,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']","Trace Flag 174 increases the SQL Server plan cache bucket count from 40,009 to 160,001 on 64-bit systems. - When the SQL Server plan cache reaches its entry limit, plans that have low cost must be evicted in order to insert new plans. This can cause severe contention on the SOS_CACHESTORE spinlock and a high CPU usage occurs in SQL Server. - On 64-bit systems, the number of buckets for the SQL Server plan cache is 40,009. Therefore, the maximum number of entries that can fit inside the SQL Server plan cache is 160,036. Enabling trace flag 174 on high performance systems increases the size of the cache and can avoid SOS_CACHESTORE spinlock contention.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information -TF634,TF 634 disables background columnstore compression,Trace Flag 634 disables the background columnstore compression task. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'ColumnStore']","Trace Flag 634 disables the background columnstore compression task. - SQL Server periodically runs the Tuple Mover background task that compresses columnstore index rowgroups with uncompressed data, one such rowgroup at a time. - Columnstore compression improves query performance but also consumes system resources. - You can control the timing of columnstore compression manually, by disabling the background compression task with trace flag 634, and then explicitly invoking ALTER INDEX...REORGANIZE or ALTER INDEX...REBUILD at the time of your choice.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information -TF652,TF 652 disables page pre-fetching scans,Trace Flag 652 disables Page Pre-fetching Scans. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'Pages']","Trace Flag 652 disables page pre-fetching for scans. - The read-ahead process reads the full extent of a referenced database page into the buffer pool, before those contiguous database pages are consumed by scans. - Enabling the trace flag can lead to performance issues on queries that leverage pre-fetching.",http://support.microsoft.com/kb/920093,Server,Windows,OnPremises,Information -TF661,TF 661 disables Ghost Cleanup Task,Trace flag 661 disables the background ghost cleanup task. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 661 disables the ghost record removal process. A ghost record is the result of a delete operation. - When you delete a record, the deleted record is kept as a ghost record. Later, the deleted record is purged by the ghost record removal process. When you disable this process, the deleted record is not purged. - Therefore, the space that the deleted record consumes is not freed. This behavior affects space consumption and the performance of scan operations. - If you turn off this trace Flag, the ghost record removal process works correctly.",https://support.microsoft.com/help/920093,Server,Windows,OnPremises,Information -TF834,TF 834 enables large-page allocations,Enable trace flag 834 to use large-page allocations to improve analytical and data warehousing workloads.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'ColumnStore']","Trace Flag 834 causes the server to use large-page memory (LPM) model for the buffer pool allocations. Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload. Trace flag 834 is NOT recommended on SQL Server instances that use columnstore indexes.",https://support.microsoft.com/help/4465518,Server,/^(Windows|Linux)$/,OnPremises,Information -TF834,,Consider enabling trace flag 834 to use large-page allocations to improve analytical and data warehousing workloads.,override,,"Trace Flag 834 causes the server to use large-page memory (LPM) model for the buffer pool allocations. Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload.",https://support.microsoft.com/help/2964518,,,,Warning -TF845,TF 845 is not needed in SQL Server 2012 and higher versions,Disable trace flag 845 in SQL Server 2012 and higher versions.,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']","Trace Flag 845 supports locking pages in memory in SQL Server Standard edition, which is needed together with trace flag 834 to use the large-page memory (LPM) model for the buffer pool allocations. - Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload. - Starting with SQL Server 2012 this behavior is enabled by default for Standard edition, and trace flag 845 must not be used.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,Windows,OnPremises,Warning -TF902,TF 902: Database Upgrade Bypass should be disabled,Disable trace flag 902 which bypasses database upgrade.,definition,"['DefaultRuleset', 'TraceFlag', 'UpdateIssues']","Trace Flag 902 bypasses execution of database upgrade script when installing a Cumulative Update or Service Pack. - This trace flag is not supported to run it continuously in a production environment. - If you encounter an error during script upgrade mode, it is recommended to contact Microsoft SQL Customer Service and Support (CSS) for further guidance.",https://support.microsoft.com/help/2163980,Server,Windows,OnPremises,Warning -TF1117,TF 1117 Enables Filegroup-level Autogrow,Consider enabling trace flag 1117 to enable filegroup autogrow.,definition,"['DefaultRuleset', 'TraceFlag', 'DBFileConfiguration', 'Performance']","Trace Flag 1117 initiates the growth of every file in the filegroup, when a file in the filegroup meets the autogrow threshold, and together with trace flag 1118, can help reduce allocation contention in the SQL Server TempDB database. - This trace flag affects all databases and is recommended only if every database is safe to be grow all files in a filegroup by the same amount.",https://support.microsoft.com/help/2154845,Server,Windows,OnPremises,Information -TF1117,TF 1117 has no effect in SQL Server 2016 and higher versions,Disable trace flag 1117 in SQL Server 2016 and higher versions.,override,,"Trace Flag 1117 initiates the growth of every file in the filegroup, when a file in the filegroup meets the autogrow threshold, and together with trace flag 1118, can help reduce allocation contention in the SQL Server TempDB database. - Starting with SQL Server 2016, this behavior is controlled by the AUTOGROW_SINGLE_FILE and AUTOGROW_ALL_FILES options of ALTER DATABASE syntax.",https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup-options,,,,Warning -TF1118,TF 1118 Disables Single Page Allocations,Consider enabling trace flag 1118 to force page allocations on uniform extents.,definition,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'Pages']","Trace Flag 1118 forces page allocations on uniform extents instead of mixed extents, and together with trace flag 1117, can help reduce allocation contention in the SQL Server TempDB database. - When a new object is created, by default, the first eight pages are allocated from different extents (mixed extents). - Afterwards, when more pages are needed, those are allocated from that same extent (uniform extent). - The SGAM page is used to track these mixed extents, so can quickly become a bottleneck when numerous mixed page allocations are occurring. - This trace flag allocates all eight pages from the same extent when creating new objects, minimizing the need to scan the SGAM page and forces uniform extent allocations instead of mixed page allocations.",https://support.microsoft.com/help/328551,Server,Windows,OnPremises,Information -TF1118,TF 1118 has no effect in SQL Server 2016 and higher versions,Disable trace flag 1118 in SQL Server 2016 and higher versions.,override,,"Trace Flag 1118 forces page allocations on uniform extents instead of mixed extents, and together with trace flag 1117, can help reduce allocation contention in the SQL Server TempDB database. - When a new object is created, by default, the first eight pages are allocated from different extents (mixed extents). - Afterwards, when more pages are needed, those are allocated from that same extent (uniform extent). - The SGAM page is used to track these mixed extents, so can quickly become a bottleneck when numerous mixed page allocations are occurring. - This trace flag allocates all eight pages from the same extent when creating new objects, minimizing the need to scan the SGAM page and forces uniform extent allocations instead of mixed page allocations. - Starting with SQL Server 2016, this behavior is controlled by the SET MIXED_PAGE_ALLOCATION option of ALTER DATABASE syntax.",https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup-options,,,,Warning -TF1204,TF 1204 returns deadlock information,Trace Flag 1204 returns deadlock information.,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1204 returns the resources and types of locks that are participating in a deadlock, including the affected command. - The resulting information is recorded in the SQL Server Errorlog.",https://support.microsoft.com/help/832524,Server,/^(Windows|Linux)$/,OnPremises,Information -TF1211,TF 1211: Lock Escalation should be enabled,Disable trace flag 1211 to allow lock escalation.,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1211 disables lock escalation based on memory pressure, or based on number of locks. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks. If the lock memory grows large enough, attempts to allocate additional locks for any query may fail and cause performance issues. - This trace flag should not be used in order to avoid inability to allocate lock resources because of insufficient memory. If lock escalation needs to be disabled, use trace flag 1224 instead.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF1222,TF 1222 returns deadlock information,Trace Flag 1222 returns deadlock information.,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1222 returns the resources and types of locks that are participating in a deadlock, including the affected command. - The resulting information is recorded in the SQL Server Errorlog, in XML format that does not comply with any XSD schema.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information -TF1224,TF 1224 should be disabled,Disable trace flag 1224 to allow lock escalation.,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1224 disables lock escalation based on the number of locks, unless SQL Server is under memory pressure. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF1229,TF 1229: Lock Partitioning should be enabled,Disable trace flag 1229 to allow lock partitioning.,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance', 'CPU']","Trace Flag 1229 disables lock partitioning regardless of the number of CPUs. By default, SQL Server enables lock partitioning when a server has 16 or more CPUs, to improve the scalability characteristics of larger systems. - Disabling lock partitioning may cause can cause spinlock contention and poor performance, or unexpected behaviors when switching partitions.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF1236,TF 1236: Database Lock Partitioning should be enabled,Enable trace Flag 1236 to allow database lock partitioning.,definition,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1236 enables database-level lock partitioning. - Lock Partitioning is utilized to improve the scalability characteristics on larger systems.",https://support.microsoft.com/help/2926217,Server,Windows,OnPremises,Warning -TF1236,"TF 1236 is not needed in SQL Server 2012 SP3, SQL Server 2014 SP1 and higher versions.","Disable trace flag 1236 in SQL Server 2012 SP3, SQL Server 2014 SP1 and higher versions.",override,,"Trace Flag 1236 enables database-level lock partitioning. - Starting with SQL Server 2012 SP3 and SQL Server 2014 SP1, this behavior is controlled by the engine and trace flag 1236 has no effect.",,,,,Warning -TF1462,TF 1462 should be disabled to allow Log Stream Compression,Disable trace flag 1462 to allow log stream compression.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'AvailabilityGroups']","Trace Flag 1462 disables log stream compression for asynchronous availability groups. - This feature is enabled by default on asynchronous replicas to optimize network bandwidth.",https://docs.microsoft.com/sql/database-engine/availability-groups/windows/tune-compression-for-availability-group,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF2312,TF 2312 sets the default Cardinality Estimation model,Trace Flag 2312 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 2312 sets the Query Optimizer cardinality estimation model to the default version of the database compability level of SQL Server 2014 and higher versions. If the database compatibility level is lower than 120, enabling trace flag 2312 uses the cardinality estimation model of SQL Server 2014 (120).",https://support.microsoft.com/help/2801413,Server,Windows,OnPremises,Warning -TF2312,,,override,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",,,,,,Information -TF2312,,"TF2312 enables New CE model to SQL Server 2014 or above versions, dependent of the compatibility level of the database",override,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']",,,,,,Information -TF2330,TF 2330 disables recording of index usage stats,Trace Flag 2330 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Indexes']","Trace Flag 2330 disables recording of index usage stats, which could lead to a non-yielding condition in SQL 2005.",,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF2340,TF 2340 disables Batch Sorts for optimized nested loops joins,Trace Flag 2340 disables Batch Sorts for optimized nested loops joins.,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 2340 causes SQL Server not to use a sort operation (batch sort) for optimized nested loops joins when generating a plan. - Verify need to set a non-default trace flag with the current system build and configuration.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information -TF2371,TF 2371 enables a linear recompilation threshold for statistics,Enable trace Flag 2371 to allow a linear recompilation threshold for statistics.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Statistics']","Trace Flag 2371 causes SQL Server to change the fixed update statistics threshold to a linear update statistics threshold. - This is especially useful to keep statistics updated on large tables.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,Windows,OnPremises,Information -TF2371,TF 2371 has no effect in SQL Server 2016 and higher versions,Disable trace flag 2371 in SQL Server 2016 and higher versions when all databases are at compatibility level 130 and above.,override,,"Trace Flag 2371 causes SQL Server to change the fixed update statistics threshold to a linear update statistics threshold. - This is especially useful to keep statistics updated on large tables. Starting with SQL Server 2016, for databases using compatibility level 130 and above, this behavior is controlled by the engine and trace flag 2371 has no effect.",,,,,Warning -TF2389,TF 2389 enables automatic statistics for Ascending Keys,Trace Flag 2389 enables automatic statistics for ascending keys. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance']","Trace Flag 2389 enables automatically generated quick statistics for ascending keys (histogram amendment). - This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time. - Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2801413,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information -TF2390,TF 2390 enables automatic statistics for Ascending or Unknown Keys,Trace Flag 2390 enables automatic statistics for ascending or unknown keys. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance', 'Indexes']","Trace Flag 2390 enables automatically generated quick statistics for ascending or unknown keys (histogram amendment). - This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time. - Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2801413,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information -TF2528,TF 2528 disables parallel operations for integrity checking,Trace Flag 2528 disables parallel operations for integrity checking.,definition,"['DefaultRuleset', 'TraceFlag', 'DataIntegrity', 'DBCC']","Trace Flag 2528 disables parallel checking of objects by DBCC CHECKDB, DBCC CHECKFILEGROUP, and DBCC CHECKTABLE. - By default, the degree of parallelism is automatically determined by the query processor. The maximum degree of parallelism is configured just like that of parallel queries. - When parallel checks are disabled, the DBCC commands will take longer to complete. - Starting with SQL Server 2014 SP2, a MAXDOP option is available to override the max degree of parallelism configuration option of sp_configure for the DBCC statements.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF2549,TF 2549 optimizes PHYSICAL_ONLY option of DBCC CHECKDB,Trace Flag 2549 forces DBCC CHECKDB to treat different physical files as one logical file.,definition,"['DefaultRuleset', 'TraceFlag', 'DBCC']","Trace Flag 2549 forces the DBCC CHECKDB command to assume each database file is on a unique disk drive but treating different physical files as one logical file. - This trace flag can improve the performance when using the PHYSICAL_ONLY option, but it's not recommended unless it is known that each file is based on a unique physical disk.",https://support.microsoft.com/help/2634571,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF2562,TF 2562 forces the DBCC CHECKDB command to execute in a single batch,Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch.,definition,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'TempDB']","Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch regardless of the number of indexes in the database. - This trace flag can improve the performance when using the PHYSICAL_ONLY option, but space requirements for TempDB may increase.",https://support.microsoft.com/help/2634571,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF2566,TF 2566 disables default data purity check,Trace Flag 2566 disables default data purity check.,definition,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'DataIntegrity']","Trace Flag 2566 forces the DBCC CHECKDB command to execute without data purity check unless the DATA_PURITY option is specified. - For databases upgraded from earlier versions of SQL Server, it is recommended to run the DBCC CHECKDB WITH DATA_PURITY command at least once, to enable column-value integrity checks to happen by default.",https://support.microsoft.com/help/945770,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF3023,TF 3023 enables Backup Checksum option by default,Trace Flag 3023 enables CHECKSUM option as default for BACKUP command.,definition,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3023 enables the CHECKSUM option of the BACKUP command by default. - This trace flag forces the CHECKSUM option for BACKUP command even when not explicitely set. - Starting with SQL Server 2014, this behavior is controlled by setting the Backup Checksum Default configuration option.",https://support.microsoft.com/help/2656988,Server,Windows,OnPremises,Information -TF3042,TF 3042 bypasses the default backup compression pre-allocation algorithm,Trace Flag 3042 enables the bypass of the default backup compression.,definition,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3042 bypasses the default backup compression pre-allocation algorithm to allow the backup file to grow only as needed to reach its final size. - This trace flag can achieve space savings by allocating only the actual size required for the compressed backup, but might increase the overall backup operation time.",https://docs.microsoft.com/sql/relational-databases/backup-restore/backup-compression-sql-server,Server,/^(Windows|Linux)$/,OnPremises,Information -TF3226,TF 3226 disables ErrorLog entries for every successful backup operation,Trace Flag 3226 disables ErrorLog entries for every successful backup operation.,definition,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3226 prevents SQL Server from recording an entry to the Errorlog on every successful backup operation. - Backup operations are registered in the Errorlog by default. Frequent backup operations can contribute to massive Errorlog files that become unwieldy.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Information -TF4136,,Trace Flag 4136 disables parameter sniffing. Verify need to set a non-default trace flag with the current system build and configuration.,override,,"Trace Flag 4136 disables parameter sniffing unless OPTION(RECOMPILE), WITH RECOMPILE or OPTIMIZE FOR value is used. Starting with SQL Server 2016, to accomplish this at the database level use the PARAMETER_SNIFFING option in ALTER DATABASE SCOPED CONFIGURATION. Verify need to set a non-default trace flag with the current system build and configuration.",,,,,Information -TF4136,TF 4136 disables Parameter Sniffing,Trace Flag 4136 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag']","Trace Flag 4136 disables parameter sniffing unless OPTION(RECOMPILE), WITH RECOMPILE or OPTIMIZE FOR value is used, but does not apply to this SQL Server version. Starting with SQL Server 2016, to accomplish this at the database level use the PARAMETER_SNIFFING option in ALTER DATABASE SCOPED CONFIGURATION. Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/980653,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF4137,,Trace Flag 4137 causes SQL Server to generate a plan using partial correlation of filters. Verify need to set a non-default trace flag with the current system build and configuration.,override,,"Trace Flag 4137 causes SQL Server to generate a plan using minimum selectivity when estimating AND predicates for filters to account for partial correlation instead of independence, under the query optimizer cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). - Does not apply to CE version 120 or above. Use trace flag 9471 instead. - Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'ASSUME_MIN_SELECTIVITY_FOR_FILTER_ESTIMATES' query hint. - Verify need to set a non-default trace flag with the current system build and configuration.",,,,,Information -TF4137,TF 4137 causes plans to use partial correlation for filters,Trace flag 4137 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 4137 causes SQL Server to generate a plan using minimum selectivity when estimating AND predicates for filters to account for partial correlation instead of independence, under the query optimizer cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). However it does not apply to this SQL Server version. - Does not apply to CE version 120 or above. Use trace flag 9471 instead. - Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'ASSUME_MIN_SELECTIVITY_FOR_FILTER_ESTIMATES' query hint. - Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2658214,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF4138,,Trace Flag 4138 enables plan that without row goal adjustments. Verify need to set a non-default trace flag with the current system build and configuration.,override,,"Trace Flag 4138 causes SQL Server to generate a plan that does not use row goal adjustments with queries that contain TOP, OPTION (FAST N), IN, or EXISTS keywords. - Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'DISABLE_OPTIMIZER_ROWGOAL' query hint. - Verify need to set a Non-default trace flag with current system build and configuration.",,,,,Information -TF4138,TF 4138 causes plans to not use Row Goal adjustments,Trace flag 4138 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 4138 causes SQL Server to generate a plan that does not use row goal adjustments with queries that contain TOP, OPTION (FAST N), IN, or EXISTS keywords. - Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'DISABLE_OPTIMIZER_ROWGOAL' query hint. However it does not apply to this SQL Server version. - Verify need to set a Non-default trace flag with current system build and configuration.",https://support.microsoft.com/help/2667211,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF4139,,Trace Flag 4139 enables automatic statistics for any key ordering. Verify need to set a non-default trace flag with the current system build and configuration.,override,,"Trace Flag 4139 enables automatically generated quick statistics (histogram amendment) regardless of key column status. - This trace flag is recommended to be set in cases where queries access newly inserted key values that may change plan shape, but the new values are not yet updated in the statistics histogram for the affected columns. In this case, regardless of the leading statistics column status (ascending, descending, or stationary), the histogram used to estimate cardinality will be adjusted at query compile time. - This trace flag does not apply to the cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). - Verify need to set a non-default trace flag with the current system build and configuration.",,,,,Information -TF4139,TF 4139 enables automatic statistics for any key ordering,Trace flag 4139 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Statistics']","Trace Flag 4139 enables automatically generated quick statistics (histogram amendment) regardless of key column status. - However, this trace flag does not apply to this SQL Server version. - Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2952101,Server,/^(Windows|Linux)$/,OnPremises,Warning -TF4199,TF 4199 enables Query Optimizer fixes,Trace Flag 4199 enables Query Optimizer fixes. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer']",Trace Flag 4199 enables Query Optimizer fixes released in SQL Server Cumulative Updates and Service Packs.,http://support.microsoft.com/help/974006,Server,/^(Windows|Linux)$/,OnPremises,Information -TF6498,,Trace Flag 6498 enables concurrent large queries.,override,,,,,,,Information -TF6498,,"Disable trace flag 6498 in SQL Server 2014 SP2, SQL Server 2016 and higher versions.",override,,"Trace Flag 6498 enables more than one large query compilation to gain access to the big gateway when there is sufficient memory available. - This trace flag can be used to keep memory usage for the compilation of incoming queries under control, avoiding compilation waits for concurrent large queries. - Starting with SQL Server 2014 SP2 and SQL Server 2016, this behavior is controlled by the engine and trace flag 1236 has no effect.",,,,,Warning -TF6498,TF 6498 enables additional concurrent large queries,Trace Flag 6498 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory']","Trace Flag 6498 enables more than one large query compilation to gain access to the big gateway when there is sufficient memory available. - However, this trace flag does not apply to this SQL Server version. - This trace flag can be used to keep memory usage for the compilation of incoming queries under control, avoiding compilation waits for concurrent large queries. - Starting with SQL Server 2014 SP2 and SQL Server 2016, this behavior is controlled by the engine and trace flag 1236 has no effect.",https://support.microsoft.com/help/3024815,Server,Windows,OnPremises,Warning -TF6532,TF 6532 enables performance improvements for Spatial data,Enable trace flag 6532 to enable performance improvements for Spatial data.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 6532 enables performance improvements of query operations with spatial data types. - The performance gain will vary, depending on the configuration, the types of queries, and the objects.",https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,Information -TF6532.6533,,Enable trace flag 6532 and trace flag 6533 to enable performance improvements for Spatial data.,override,,"Trace Flag 6532 and trace flag 6533 enable performance improvements of query operations with spatial data types. - The performance gain will vary, depending on the configuration, the types of queries, and the objects.",,,,,Information -TF6532.6533,,Disable trace flag 6532 in SQL Server 2016 and higher versions.,override,,,,,,,Warning -TF6532.6533,TF 6532 and TF 6533 enable performance improvements for Spatial data,Trace flags 6532 and 6533 do not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace flags 6532 and 6533 enable performance improvements of query operations with spatial data types. - However, this trace flag does not apply to this SQL Server version. - Starting with SQL Server 2016, this behavior is controlled by the engine and trace flags 6532 and 6533 have no effect.",https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,Warning -TF6534,,Enable trace flag 6534 to enable performance improvement of query operations with spatial data types.,override,,"Trace Flag 6534 enables performance improvements of query operations with spatial data types. - The performance gain will vary, depending on the configuration, the types of queries, and the objects.",,,,,Information -TF6534,TF 6534 enables performance improvements for Spatial data,Trace flag 6534 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 6534 enables performance improvement of query operations with spatial data types. - However, this trace flag does not apply to this SQL Server version. - Verify need to set a Non-default trace flag with current system build and configuration.",https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,Warning -TF7412,TF 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting,Enable trace flag 7412 to enables the lightweight profiling infrastructure for live query performance troubleshooting.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace Flag 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting. Consider enabling TF 7412 to have the ability to access runtime information on query execution plans for any session.,https://docs.microsoft.com/sql/relational-databases/performance/query-profiling-infrastructure,Server,/^(Windows|Linux)$/,OnPremises,Information -TF9024,TF 9024 converts a global log pool memory object into NUMA node partitioned memory object.,Verify need to set a Non-default TF with current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'Memory', 'CPU']",TF9024 converts a global log pool memory object into NUMA node partitioned memory object.,https://support.microsoft.com/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,Server,Windows,OnPremises,Warning -TF9024,,Consider enabling TF9024 to convert global log pool memory objects into NUMA node partitioned memory objects.,override,,,,,,,Information -TF9024,,"TF9024 is not needed in SQL Server 2012 SP3, SQL Server 2014 SP1 and above.",override,,,,,,,Warning -TF8048,TF 8048 converts NUMA partitioned memory objects into CPU partitioned,Verify need to set a Non-default TF with current system build and configuration.,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'CPU', 'Memory']",TF 8048 converts NUMA partitioned memory objects into CPU partitioned.,https://support.microsoft.com/en-us/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,Server,Windows,OnPremises,Warning -TF8048,,"TF8048 is not needed in SQL Server 2014 SP2, SQL Server 2016 and above.",override,,,,,,,Warning -TF8048,,Consider enabling TF 8048 to convert NUMA partitioned memory objects into CPU partitioned.,override,,,,,,,Information -DeprecatedFeatures,Deprecated or discontinued features should not be used,Detected deprecated or discontinued feature uses: @{DeprecatedFeature}. We recommend to replace them with features actual for SQL Server version @{ProductVersion}.,definition,"['DefaultRuleset', 'Deprecated', 'Security', 'UpdateIssues', 'Performance']",This check detects deprecated or discontinued features used on target SQL Server instance. Deprecated features may be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -SystemHealthSession,system_health XEvent session is not active,Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,definition,"['DefaultRuleset', 'XEvent', 'SystemHealth']","This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. - We recommend that you do not stop, alter, or delete the system health session.",https://docs.microsoft.com/sql/relational-databases/extended-events/use-the-system-health-session,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -SPServerDiagnosticsSession,sp_server_diagnostics xEvent session is not active,Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,definition,"['DefaultRuleset', 'XEvent', 'SystemHealth']","This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. - We recommend that you do not stop, alter, or delete the system health session.",https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-server-diagnostics-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning -BlackboxTrace,Blackbox trace is configured and running,Make sure you still need the blackbox trace and stop it otherwise.,definition,"['DefaultRuleset', 'Traces']","This trace is designed to behave similarly to an airplane black box, to help you diagnose intermittent server crashes. It consumes more resources than the default trace and should not be running for extended periods of time.",https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-trace-create-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,Warning -DefaultTrace,No default trace was found or is not active,Make sure that there is enough space for SQL Server to write the default trace file. Then have the default trace run by disabling and re-enabling it.,definition,"['DefaultRuleset', 'Traces']",Default trace provides troubleshooting assistance to database administrators by ensuring that they have the log data necessary to diagnose problems the first time they occur.,https://docs.microsoft.com/sql/relational-databases/policy-based-management/default-trace-log-files-disabled,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -HintsStatistics,Hints are being used,"We recommend that , , and be used only as a last resort by experienced developers and database administrators, because the SQL Server Query Optimizer typically selects the best execution plan for a query.",definition,"['DefaultRuleset', 'QueryOptimizer', 'Performance', 'Statistics']","Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the Query Optimizer might select for a query. Because the SQL Server Query Optimizer typically selects the best execution plan for a query, we recommend that , , and be used only as a last resort by experienced developers and database administrators.",https://docs.microsoft.com/sql/t-sql/queries/hints-transact-sql,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information -HintsUsageInModules,Hints usage in modules,@{Hint} was used in @{type_desc} @{Schema_Name}.@{Object_Name}.,definition,"['DefaultRuleset', 'QueryOptimizer', 'Performance', 'Statistics']","Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the Query Optimizer might select for a query. Because the SQL Server Query Optimizer typically selects the best execution plan for a query, we recommend that , , and be used only as a last resort by experienced developers and database administrators.",https://docs.microsoft.com/sql/t-sql/queries/hints-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information -PlansUseRatio,Amount of single use plans in cache is high,Amount of single use plans in cache is high (@{SingleUsePlansUseRatio:P0}). Consider enabling the Optimize for ad hoc workloads setting on heavy OLTP ad-hoc workloads to conserve resources.,definition,"['DefaultRuleset', 'Performance', 'QueryOptimizer']",Single use plans waste system resources.,https://docs.microsoft.com/sql/database-engine/configure-windows/optimize-for-ad-hoc-workloads-server-configuration-option,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -HypotheticalIndexes,Hypothetical indexes found,Index @{IndexName} for @{Schema}.@{Object} is marked as hypothetical. It is recommended to drop hypothetical index @{IndexName} as soon as possible.,definition,"['DefaultRuleset', 'Indexes', 'Performance']","Database has indexes that are marked as hypothetical. Hypothetical indexes are created by the Database Tuning Assistant (DTA) during its tests. If a DTA session was interrupted, these indexes may not be deleted. It is recommended to drop these objects as soon as possible.",,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -HypotheticalStatistics,Hypothetical statistics found,Statistics @{StatName} for @{Schema}.@{Object} is hypothetical. It is recommended to drop hypothetical statistics @{StatName} as soon as possible.,definition,"['DefaultRuleset', 'Statistics']","Database has statistics that are marked as hypothetical. Hypothetical statistics are created by the Database Tuning Assistant (DTA) during its tests. If a DTA session was interrupted, these statistics may not be deleted. It is recommended to drop these objects as soon as possible.",,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -LatestCU,SQL Server instance is not up to date,Product version @{ProductVersion} is not the latest available. We recommend keeping your SQL Server up to date and install Service Packs and Cumulative Updates as they are released.,definition,"['DefaultRuleset', 'Security', 'UpdateIssues']","On an installed instance of SQL Server, we recommend that you apply the latest security updates and critical updates including general distribution releases (GDRs), service packs (SPs), and cumulative updates (CUs).",https://support.microsoft.com/help/321185/how-to-determine-the-version-edition-and-update-level-of-sql-server-an https://docs.microsoft.com/sql/database-engine/install-windows/install-sql-server-servicing-updates,Server,/^(Windows|Linux)$/,OnPremises,Warning -LatestCU,SQL Server instance is up to date,Product version @{ProductVersion} is the latest available.,override,,,https://support.microsoft.com/help/321185/how-to-determine-the-version-edition-and-update-level-of-sql-server-an https://docs.microsoft.com/sql/database-engine/install-windows/install-sql-server-servicing-updates,,,,Warning -FKNoIndexes,Foreign key constraints should have corresponding indexes,Create a corresponding index for each foreign key. There is no index on the following foreign keys: @{ConstraintName}.,definition,"['DefaultRuleset', 'Performance', 'Indexes']","Unlike primary key constraints, creating a foreign key constraint does not automatically create a corresponding index. However, manually creating an index on a foreign key is often useful.",https://docs.microsoft.com/sql/relational-databases/tables/primary-and-foreign-key-constraints,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -MissedIndexes,Potentially missing indexes,Create an index on @{Table} with key columns @{KeyCols}@{IncludedCols: and included columns: #},definition,"['DefaultRuleset', 'Performance', 'Indexes']",Potentially missing indexes were found based on query history. It may be important to revise them. Please note that this check based on a scoring method and the results may be approximate - for information purposes only.,https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Information -FullBackup,Full backup is missed or outdated,Create a new full backup of the database,definition,"['DefaultRuleset', 'Backup']",Database doesn't have any full backup or the latest full backup is over 7 days.,https://docs.microsoft.com/sql/relational-databases/backup-restore/create-a-full-database-backup-sql-server,Database,/^(Windows|Linux)$/,OnPremises,Warning -OutdatedTranLogBackup,Transaction Log backup is missed or outdated,Create a backup of Transaction Log. Database recovery model: @{recovery_model_desc},definition,"['DefaultRuleset', 'Backup']","Database does not have any transaction Log backup since the latest full or differential backup, or it's older than 24H.",https://docs.microsoft.com/sql/relational-databases/backup-restore/back-up-a-transaction-log-sql-server,Database,/^(Windows|Linux)$/,OnPremises,Warning -DbDiffCollation,Database collation doesn't match the collation of master,Keep database collation the same as the collation for master or model,definition,"['DefaultRuleset', 'DBConfiguration', 'Collation']","We recommend that the collations of user-defined databases match the collation of master or model. Otherwise, collation conflicts can occur that might prevent code from executing. For example, when a stored procedure joins one table to a temporary table, SQL Server might end the batch and return a collation conflict error if the collations of the user-defined database and the model database are different. This occurs because temporary tables are created in tempdb, which bases its collation on that of model.",https://docs.microsoft.com/sql/database-engine/set-collation-user-defined-databases-match-master-model-databases,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -AutoClose,Auto Close Option should be OFF,Set AUTO_CLOSE option to OFF,definition,"['DefaultRuleset', 'Performance', 'DBConfiguration']","When AUTO_CLOSE is set ON, this can cause performance degradation on frequently accessed databases because of the increased overhead of opening and closing the database after each connection. AUTO_CLOSE also flushes the procedure cache after each connection.",https://docs.microsoft.com/sql/relational-databases/policy-based-management/set-the-auto-close-database-option-to-off,Database,/^(Windows|Linux)$/,OnPremises,Warning -AutoShrink,Auto Shrink Option should be OFF,Set AUTO_SHRINK option to OFF.,definition,"['DefaultRuleset', 'DBConfiguration', 'Performance']","Shrinking databases is the fastest way to achieve fragmentation. SQL Server goes to the last page in the database, moves it to the first free available space, and then repeats the process again. This shuffles the deck, putting your pages out of order.",https://blogs.msdn.microsoft.com/buckwoody/2009/07/01/sql-server-best-practices-auto-shrink-should-be-off,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -PageVerify,PAGE_VERIFY option should be CHECKSUM,Set PAGE_VERIFY option to CHECKSUM.,definition,"['DefaultRuleset', 'DBConfiguration', 'DataIntegrity']","When CHECKSUM is enabled for the PAGE_VERIFY database option, the SQL Server Database Engine calculates a checksum over the contents of the whole page, and stores the value in the page header when a page is written to disk. When the page is read from disk, the checksum is recomputed and compared to the checksum value that is stored in the page header. This helps provide a high level of data-file integrity.",https://docs.microsoft.com/sql/relational-databases/policy-based-management/set-the-page-verify-database-option-to-checksum,Database,/^(Windows|Linux)$/,OnPremises,Warning -DbChaining,Cross-Database Access should be disabled,Set DB_CHAINING option to OFF.,definition,"['DefaultRuleset', 'DBConfiguration', 'Security']",Ownership chaining across databases is turned off by default. Microsoft recommends that you disable cross-database ownership chaining because it exposes you to the additional security risks.,https://docs.microsoft.com/dotnet/framework/data/adonet/sql/enabling-cross-database-access-in-sql-server,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -AutoCreateStatsIncremental,Incremental option of auto stats should be ON,Set AUTO_CREATE_STATISTICS to ON and set INCREMENTAL to ON,definition,"['DefaultRuleset', 'DBConfiguration', 'Statistics', 'Performance']","Incremental statistics update at partition level is a feature introduced in SQL Server 2014. When the option INCREMENTAL is turn on at the database level, newly auto created column statistics will use incremental statistics on partitioned tables by default.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -TrustWorthy,TRUSTWORTHY should be OFF,Set TRUSTWORTHY option to OFF,definition,"['DefaultRuleset', 'DBConfiguration', 'Security']","You can use the TRUSTWORTHY database setting to indicate whether the instance of Microsoft SQL Server trusts the database and the contents within the database. By default, this setting is set to OFF to mitigate certain threats that may be present when a database is attached to the server.",https://support.microsoft.com/help/2183687/guidelines-for-using-the-trustworthy-database-setting-in-sql-server,Database,/^(Windows|Linux)$/,OnPremises,Warning -ParameterizationNotSimple,PARAMETERIZATION should be SIMPLE,"Set PARAMETERIZATION = SIMPLE and use forced parameterization only on a certain class of queries, instead of all queries",definition,"['DefaultRuleset', 'DBConfiguration', 'Performance', 'QueryOptimizer']","When the PARAMETERIZATION database option is set to SIMPLE, the SQL Server query optimizer may choose to parameterize the queries. This means that any literal values that are contained in a query are substituted with parameters. This process is referred to as simple parameterization. When SIMPLE parameterization is in effect, you cannot control which queries are parameterized and which queries are not. However, you can specify that all queries in a database be parameterized by setting the PARAMETERIZATION database option to FORCED. - - Regardless of whether you have a Plan-Stability or not, SQL Server will always auto parameterize your SQL Statements, and reuse the cached execution plan over and over again. It doesn't matter how terrible the execution plan is. Therefore you have to know in exact detail the shape of your execution plans, and whether they can lead to some performance related problems.",https://docs.microsoft.com/sql/relational-databases/performance/specify-query-parameterization-behavior-by-using-plan-guides,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -TempDBFilesNotSameSize,TempDB data files are not the same size,Make all TempDB data files the same size,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",We recommend that you create all TempDB data files at the same size.,https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning -TempDBFilesMultiple4,Number of TempDB data files should be in multiples of 4,Make sure number of TempDB data files is in multiples of 4,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']","Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning -TempDBFiles1PerCPU,Number of TempDB data files should depend on CPU count,Make sure to have 1 data file per logical processor (processors count: @{online_logical_processors}),definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']","Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning -TempDBFilesNotLess8,Number of TempDB data files should be at least 8,"Add extra data files to TempDB. There are @{physical_name} data files, should be at least 8",definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']","Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,Warning -TempDBFilesAutoGrowth,TempDB data files have different auto growth settings,Make Autogrowth settings the same for each TempDB data file,definition,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']","TempDB data files should be of equal size within each filegroup, as SQL Server uses a proportional-fill algorithm that favors allocations in files with more free space.",https://docs.microsoft.com/sql/relational-databases/databases/tempdb-database,Server,/^(Windows|Linux)$/,OnPremises,Warning -FilesAutogrowth,Database files have Autogrowth setting over 1GB,Set File Growth to less than 1GB for files: @{FileName},definition,"['DefaultRuleset', 'Performance', 'DBFileConfiguration']","A data or log file will be extended with auto-growth value to prevent the lack of free space in files. This process can perform significant impact on SQL Server performance if auto-growth value gets over 1 GB. By default, SQL Server will put zeros to a newly allocated space. And the more space it takes, the more time it takes to initialize it.",https://support.microsoft.com/help/315512/considerations-for-the-autogrow-and-autoshrink-settings-in-sql-server,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -DuplicateIndexes,There are tables with duplicate indexes,Consider removing duplicate indexes in table @{Table}: @{ToDelete},definition,"['DefaultRuleset', 'Performance', 'Indexes']",There are tables with duplicate indexes according to their definitions. We recommended to revise all these objects as soon as possible.,https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -RedundantIndexes,There are tables with possibly redundant indexes,Consider removing redundant indexes in table @{Table}: @{Indexes},definition,"['DefaultRuleset', 'Performance', 'Indexes']",There are tables with possibly redundant indexes according to the set of key and included columns. We recommended to revise all these objects as soon as possible.,https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -UserObjectsInMaster,User objects in database master,Remove user objects from database master: @{Object_Name},definition,"['DefaultRuleset', 'masterDB', 'Backup']","We highly recommend you not create user objects in the master database. If it's unavoidable for some reason, make sure to back up the database more frequently.",https://docs.microsoft.com/sql/relational-databases/databases/master-database,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -CpuUtilOver70,CPU usage over 70%,Investigate high CPU utilization by SQL Server: over 70% in the last 2 hours,definition,"['DefaultRuleset', 'Performance', 'CPU']","CPU utilization rate in the last 2 hours is over 70% - consider review queries with high CPU usage or add additional hardware resources. Also, potential causes include memory pressure, low query plan reuse, non-optimized queries.",https://docs.microsoft.com/previous-versions/technet-magazine/cc137784(v=msdn.10),Server,Windows,"OnPremises, ManagedInstance",Warning -CpuUtilOver90,CPU usage over 90%,Investigate high CPU utilization by SQL Server: over 90% in the last 2 hours,definition,"['DefaultRuleset', 'Performance', 'CPU']","CPU utilization rate in the last 2 hours is over 90% - consider review queries with high CPU usage or add additional hardware resources. Also, potential causes include memory pressure, low query plan reuse, non-optimized queries.",https://docs.microsoft.com/previous-versions/technet-magazine/cc137784(v=msdn.10),Server,Windows,"OnPremises, ManagedInstance",Warning -ReplErrors24H,Replication errors in the last 24 hours,Review replication errors for the following publications: @{publication},definition,"['DefaultRuleset', 'Replication']",This check searches for errors in distribution database agent's history table for the last 24 hours.,https://docs.microsoft.com/sql/relational-databases/replication/sql-server-replication,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity10,Agent doesn't rise alerts for errors with severity 10,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity16,Agent doesn't rise alerts for errors with severity 16,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity17,Agent doesn't rise alerts for errors with severity 17,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity19,Agent doesn't rise alerts for errors with severity 19,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity20,Agent doesn't rise alerts for errors with severity 20,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity21,Agent doesn't rise alerts for errors with severity 21,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity22,Agent doesn't rise alerts for errors with severity 22,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity23,Agent doesn't rise alerts for errors with severity 23,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -AgentAlertsSeverity24,Agent doesn't rise alerts for errors with severity 24,Consider creating alerts for the following errors: @{error_ids},definition,"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",Warning -WeakPassword,Weak password,Make sure to set strong passwords on the following logins: @{PasswordData},definition,"['DefaultRuleset', 'Security', 'WeakPassword']",Some user logins have weak passwords.,https://docs.microsoft.com/sql/relational-databases/security/strong-passwords,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -VLFCount,VLF count,Update transaction log settings to reduce the number of VLFs (current number is: @{RecoveryUnitId}),definition,"['DefaultRuleset', 'Backup', 'Performance']","The SQL Server Database Engine divides each physical log file internally into a number of virtual log files (VLFs). Virtual log files have no fixed size, and there is no fixed number of virtual log files for a physical log file. The Database Engine chooses the size of the virtual log files dynamically while it is creating or extending log files. The Database Engine tries to maintain a small number of virtual files. The size of the virtual files after a log file has been extended is the sum of the size of the existing log and the size of the new file increment. The size or number of virtual log files cannot be configured or set by administrators. - - If the log files grow to a large size in many small increments, they will have many virtual log files. This can slow down database startup and also log backup and restore operations. Conversely, if the log files are set to a large size with few or just one increment, they will have few very large virtual log files. - - We recommend that you assign log files a size value close to the final size required, using the required increments to achieve optimal VLF distribution, and also have a relatively large growth_increment value.",https://docs.microsoft.com/sql/relational-databases/sql-server-transaction-log-architecture-and-management-guide,Database,Windows,"OnPremises, ManagedInstance",Warning -TF8015,TF 8015 disables auto-detection and NUMA setup,Disable trace flag 8015 for this SQL Server instance. This TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'CPU', 'NUMA']","SQL Server allows you to group CPUs into nodes referred to as soft-NUMA. You usually configure soft-NUMA when you have many CPUs and do not have hardware NUMA, but you can also use soft-NUMA to subdivide hardware NUMA nodes into smaller groups.",https://techcommunity.microsoft.com/t5/SQL-Server-Support/How-It-Works-Soft-NUMA-I-O-Completion-Thread-Lazy-Writer-Workers/ba-p/316044,Server,Windows,OnPremises,Warning -TF8032,TF 8032 reverts the cache limit parameters to the SQL Server 2005 RTM,The cache limit parameters reverted to the SQL Server 2005 RTM setting but can cause poor performance if large caches make less memory available for other memory consumers like BP,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace Flag 8032 reverts the cache limit parameters to the SQL Server 2005 RTM setting but can cause poor performance if large caches make less memory available for other memory consumers like BP.,,Server,Windows,OnPremises,Warning -TF8744,TF 8744 disables pre-fetching for the Nested Loop operator,Disable trace flag 8744 for this SQL Server instance. This TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace flag 8744 disables pre-fetching for the Nested Loops operator. Incorrect use of this trace flag may cause additional physical reads when SQL Server executes plans that contain the Nested Loops operator.,https://support.microsoft.com/en-us/help/920093/tuning-options-for-sql-server-when-running-in-high-performance-workloa,Server,Windows,OnPremises,Warning -TF9347,TF 9347 disables batch mode for sort operator,Disable trace flag 9347 for this SQL Server instance. This TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace flag 9347 disables batch mode for sort operator. SQL Server 2016 (13.x) introduced a new batch mode sort operator that boosts performance for many analytical queries.,,Server,Windows,OnPremises,Warning -TF9349,TF 9349 disables batch mode for top N sort operator,Disable trace flag 9349 for this SQL Server instance. This TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace flag 9349 disables batch mode for top N sort operator. SQL Server 2016 (13.x) introduced a new batch mode top sort operator that boosts performance for many analytical queries.,,Server,Windows,OnPremises,Warning -TF9389,TF 9389 enables dynamic memory grant for batch mode operators,Disable trace flag 9389 for this SQL Server instance. The TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'TempDB']","Trace flag 9389 enables additional dynamic memory grant for batch mode operators. If a query does not get all the memory it needs, it spills data to TempDB, incurring additional I/O and potentially impacting query performance. If the dynamic memory grant trace flag is enabled, a batch mode operator may ask for additional memory and avoid spilling to TempDB if additional memory is available.",,Server,Windows,"OnPremises, ManagedInstance",Warning -TF9476,TF 9476 causes SQL Server to generate a plan using the Simple Containment instead of the default Base Containment under New CE,Disable trace flag 9476 for this SQL Server instance. The TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'QueryOptimizer']","Trace flag 9476 causes SQL Server to generate a plan using the Simple Containment assumption instead of the default Base Containment assumption, under the query optimizer cardinality estimation model of SQL Server 2014 (12.x) through SQL Server 2017 versions.",,Server,Windows,OnPremises,Warning -TF9481,"TF 9481 enables Legacy CE model, irrespective of the compatibility level of the database",Disable trace flag 9481 for this SQL Server instance. The TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace flag 9481 enables you to set the query optimizer cardinality estimation model to the SQL Server 2012 (11.x) and earlier versions, irrespective of the compatibility level of the database.",,Server,Windows,OnPremises,Warning -TF10204,TF 10204 disables merge/recompress during columnstore index reorganization,Disable trace flag 10204 for this SQL Server instance. The TF does not apply to this SQL Server version,definition,"['DefaultRuleset', 'TraceFlag', 'Performance', 'ColumnStore']","Trace flag 10204 disables merge/recompress during columnstore index reorganization. In SQL Server 2016 (13.x), when a columnstore index is reorganized, there is new functionality to automatically merge any small compressed rowgroups into larger compressed rowgroups, as well as recompressing any rowgroups that have a large number of deleted rows.",,Server,Windows,OnPremises,Warning -SPNaming,Stored Procedure Naming,Rename the following stored procedures to get rid of the sp_ prefix: @{ObjectName},definition,"['DefaultRuleset', 'Naming']","In SQL Server, the sp_ prefix designates system stored procedures. If you use that prefix for your stored procedures, the name of your procedure might conflict with the name of a system stored procedure that will be created in the future. If such a conflict occurs, your application might break if your application refers to the procedure without qualifying the reference by schema. In this situation, the name will bind to the system procedure instead of to your procedure.",https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172115(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",Warning -ObjectNamingSpecialChar,Object Naming,Rename the following objects to get rid of special characters: @{ObjectName},definition,"['DefaultRuleset', 'Naming']","If you name a database object by using any character in the following table, you make it more difficult not only to reference that object but also to read code that contains the name of that object.",https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172134(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",Warning -ColumnNamingSpecialChar,Column Naming,Rename the following columns to get rid of special characters: @{ObjectName},definition,"['DefaultRuleset', 'Naming']","If you name a database object by using any character in the following table, you make it more difficult not only to reference that object but also to read code that contains the name of that object.",https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172134(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",Warning -FnNaming,User Function Naming,Rename the following functions to get rid of the fn_ prefix: @{ObjectName},definition,"['DefaultRuleset', 'Naming']","In SQL Server, the fn_ prefix designates system functions. If you use that prefix for your functions, the name of your function might conflict with the name of a system function that will be created in the future. If such a conflict occurs, your application might break if your application refers to the function without qualifying the reference by schema. In this situation, the name will bind to the system function instead of to your function.",https://docs.microsoft.com/sql/t-sql/statements/create-function-transact-sql,Database,Windows,"OnPremises, ManagedInstance",Warning -ObjectNamingResKeywords,Object names contain reserved keywords,Rename the following objects to get rid of reserved keywords: @{ObjectName},definition,"['DefaultRuleset', 'Naming']","Microsoft SQL Server uses reserved keywords for defining, manipulating, and accessing databases. Reserved keywords are part of the grammar of the Transact-SQL language that is used by SQL Server to parse and understand Transact-SQL statements and batches. Although it is syntactically possible to use SQL Server reserved keywords as identifiers and object names in Transact-SQL scripts, you can do this only by using delimited identifiers.",https://docs.microsoft.com/sql/t-sql/language-elements/reserved-keywords-transact-sql,Database,Windows,"OnPremises, ManagedInstance",Warning -DeprFeaturesInModules,Use of deprecated or discontinued features in modules,Consider getting rid of the following deprecated or discontinued features in @{ObjectName}: @{Keyword},definition,"['DefaultRuleset', 'Security', 'Deprecated', 'LongRunningChecks', 'UpdateIssues']",Deprecated features are scheduled to be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Database,Windows,"OnPremises, ManagedInstance",Warning -DeprFeaturesInJobs,Use of deprecated or discontinued features in modules,Consider getting rid of the following deprecated or discontinued features in job @{ObjectName}: @{Keyword},definition,"['DefaultRuleset', 'Security', 'Deprecated', 'Agent', 'Jobs', 'LongRunningChecks', 'UpdateIssues']",Deprecated features are scheduled to be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Server,Windows,"OnPremises, ManagedInstance",Warning -NUMANodeSingleCPU,Single CPU assigned to NUMA node,Consider assigning additional CPUs to NUMA nodes that have only one assigned CPU,definition,"['DefaultRuleset', 'NUMA', 'CPU', 'Memory', 'Performance']","Microsoft SQL Server is non-uniform memory access (NUMA) aware. NUMA architecture provides a scalable solution to performance problem. Computers with hardware NUMA have more than one system bus, each serving a small set of processors. Each group of processors has its own memory and possibly its own I/O channels, but each CPU can access memory associated with other groups in a coherent way. Each group is called a NUMA node. The number of CPUs within a NUMA node depends on the hardware vendor. Your hardware manufacturer can tell you if your computer supports hardware NUMA.",https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms178144(v=sql.105),Server,Windows,"OnPremises, ManagedInstance",Warning -NUMANodeNoCPU,NUMA nodes without CPUs,Make sure that all NUMA nodes have assigned CPUs,definition,"['DefaultRuleset', 'NUMA', 'Performance', 'CPU', 'Memory']","Microsoft SQL Server is non-uniform memory access (NUMA) aware. NUMA architecture provides a scalable solution to performance problem. Computers with hardware NUMA have more than one system bus, each serving a small set of processors. Each group of processors has its own memory and possibly its own I/O channels, but each CPU can access memory associated with other groups in a coherent way. Each group is called a NUMA node. The number of CPUs within a NUMA node depends on the hardware vendor. Your hardware manufacturer can tell you if your computer supports hardware NUMA.",https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms178144(v=sql.105),Server,Windows,"OnPremises, ManagedInstance",Warning -IndexKeyGuid,Guid in clustered index key column,Get rid of GUIDs in the following clustered indexes' keys: @{IndexName},definition,"['DefaultRuleset', 'Indexes', 'Performance']","A big reason for a clustered index is when you often want to retrieve rows for a range of values for a given column. Because the data is physically arranged in that order, the rows can be extracted very efficiently. Something like a GUID, while excellent for a primary key, could be positively detrimental to performance, as there will be additional cost for inserts and no perceptible benefit on selects.",https://azure.microsoft.com/blog/uniqueidentifier-and-clustered-indexes/,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -IndexesLargeKeys,Indexes keys with more than 900 bytes,Get rid of keys larger than 900 bytes in index @{FullName},definition,"['DefaultRuleset', 'Indexes', 'Performance']","When you design an index that contains many key columns, or large-size columns, calculate the size of the index key to make sure that you do not exceed the maximum index key size. SQL Server retains the 900-byte limit for the maximum total size of all index key columns. This excludes nonkey columns that are included in the definition of nonclustered indexes.",http://msdn.microsoft.com/library/ms191241.aspx,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -DisabledIndexes,Disabled Indexes exist,Remove or enable this disabled index: @{FullName},definition,"['DefaultRuleset', 'Indexes', 'Performance']","If you need to load a lot of data quickly, you can disable nonclustered indexes in order to improve performance. After the data load finishes, enable the nonclustered indexes again by rebuilding them. This technique works best in large data warehouse environments where entire dimension tables might be reloaded from scratch every night. Disabling nonclustered indexes is safer than dropping and recreating them because scripting indexes is hard. Unfortunately, sometimes our load processes crash before enabling the indexes again, or sometimes we manually load data and we forget to rebuild them.",https://docs.microsoft.com/sql/relational-databases/indexes/disable-indexes-and-constraints,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -IndexesFillFactor,Index fill factor lower 80%,Review index @{FullName} as its fill factor @{FillFactor} is lower than 80 percent,definition,"['DefaultRuleset', 'Indexes', 'Performance']","The fill-factor option is provided for fine-tuning index data storage and performance. When an index is created or rebuilt, the fill-factor value determines the percentage of space on each leaf-level page to be filled with data, reserving the remainder on each page as free space for future growth. For example, specifying a fill-factor value of 80 means that 20 percent of each leaf-level page will be left empty, providing space for index expansion as data is added to the underlying table. The empty space is reserved between the index rows rather than at the end of the index.",https://docs.microsoft.com/sql/relational-databases/indexes/specify-fill-factor-for-an-index,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -NonUniqueClusterIndex,Non-unique clustered indexes,Review this clustered index @{FullName} as it is non-unique,definition,"['DefaultRuleset', 'Indexes', 'Performance']","Index uniqueness is highly desirable attribute of a clustering key, and goes hand-in-hand with index narrowness. SQL Server does not require a clustered index to be unique, but yet it must have some means of uniquely identifying every row. That’s why, for non-unique clustered indexes, SQL Server adds to every duplicate instance of a clustering key value a 4-byte integer value called a uniqueifier. This uniqueifier is added everywhere the clustering key is stored. That means the uniqueifier is stored in both clustered and non-clustered indexes. As you can imagine, if there are many rows using the same clustering key value, this can become quite expensive.",https://docs.microsoft.com/sql/relational-databases/indexes/clustered-and-nonclustered-indexes-described,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -SuspectPages,Suspect pages,Run DBCC CHECKDB to verify affected database. Suspect pages were found: @{EventType},definition,"['DefaultRuleSet', 'Pages', 'DataIntegrity']","The suspect_pages table is used for maintaining information about suspect pages, and is relevant in helping to decide whether a restore is necessary.",https://docs.microsoft.com/sql/relational-databases/backup-restore/manage-the-suspect-pages-table-sql-server,Database,/^(Windows|Linux)$/,,Warning -SparseFiles,Sparse files,Get rid of sparse files: @{SparseFiles},definition,"['DefaultRuleSet', 'Snapshots', 'Backup', 'DataIntegrity']","If the file is sparse or compressed, the NTFS file system may deallocate disk space in the file. This sets the range of bytes to zeroes (0) without extending the file size.","https://blogs.msdn.microsoft.com/jorgepc/2010/11/25/what-are-sparse-files-and-why-should-i-care-as-sql-server-dba/, https://techcommunity.microsoft.com/t5/SQL-Server-Support/Did-your-backup-program-utility-leave-your-SQL-Server-running-in/ba-p/315840",Database,/^(Windows|Linux)$/,,Warning -TableNoIndex,Tables without indexes,Review table @{TableName} and create reasonable indexes,definition,"['DefaultRuleset', 'Indexes', 'Performance']","Each table in the database has one or more pages. To keep track of those pages, SQL Server uses a special set of pages, called IAM (for Index Allocation Map) pages. In spite of the word “Index” in the name, IAMs are used for non-indexed tables as well. These are called heaps. All the data is there, but the only way to find anything is to read it starting at the beginning. For a very large table, this will be terribly inefficient.",https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -TableNoClusteredIndex,Tables without clustered indexes,Review table @{TableName} and consider creating a clustered index,definition,"['DefaultRuleset', 'Indexes', 'Performance']","Tables without clustered indexes are called heaps. They’re scattered on disk anywhere that SQL Server can find a spot, and they’re not stored in any order whatsoever. This can make for really fast inserts – SQL Server can just throw the data down – but slow selects, updates, and deletes.",https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -TablePSAlign,Table index not aligned with PS,Consider recreating index @{IndexName} in table @{TableName} to have it aligned with your schema,definition,"['DefaultRuleset', 'Indexes', 'Performance']","Table partitioning is a complex way to break out your large tables into smaller, more manageable chunks, but it comes with a lot of management heartache. One of the challenges is making sure that your indexes are partitioned and aligned the same way as your clustered index.",https://docs.microsoft.com/sql/relational-databases/partitions/partitioned-tables-and-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -LoginNoPassword,Logins with no passwords,Make sure to set strong passwords on the following logins: @{PasswordData},definition,"['DefaultRuleset', 'Security', 'WeakPassword']",Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.,https://docs.microsoft.com/sql/relational-databases/security/password-policy,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -LoginEqPassword,Logins with passwords that are same as the login names,Please review logins with password equals to login: @{PasswordData},definition,"['DefaultRuleset', 'Security', 'WeakPassword']",Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.,https://docs.microsoft.com/sql/relational-databases/security/password-policy,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -SystemHealth,System Health important messages,Error @{Error_Number} has occured @{Error_Count} times. Last time was @{Last_Logged_Days_Ago} days ago,definition,"['DefaultRuleset', 'XEvent', 'SystemHealth', 'Performance']","The system_health session is an Extended Events session that is included by default with SQL Server. This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine",https://docs.microsoft.com/sql/relational-databases/extended-events/use-the-system-health-session,Server,Windows,"OnPremises, ManagedInstance",Warning -RarelyUsedIndex,Rarely used index,Make sure you need index @{IndexName} as it's used too rarely,definition,"['DefaultRuleset', 'Indexes', 'Performance']","Rarely used indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used quite often. It makes sense to compare impact of writing operations versus rare reading speedup.",https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -UnusedIndex,Unused index,Make sure you need index @{IndexName} as it's unused,definition,"['DefaultRuleset', 'Index', 'Performance']","Unused indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used anywhere.",https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",Warning -SkewedCompatibilityLevel,Database with skewed compatibility level,Update database compatibility level (current level: @{CompatibilityLevel}),definition,"['DefaultRuleset', 'CompatibilityLevel', 'Security', 'Performance', 'UpdateIssues']",Some databases may have a compatibility level lower than the allowed level by the Database Engine.,https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-compatibility-level,Database,/^(Windows|Linux)$/,,Warning -['DefaultRuleset'],,,override,,,,,,,Warning From 22df6151bcc90322911c1bdf7dad709b42dc4af4 Mon Sep 17 00:00:00 2001 From: Alex Protsenko <53046834+alexprotsenko@users.noreply.github.com> Date: Tue, 5 Nov 2019 17:16:09 +0300 Subject: [PATCH 4/7] Uploaded an updated version of def ruleset csv --- .../sql-assessment-api/DefaultRuleset.csv | 193 ++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 samples/manage/sql-assessment-api/DefaultRuleset.csv diff --git a/samples/manage/sql-assessment-api/DefaultRuleset.csv b/samples/manage/sql-assessment-api/DefaultRuleset.csv new file mode 100644 index 0000000000..176270bbcb --- /dev/null +++ b/samples/manage/sql-assessment-api/DefaultRuleset.csv @@ -0,0 +1,193 @@ +id,displayName,message,tags,description,helpLink,target.type,target.platform,target.engineEdition,target.version,level +AutoCreateStats,Auto-Create Statistics should be on,Turn Auto-Create Statistics option on to improve query performance.,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']","The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. + + When the Auto Create statistics setting is ON, the Query Optimizer creates statistics on one or more columns of a table or an indexed view, as necessary, to improve query plans and query performance.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics#CreateStatistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +AutoUpdateStats,Auto-Update Statistics should be on,Turn Auto-Update Statistics option on to improve query performance.,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']","The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. + + When the Auto Update Statistics setting is ON, the Query Optimizer updates statistics when they are used by a query and when they might be out-of-date. Statistics become out-of-date after insert, update, delete, or merge operations change the data distribution in the table or indexed view. The Query Optimizer determines when statistics might be out-of-date by counting the number of data modifications since the last statistics update and comparing the number of modifications to a threshold. The threshold is based on the number of rows in the table or indexed view. The Query Optimizer checks for out-of-date statistics before compiling a query and before executing a cached query plan. Before compiling a query, the Query Optimizer uses the columns, tables, and indexed views in the query predicate to determine which statistics might be out-of-date. Before executing a cached query plan, the Database Engine verifies that the query plan references up-to-date statistics. The AUTO_UPDATE_STATISTICS option applies to statistics created for indexes, single-columns in query predicates, and statistics that are created by using the CREATE STATISTICS statement. This option also applies to filtered statistics.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics#UpdateStatistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +QueryStoreOn,Query Store should be active,Make sure Query Store actual operation mode is 'Read Write' to keep your performance analysis accurate,"['DefaultRuleset', 'Performance', 'QueryStore', 'Statistics']","The Query Store feature provides you with insight on query plan choice and performance. It simplifies performance troubleshooting by helping you quickly find performance differences caused by query plan changes. Query Store automatically captures a history of queries, plans, and runtime statistics, and retains these for your review. It separates data by time windows so you can see database usage patterns and understand when query plan changes happened on the server. While Query Store collects queries, execution plans and statistics, its size in the database grows until this limit is reached. When that happens, Query Store automatically changes the operation mode to read-only and stops collecting new data, which means that your performance analysis is no longer accurate.",https://docs.microsoft.com/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance","[13.0,)",Warning +TF174,TF 174 increases the plan cache bucket count,Consider enabling trace flag 174 to increase the plan cache bucket count.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']","Trace Flag 174 increases the SQL Server plan cache bucket count from 40,009 to 160,001 on 64-bit systems. + When the SQL Server plan cache reaches its entry limit, plans that have low cost must be evicted in order to insert new plans. This can cause severe contention on the SOS_CACHESTORE spinlock and a high CPU usage occurs in SQL Server. + On 64-bit systems, the number of buckets for the SQL Server plan cache is 40,009. Therefore, the maximum number of entries that can fit inside the SQL Server plan cache is 160,036. Enabling trace flag 174 on high performance systems increases the size of the cache and can avoid SOS_CACHESTORE spinlock contention.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,"['[11.0.3368,12.0)', '[12.0.2480,13.0)', '[13.0,)']",Information +TF634,TF 634 disables background columnstore compression,Trace Flag 634 disables the background columnstore compression task. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'ColumnStore']","Trace Flag 634 disables the background columnstore compression task. + SQL Server periodically runs the Tuple Mover background task that compresses columnstore index rowgroups with uncompressed data, one such rowgroup at a time. + Columnstore compression improves query performance but also consumes system resources. + You can control the timing of columnstore compression manually, by disabling the background compression task with trace flag 634, and then explicitly invoking ALTER INDEX...REORGANIZE or ALTER INDEX...REBUILD at the time of your choice.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Information +TF652,TF 652 disables page pre-fetching scans,Trace Flag 652 disables Page Pre-fetching Scans. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'Pages']","Trace Flag 652 disables page pre-fetching for scans. + The read-ahead process reads the full extent of a referenced database page into the buffer pool, before those contiguous database pages are consumed by scans. + Enabling the trace flag can lead to performance issues on queries that leverage pre-fetching.",http://support.microsoft.com/kb/920093,Server,Windows,OnPremises,,Information +TF661,TF 661 disables Ghost Cleanup Task,Trace flag 661 disables the background ghost cleanup task. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 661 disables the ghost record removal process. A ghost record is the result of a delete operation. + When you delete a record, the deleted record is kept as a ghost record. Later, the deleted record is purged by the ghost record removal process. When you disable this process, the deleted record is not purged. + Therefore, the space that the deleted record consumes is not freed. This behavior affects space consumption and the performance of scan operations. + If you turn off this trace Flag, the ghost record removal process works correctly.",https://support.microsoft.com/help/920093,Server,Windows,OnPremises,,Information +TF834,TF 834 enables large-page allocations,Enable trace flag 834 to use large-page allocations to improve analytical and data warehousing workloads.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'ColumnStore']","Trace Flag 834 causes the server to use large-page memory (LPM) model for the buffer pool allocations. Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload. Trace flag 834 is NOT recommended on SQL Server instances that use columnstore indexes.",https://support.microsoft.com/help/4465518,Server,/^(Windows|Linux)$/,OnPremises,,Information +TF845,TF 845 is not needed in SQL Server 2012 and higher versions,Disable trace flag 845 in SQL Server 2012 and higher versions.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']","Trace Flag 845 supports locking pages in memory in SQL Server Standard edition, which is needed together with trace flag 834 to use the large-page memory (LPM) model for the buffer pool allocations. + Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload. + Starting with SQL Server 2012 this behavior is enabled by default for Standard edition, and trace flag 845 must not be used.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,Windows,OnPremises,"[11.0,)",Warning +TF902,TF 902: Database Upgrade Bypass should be disabled,Disable trace flag 902 which bypasses database upgrade.,"['DefaultRuleset', 'TraceFlag', 'UpdateIssues']","Trace Flag 902 bypasses execution of database upgrade script when installing a Cumulative Update or Service Pack. + This trace flag is not supported to run it continuously in a production environment. + If you encounter an error during script upgrade mode, it is recommended to contact Microsoft SQL Customer Service and Support (CSS) for further guidance.",https://support.microsoft.com/help/2163980,Server,Windows,OnPremises,,Warning +TF1117,TF 1117 Enables Filegroup-level Autogrow,Consider enabling trace flag 1117 to enable filegroup autogrow.,"['DefaultRuleset', 'TraceFlag', 'DBFileConfiguration', 'Performance']","Trace Flag 1117 initiates the growth of every file in the filegroup, when a file in the filegroup meets the autogrow threshold, and together with trace flag 1118, can help reduce allocation contention in the SQL Server TempDB database. + This trace flag affects all databases and is recommended only if every database is safe to be grow all files in a filegroup by the same amount.",https://support.microsoft.com/help/2154845,Server,Windows,OnPremises,,Information +TF1118,TF 1118 Disables Single Page Allocations,Consider enabling trace flag 1118 to force page allocations on uniform extents.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'Pages']","Trace Flag 1118 forces page allocations on uniform extents instead of mixed extents, and together with trace flag 1117, can help reduce allocation contention in the SQL Server TempDB database. + When a new object is created, by default, the first eight pages are allocated from different extents (mixed extents). + Afterwards, when more pages are needed, those are allocated from that same extent (uniform extent). + The SGAM page is used to track these mixed extents, so can quickly become a bottleneck when numerous mixed page allocations are occurring. + This trace flag allocates all eight pages from the same extent when creating new objects, minimizing the need to scan the SGAM page and forces uniform extent allocations instead of mixed page allocations.",https://support.microsoft.com/help/328551,Server,Windows,OnPremises,,Information +TF1204,TF 1204 returns deadlock information,Trace Flag 1204 returns deadlock information.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1204 returns the resources and types of locks that are participating in a deadlock, including the affected command. + The resulting information is recorded in the SQL Server Errorlog.",https://support.microsoft.com/help/832524,Server,/^(Windows|Linux)$/,OnPremises,,Information +TF1211,TF 1211: Lock Escalation should be enabled,Disable trace flag 1211 to allow lock escalation.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1211 disables lock escalation based on memory pressure, or based on number of locks. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks. If the lock memory grows large enough, attempts to allocate additional locks for any query may fail and cause performance issues. + This trace flag should not be used in order to avoid inability to allocate lock resources because of insufficient memory. If lock escalation needs to be disabled, use trace flag 1224 instead.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TF1222,TF 1222 returns deadlock information,Trace Flag 1222 returns deadlock information.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1222 returns the resources and types of locks that are participating in a deadlock, including the affected command. + The resulting information is recorded in the SQL Server Errorlog, in XML format that does not comply with any XSD schema.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Information +TF1224,TF 1224 should be disabled,Disable trace flag 1224 to allow lock escalation.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1224 disables lock escalation based on the number of locks, unless SQL Server is under memory pressure. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TF1229,TF 1229: Lock Partitioning should be enabled,Disable trace flag 1229 to allow lock partitioning.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance', 'CPU']","Trace Flag 1229 disables lock partitioning regardless of the number of CPUs. By default, SQL Server enables lock partitioning when a server has 16 or more CPUs, to improve the scalability characteristics of larger systems. + Disabling lock partitioning may cause can cause spinlock contention and poor performance, or unexpected behaviors when switching partitions.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TF1236,TF 1236: Database Lock Partitioning should be enabled,Enable trace Flag 1236 to allow database lock partitioning.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1236 enables database-level lock partitioning. + Lock Partitioning is utilized to improve the scalability characteristics on larger systems.",https://support.microsoft.com/help/2926217,Server,Windows,OnPremises,"[9.0,)",Warning +TF1462,TF 1462 should be disabled to allow Log Stream Compression,Disable trace flag 1462 to allow log stream compression.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'AvailabilityGroups']","Trace Flag 1462 disables log stream compression for asynchronous availability groups. + This feature is enabled by default on asynchronous replicas to optimize network bandwidth.",https://docs.microsoft.com/sql/database-engine/availability-groups/windows/tune-compression-for-availability-group,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TF2312,TF 2312 sets the default Cardinality Estimation model,Trace Flag 2312 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 2312 sets the Query Optimizer cardinality estimation model to the default version of the database compability level of SQL Server 2014 and higher versions. If the database compatibility level is lower than 120, enabling trace flag 2312 uses the cardinality estimation model of SQL Server 2014 (120).",https://support.microsoft.com/help/2801413,Server,Windows,OnPremises,,Warning +TF2330,TF 2330 disables recording of index usage stats,Trace Flag 2330 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Indexes']","Trace Flag 2330 disables recording of index usage stats, which could lead to a non-yielding condition in SQL 2005.",,Server,/^(Windows|Linux)$/,OnPremises,"[10.0,)",Warning +TF2340,TF 2340 disables Batch Sorts for optimized nested loops joins,Trace Flag 2340 disables Batch Sorts for optimized nested loops joins.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 2340 causes SQL Server not to use a sort operation (batch sort) for optimized nested loops joins when generating a plan. + Verify need to set a non-default trace flag with the current system build and configuration.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Information +TF2371,TF 2371 enables a linear recompilation threshold for statistics,Enable trace Flag 2371 to allow a linear recompilation threshold for statistics.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Statistics']","Trace Flag 2371 causes SQL Server to change the fixed update statistics threshold to a linear update statistics threshold. + This is especially useful to keep statistics updated on large tables.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,Windows,OnPremises,"[10.5.2500,)",Information +TF2389,TF 2389 enables automatic statistics for Ascending Keys,Trace Flag 2389 enables automatic statistics for ascending keys. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance']","Trace Flag 2389 enables automatically generated quick statistics for ascending keys (histogram amendment). + This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time. + Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2801413,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Information +TF2390,TF 2390 enables automatic statistics for Ascending or Unknown Keys,Trace Flag 2390 enables automatic statistics for ascending or unknown keys. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance', 'Indexes']","Trace Flag 2390 enables automatically generated quick statistics for ascending or unknown keys (histogram amendment). + This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time. + Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2801413,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Information +TF2528,TF 2528 disables parallel operations for integrity checking,Trace Flag 2528 disables parallel operations for integrity checking.,"['DefaultRuleset', 'TraceFlag', 'DataIntegrity', 'DBCC']","Trace Flag 2528 disables parallel checking of objects by DBCC CHECKDB, DBCC CHECKFILEGROUP, and DBCC CHECKTABLE. + By default, the degree of parallelism is automatically determined by the query processor. The maximum degree of parallelism is configured just like that of parallel queries. + When parallel checks are disabled, the DBCC commands will take longer to complete. + Starting with SQL Server 2014 SP2, a MAXDOP option is available to override the max degree of parallelism configuration option of sp_configure for the DBCC statements.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TF2549,TF 2549 optimizes PHYSICAL_ONLY option of DBCC CHECKDB,Trace Flag 2549 forces DBCC CHECKDB to treat different physical files as one logical file.,"['DefaultRuleset', 'TraceFlag', 'DBCC']","Trace Flag 2549 forces the DBCC CHECKDB command to assume each database file is on a unique disk drive but treating different physical files as one logical file. + This trace flag can improve the performance when using the PHYSICAL_ONLY option, but it's not recommended unless it is known that each file is based on a unique physical disk.",https://support.microsoft.com/help/2634571,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TF2562,TF 2562 forces the DBCC CHECKDB command to execute in a single batch,Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch.,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'TempDB']","Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch regardless of the number of indexes in the database. + This trace flag can improve the performance when using the PHYSICAL_ONLY option, but space requirements for TempDB may increase.",https://support.microsoft.com/help/2634571,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TF2566,TF 2566 disables default data purity check,Trace Flag 2566 disables default data purity check.,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'DataIntegrity']","Trace Flag 2566 forces the DBCC CHECKDB command to execute without data purity check unless the DATA_PURITY option is specified. + For databases upgraded from earlier versions of SQL Server, it is recommended to run the DBCC CHECKDB WITH DATA_PURITY command at least once, to enable column-value integrity checks to happen by default.",https://support.microsoft.com/help/945770,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TF3023,TF 3023 enables Backup Checksum option by default,Trace Flag 3023 enables CHECKSUM option as default for BACKUP command.,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3023 enables the CHECKSUM option of the BACKUP command by default. + This trace flag forces the CHECKSUM option for BACKUP command even when not explicitely set. + Starting with SQL Server 2014, this behavior is controlled by setting the Backup Checksum Default configuration option.",https://support.microsoft.com/help/2656988,Server,Windows,OnPremises,,Information +TF3042,TF 3042 bypasses the default backup compression pre-allocation algorithm,Trace Flag 3042 enables the bypass of the default backup compression.,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3042 bypasses the default backup compression pre-allocation algorithm to allow the backup file to grow only as needed to reach its final size. + This trace flag can achieve space savings by allocating only the actual size required for the compressed backup, but might increase the overall backup operation time.",https://docs.microsoft.com/sql/relational-databases/backup-restore/backup-compression-sql-server,Server,/^(Windows|Linux)$/,OnPremises,,Information +TF3226,TF 3226 disables ErrorLog entries for every successful backup operation,Trace Flag 3226 disables ErrorLog entries for every successful backup operation.,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3226 prevents SQL Server from recording an entry to the Errorlog on every successful backup operation. + Backup operations are registered in the Errorlog by default. Frequent backup operations can contribute to massive Errorlog files that become unwieldy.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Information +TF4136,TF 4136 disables Parameter Sniffing,Trace Flag 4136 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag']","Trace Flag 4136 disables parameter sniffing unless OPTION(RECOMPILE), WITH RECOMPILE or OPTIMIZE FOR value is used, but does not apply to this SQL Server version. Starting with SQL Server 2016, to accomplish this at the database level use the PARAMETER_SNIFFING option in ALTER DATABASE SCOPED CONFIGURATION. Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/980653,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TF4137,TF 4137 causes plans to use partial correlation for filters,Trace flag 4137 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 4137 causes SQL Server to generate a plan using minimum selectivity when estimating AND predicates for filters to account for partial correlation instead of independence, under the query optimizer cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). However it does not apply to this SQL Server version. + Does not apply to CE version 120 or above. Use trace flag 9471 instead. + Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'ASSUME_MIN_SELECTIVITY_FOR_FILTER_ESTIMATES' query hint. + Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2658214,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TF4138,TF 4138 causes plans to not use Row Goal adjustments,Trace flag 4138 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 4138 causes SQL Server to generate a plan that does not use row goal adjustments with queries that contain TOP, OPTION (FAST N), IN, or EXISTS keywords. + Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'DISABLE_OPTIMIZER_ROWGOAL' query hint. However it does not apply to this SQL Server version. + Verify need to set a Non-default trace flag with current system build and configuration.",https://support.microsoft.com/help/2667211,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TF4139,TF 4139 enables automatic statistics for any key ordering,Trace flag 4139 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Statistics']","Trace Flag 4139 enables automatically generated quick statistics (histogram amendment) regardless of key column status. + However, this trace flag does not apply to this SQL Server version. + Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2952101,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TF4199,TF 4199 enables Query Optimizer fixes,Trace Flag 4199 enables Query Optimizer fixes. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer']",Trace Flag 4199 enables Query Optimizer fixes released in SQL Server Cumulative Updates and Service Packs.,http://support.microsoft.com/help/974006,Server,/^(Windows|Linux)$/,OnPremises,"[9.0.4035,)",Information +TF6498,TF 6498 enables additional concurrent large queries,Trace Flag 6498 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory']","Trace Flag 6498 enables more than one large query compilation to gain access to the big gateway when there is sufficient memory available. + However, this trace flag does not apply to this SQL Server version. + This trace flag can be used to keep memory usage for the compilation of incoming queries under control, avoiding compilation waits for concurrent large queries. + Starting with SQL Server 2014 SP2 and SQL Server 2016, this behavior is controlled by the engine and trace flag 1236 has no effect.",https://support.microsoft.com/help/3024815,Server,Windows,OnPremises,,Warning +TF6532,TF 6532 enables performance improvements for Spatial data,Enable trace flag 6532 to enable performance improvements for Spatial data.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 6532 enables performance improvements of query operations with spatial data types. + The performance gain will vary, depending on the configuration, the types of queries, and the objects.",https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,"['[11.0.6020,11.0.6518)']",Information +TF6532.6533,TF 6532 and TF 6533 enable performance improvements for Spatial data,Trace flags 6532 and 6533 do not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace flags 6532 and 6533 enable performance improvements of query operations with spatial data types. + However, this trace flag does not apply to this SQL Server version. + Starting with SQL Server 2016, this behavior is controlled by the engine and trace flags 6532 and 6533 have no effect.",https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,,Warning +TF6534,TF 6534 enables performance improvements for Spatial data,Trace flag 6534 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 6534 enables performance improvement of query operations with spatial data types. + However, this trace flag does not apply to this SQL Server version. + Verify need to set a Non-default trace flag with current system build and configuration.",https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,,Warning +TF7412,TF 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting,Enable trace flag 7412 to enables the lightweight profiling infrastructure for live query performance troubleshooting.,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace Flag 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting. Consider enabling TF 7412 to have the ability to access runtime information on query execution plans for any session.,https://docs.microsoft.com/sql/relational-databases/performance/query-profiling-infrastructure,Server,/^(Windows|Linux)$/,OnPremises,"[13.0.4001,15.0)",Information +TF9024,TF 9024 converts a global log pool memory object into NUMA node partitioned memory object.,Verify need to set a Non-default TF with current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'Memory', 'CPU']",TF9024 converts a global log pool memory object into NUMA node partitioned memory object.,https://support.microsoft.com/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,Server,Windows,OnPremises,,Warning +TF8048,TF 8048 converts NUMA partitioned memory objects into CPU partitioned,Verify need to set a Non-default TF with current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'CPU', 'Memory']",TF 8048 converts NUMA partitioned memory objects into CPU partitioned.,https://support.microsoft.com/en-us/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,Server,Windows,OnPremises,,Warning +DeprecatedFeatures,Deprecated or discontinued features should not be used,Detected deprecated or discontinued feature uses: @{DeprecatedFeature}. We recommend to replace them with features actual for SQL Server version @{ProductVersion}.,"['DefaultRuleset', 'Deprecated', 'Security', 'UpdateIssues', 'Performance']",This check detects deprecated or discontinued features used on target SQL Server instance. Deprecated features may be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +SystemHealthSession,system_health XEvent session is not active,Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,"['DefaultRuleset', 'XEvent', 'SystemHealth']","This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. + We recommend that you do not stop, alter, or delete the system health session.",https://docs.microsoft.com/sql/relational-databases/extended-events/use-the-system-health-session,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +SPServerDiagnosticsSession,sp_server_diagnostics xEvent session is not active,Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,"['DefaultRuleset', 'XEvent', 'SystemHealth']","This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. + We recommend that you do not stop, alter, or delete the system health session.",https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-server-diagnostics-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Warning +BlackboxTrace,Blackbox trace is configured and running,Make sure you still need the blackbox trace and stop it otherwise.,"['DefaultRuleset', 'Traces']","This trace is designed to behave similarly to an airplane black box, to help you diagnose intermittent server crashes. It consumes more resources than the default trace and should not be running for extended periods of time.",https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-trace-create-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Warning +DefaultTrace,No default trace was found or is not active,Make sure that there is enough space for SQL Server to write the default trace file. Then have the default trace run by disabling and re-enabling it.,"['DefaultRuleset', 'Traces']",Default trace provides troubleshooting assistance to database administrators by ensuring that they have the log data necessary to diagnose problems the first time they occur.,https://docs.microsoft.com/sql/relational-databases/policy-based-management/default-trace-log-files-disabled,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +HintsStatistics,Hints are being used,"We recommend that , , and be used only as a last resort by experienced developers and database administrators, because the SQL Server Query Optimizer typically selects the best execution plan for a query.","['DefaultRuleset', 'QueryOptimizer', 'Performance', 'Statistics']","Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the Query Optimizer might select for a query. Because the SQL Server Query Optimizer typically selects the best execution plan for a query, we recommend that , , and be used only as a last resort by experienced developers and database administrators.",https://docs.microsoft.com/sql/t-sql/queries/hints-transact-sql,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Information +HintsUsageInModules,Hints usage in modules,@{Hint} was used in @{type_desc} @{Schema_Name}.@{Object_Name}.,"['DefaultRuleset', 'QueryOptimizer', 'Performance', 'Statistics']","Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the Query Optimizer might select for a query. Because the SQL Server Query Optimizer typically selects the best execution plan for a query, we recommend that , , and be used only as a last resort by experienced developers and database administrators.",https://docs.microsoft.com/sql/t-sql/queries/hints-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Information +PlansUseRatio,Amount of single use plans in cache is high,Amount of single use plans in cache is high (@{SingleUsePlansUseRatio:P0}). Consider enabling the Optimize for ad hoc workloads setting on heavy OLTP ad-hoc workloads to conserve resources.,"['DefaultRuleset', 'Performance', 'QueryOptimizer']",Single use plans waste system resources.,https://docs.microsoft.com/sql/database-engine/configure-windows/optimize-for-ad-hoc-workloads-server-configuration-option,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +HypotheticalIndexes,Hypothetical indexes found,Index @{IndexName} for @{Schema}.@{Object} is marked as hypothetical. It is recommended to drop hypothetical index @{IndexName} as soon as possible.,"['DefaultRuleset', 'Indexes', 'Performance']","Database has indexes that are marked as hypothetical. Hypothetical indexes are created by the Database Tuning Assistant (DTA) during its tests. If a DTA session was interrupted, these indexes may not be deleted. It is recommended to drop these objects as soon as possible.",,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +HypotheticalStatistics,Hypothetical statistics found,Statistics @{StatName} for @{Schema}.@{Object} is hypothetical. It is recommended to drop hypothetical statistics @{StatName} as soon as possible.,"['DefaultRuleset', 'Statistics']","Database has statistics that are marked as hypothetical. Hypothetical statistics are created by the Database Tuning Assistant (DTA) during its tests. If a DTA session was interrupted, these statistics may not be deleted. It is recommended to drop these objects as soon as possible.",,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +LatestCU,SQL Server instance is not up to date,Product version @{ProductVersion} is not the latest available. We recommend keeping your SQL Server up to date and install Service Packs and Cumulative Updates as they are released.,"['DefaultRuleset', 'Security', 'UpdateIssues']","On an installed instance of SQL Server, we recommend that you apply the latest security updates and critical updates including general distribution releases (GDRs), service packs (SPs), and cumulative updates (CUs).",https://support.microsoft.com/help/321185/how-to-determine-the-version-edition-and-update-level-of-sql-server-an https://docs.microsoft.com/sql/database-engine/install-windows/install-sql-server-servicing-updates,Server,/^(Windows|Linux)$/,OnPremises,,Warning +FKNoIndexes,Foreign key constraints should have corresponding indexes,Create a corresponding index for each foreign key. There is no index on the following foreign keys: @{ConstraintName}.,"['DefaultRuleset', 'Performance', 'Indexes']","Unlike primary key constraints, creating a foreign key constraint does not automatically create a corresponding index. However, manually creating an index on a foreign key is often useful.",https://docs.microsoft.com/sql/relational-databases/tables/primary-and-foreign-key-constraints,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +MissedIndexes,Potentially missing indexes,Create an index on @{Table} with key columns @{KeyCols}@{IncludedCols: and included columns: #},"['DefaultRuleset', 'Performance', 'Indexes']",Potentially missing indexes were found based on query history. It may be important to revise them. Please note that this check based on a scoring method and the results may be approximate - for information purposes only.,https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Information +FullBackup,Full backup is missed or outdated,Create a new full backup of the database,"['DefaultRuleset', 'Backup']",Database doesn't have any full backup or the latest full backup is over 7 days.,https://docs.microsoft.com/sql/relational-databases/backup-restore/create-a-full-database-backup-sql-server,Database,/^(Windows|Linux)$/,OnPremises,,Warning +OutdatedTranLogBackup,Transaction Log backup is missed or outdated,Create a backup of Transaction Log. Database recovery model: @{recovery_model_desc},"['DefaultRuleset', 'Backup']","Database does not have any transaction Log backup since the latest full or differential backup, or it's older than 24H.",https://docs.microsoft.com/sql/relational-databases/backup-restore/back-up-a-transaction-log-sql-server,Database,/^(Windows|Linux)$/,OnPremises,,Warning +DbDiffCollation,Database collation doesn't match the collation of master,Keep database collation the same as the collation for master or model,"['DefaultRuleset', 'DBConfiguration', 'Collation']","We recommend that the collations of user-defined databases match the collation of master or model. Otherwise, collation conflicts can occur that might prevent code from executing. For example, when a stored procedure joins one table to a temporary table, SQL Server might end the batch and return a collation conflict error if the collations of the user-defined database and the model database are different. This occurs because temporary tables are created in tempdb, which bases its collation on that of model.",https://docs.microsoft.com/sql/database-engine/set-collation-user-defined-databases-match-master-model-databases,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +AutoClose,Auto Close Option should be OFF,Set AUTO_CLOSE option to OFF,"['DefaultRuleset', 'Performance', 'DBConfiguration']","When AUTO_CLOSE is set ON, this can cause performance degradation on frequently accessed databases because of the increased overhead of opening and closing the database after each connection. AUTO_CLOSE also flushes the procedure cache after each connection.",https://docs.microsoft.com/sql/relational-databases/policy-based-management/set-the-auto-close-database-option-to-off,Database,/^(Windows|Linux)$/,OnPremises,,Warning +AutoShrink,Auto Shrink Option should be OFF,Set AUTO_SHRINK option to OFF.,"['DefaultRuleset', 'DBConfiguration', 'Performance']","Shrinking databases is the fastest way to achieve fragmentation. SQL Server goes to the last page in the database, moves it to the first free available space, and then repeats the process again. This shuffles the deck, putting your pages out of order.",https://blogs.msdn.microsoft.com/buckwoody/2009/07/01/sql-server-best-practices-auto-shrink-should-be-off,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +PageVerify,PAGE_VERIFY option should be CHECKSUM,Set PAGE_VERIFY option to CHECKSUM.,"['DefaultRuleset', 'DBConfiguration', 'DataIntegrity']","When CHECKSUM is enabled for the PAGE_VERIFY database option, the SQL Server Database Engine calculates a checksum over the contents of the whole page, and stores the value in the page header when a page is written to disk. When the page is read from disk, the checksum is recomputed and compared to the checksum value that is stored in the page header. This helps provide a high level of data-file integrity.",https://docs.microsoft.com/sql/relational-databases/policy-based-management/set-the-page-verify-database-option-to-checksum,Database,/^(Windows|Linux)$/,OnPremises,,Warning +DbChaining,Cross-Database Access should be disabled,Set DB_CHAINING option to OFF.,"['DefaultRuleset', 'DBConfiguration', 'Security']",Ownership chaining across databases is turned off by default. Microsoft recommends that you disable cross-database ownership chaining because it exposes you to the additional security risks.,https://docs.microsoft.com/dotnet/framework/data/adonet/sql/enabling-cross-database-access-in-sql-server,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +AutoCreateStatsIncremental,Incremental option of auto stats should be ON,Set AUTO_CREATE_STATISTICS to ON and set INCREMENTAL to ON,"['DefaultRuleset', 'DBConfiguration', 'Statistics', 'Performance']","Incremental statistics update at partition level is a feature introduced in SQL Server 2014. When the option INCREMENTAL is turn on at the database level, newly auto created column statistics will use incremental statistics on partitioned tables by default.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance","[12.0,)",Warning +TrustWorthy,TRUSTWORTHY should be OFF,Set TRUSTWORTHY option to OFF,"['DefaultRuleset', 'DBConfiguration', 'Security']","You can use the TRUSTWORTHY database setting to indicate whether the instance of Microsoft SQL Server trusts the database and the contents within the database. By default, this setting is set to OFF to mitigate certain threats that may be present when a database is attached to the server.",https://support.microsoft.com/help/2183687/guidelines-for-using-the-trustworthy-database-setting-in-sql-server,Database,/^(Windows|Linux)$/,OnPremises,,Warning +ParameterizationNotSimple,PARAMETERIZATION should be SIMPLE,"Set PARAMETERIZATION = SIMPLE and use forced parameterization only on a certain class of queries, instead of all queries","['DefaultRuleset', 'DBConfiguration', 'Performance', 'QueryOptimizer']","When the PARAMETERIZATION database option is set to SIMPLE, the SQL Server query optimizer may choose to parameterize the queries. This means that any literal values that are contained in a query are substituted with parameters. This process is referred to as simple parameterization. When SIMPLE parameterization is in effect, you cannot control which queries are parameterized and which queries are not. However, you can specify that all queries in a database be parameterized by setting the PARAMETERIZATION database option to FORCED. + + Regardless of whether you have a Plan-Stability or not, SQL Server will always auto parameterize your SQL Statements, and reuse the cached execution plan over and over again. It doesn't matter how terrible the execution plan is. Therefore you have to know in exact detail the shape of your execution plans, and whether they can lead to some performance related problems.",https://docs.microsoft.com/sql/relational-databases/performance/specify-query-parameterization-behavior-by-using-plan-guides,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +TempDBFilesNotSameSize,TempDB data files are not the same size,Make all TempDB data files the same size,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",We recommend that you create all TempDB data files at the same size.,https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TempDBFilesMultiple4,Number of TempDB data files should be in multiples of 4,Make sure number of TempDB data files is in multiples of 4,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']","Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TempDBFiles1PerCPU,Number of TempDB data files should depend on CPU count,Make sure to have 1 data file per logical processor (processors count: @{online_logical_processors}),"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']","Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TempDBFilesNotLess8,Number of TempDB data files should be at least 8,"Add extra data files to TempDB. There are @{physical_name} data files, should be at least 8","['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']","Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,,Warning +TempDBFilesAutoGrowth,TempDB data files have different auto growth settings,Make Autogrowth settings the same for each TempDB data file,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']","TempDB data files should be of equal size within each filegroup, as SQL Server uses a proportional-fill algorithm that favors allocations in files with more free space.",https://docs.microsoft.com/sql/relational-databases/databases/tempdb-database,Server,/^(Windows|Linux)$/,OnPremises,,Warning +FilesAutogrowth,Database files have Autogrowth setting over 1GB,Set File Growth to less than 1GB for files: @{FileName},"['DefaultRuleset', 'Performance', 'DBFileConfiguration']","A data or log file will be extended with auto-growth value to prevent the lack of free space in files. This process can perform significant impact on SQL Server performance if auto-growth value gets over 1 GB. By default, SQL Server will put zeros to a newly allocated space. And the more space it takes, the more time it takes to initialize it.",https://support.microsoft.com/help/315512/considerations-for-the-autogrow-and-autoshrink-settings-in-sql-server,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance","[13.0.4001,)",Warning +DuplicateIndexes,There are tables with duplicate indexes,Consider removing duplicate indexes in table @{Table}: @{ToDelete},"['DefaultRuleset', 'Performance', 'Indexes']",There are tables with duplicate indexes according to their definitions. We recommended to revise all these objects as soon as possible.,https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +RedundantIndexes,There are tables with possibly redundant indexes,Consider removing redundant indexes in table @{Table}: @{Indexes},"['DefaultRuleset', 'Performance', 'Indexes']",There are tables with possibly redundant indexes according to the set of key and included columns. We recommended to revise all these objects as soon as possible.,https://docs.microsoft.com/sql/relational-databases/sql-server-index-design-guide,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +UserObjectsInMaster,User objects in database master,Remove user objects from database master: @{Object_Name},"['DefaultRuleset', 'masterDB', 'Backup']","We highly recommend you not create user objects in the master database. If it's unavoidable for some reason, make sure to back up the database more frequently.",https://docs.microsoft.com/sql/relational-databases/databases/master-database,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +CpuUtilOver70,CPU usage over 70%,Investigate high CPU utilization by SQL Server: over 70% in the last 2 hours,"['DefaultRuleset', 'Performance', 'CPU']","CPU utilization rate in the last 2 hours is over 70% - consider review queries with high CPU usage or add additional hardware resources. Also, potential causes include memory pressure, low query plan reuse, non-optimized queries.",https://docs.microsoft.com/previous-versions/technet-magazine/cc137784(v=msdn.10),Server,Windows,"OnPremises, ManagedInstance",,Warning +CpuUtilOver90,CPU usage over 90%,Investigate high CPU utilization by SQL Server: over 90% in the last 2 hours,"['DefaultRuleset', 'Performance', 'CPU']","CPU utilization rate in the last 2 hours is over 90% - consider review queries with high CPU usage or add additional hardware resources. Also, potential causes include memory pressure, low query plan reuse, non-optimized queries.",https://docs.microsoft.com/previous-versions/technet-magazine/cc137784(v=msdn.10),Server,Windows,"OnPremises, ManagedInstance",,Warning +ReplErrors24H,Replication errors in the last 24 hours,Review replication errors for the following publications: @{publication},"['DefaultRuleset', 'Replication']",This check searches for errors in distribution database agent's history table for the last 24 hours.,https://docs.microsoft.com/sql/relational-databases/replication/sql-server-replication,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +AgentAlertsSeverity10,Agent doesn't rise alerts for errors with severity 10,Consider creating alerts for the following errors: @{error_ids},"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",,Warning +AgentAlertsSeverity16,Agent doesn't rise alerts for errors with severity 16,Consider creating alerts for the following errors: @{error_ids},"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",,Warning +AgentAlertsSeverity17,Agent doesn't rise alerts for errors with severity 17,Consider creating alerts for the following errors: @{error_ids},"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",,Warning +AgentAlertsSeverity19,Agent doesn't rise alerts for errors with severity 19,Consider creating alerts for the following errors: @{error_ids},"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",,Warning +AgentAlertsSeverity20,Agent doesn't rise alerts for errors with severity 20,Consider creating alerts for the following errors: @{error_ids},"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",,Warning +AgentAlertsSeverity21,Agent doesn't rise alerts for errors with severity 21,Consider creating alerts for the following errors: @{error_ids},"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",,Warning +AgentAlertsSeverity22,Agent doesn't rise alerts for errors with severity 22,Consider creating alerts for the following errors: @{error_ids},"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",,Warning +AgentAlertsSeverity23,Agent doesn't rise alerts for errors with severity 23,Consider creating alerts for the following errors: @{error_ids},"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",,Warning +AgentAlertsSeverity24,Agent doesn't rise alerts for errors with severity 24,Consider creating alerts for the following errors: @{error_ids},"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",,Warning +WeakPassword,Weak password,Make sure to set strong passwords on the following logins: @{PasswordData},"['DefaultRuleset', 'Security', 'WeakPassword']",Some user logins have weak passwords.,https://docs.microsoft.com/sql/relational-databases/security/strong-passwords,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +VLFCount,VLF count,Update transaction log settings to reduce the number of VLFs (current number is: @{RecoveryUnitId}),"['DefaultRuleset', 'Backup', 'Performance']","The SQL Server Database Engine divides each physical log file internally into a number of virtual log files (VLFs). Virtual log files have no fixed size, and there is no fixed number of virtual log files for a physical log file. The Database Engine chooses the size of the virtual log files dynamically while it is creating or extending log files. The Database Engine tries to maintain a small number of virtual files. The size of the virtual files after a log file has been extended is the sum of the size of the existing log and the size of the new file increment. The size or number of virtual log files cannot be configured or set by administrators. + + If the log files grow to a large size in many small increments, they will have many virtual log files. This can slow down database startup and also log backup and restore operations. Conversely, if the log files are set to a large size with few or just one increment, they will have few very large virtual log files. + + We recommend that you assign log files a size value close to the final size required, using the required increments to achieve optimal VLF distribution, and also have a relatively large growth_increment value.",https://docs.microsoft.com/sql/relational-databases/sql-server-transaction-log-architecture-and-management-guide,Database,Windows,"OnPremises, ManagedInstance",,Warning +TF8015,TF 8015 disables auto-detection and NUMA setup,Disable trace flag 8015 for this SQL Server instance. This TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'CPU', 'NUMA']","SQL Server allows you to group CPUs into nodes referred to as soft-NUMA. You usually configure soft-NUMA when you have many CPUs and do not have hardware NUMA, but you can also use soft-NUMA to subdivide hardware NUMA nodes into smaller groups.",https://techcommunity.microsoft.com/t5/SQL-Server-Support/How-It-Works-Soft-NUMA-I-O-Completion-Thread-Lazy-Writer-Workers/ba-p/316044,Server,Windows,OnPremises,"(,11.0.3349)",Warning +TF8032,TF 8032 reverts the cache limit parameters to the SQL Server 2005 RTM,The cache limit parameters reverted to the SQL Server 2005 RTM setting but can cause poor performance if large caches make less memory available for other memory consumers like BP,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace Flag 8032 reverts the cache limit parameters to the SQL Server 2005 RTM setting but can cause poor performance if large caches make less memory available for other memory consumers like BP.,,Server,Windows,OnPremises,"[10.0,)",Warning +TF8744,TF 8744 disables pre-fetching for the Nested Loop operator,Disable trace flag 8744 for this SQL Server instance. This TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace flag 8744 disables pre-fetching for the Nested Loops operator. Incorrect use of this trace flag may cause additional physical reads when SQL Server executes plans that contain the Nested Loops operator.,https://support.microsoft.com/en-us/help/920093/tuning-options-for-sql-server-when-running-in-high-performance-workloa,Server,Windows,OnPremises,"(,12.0)",Warning +TF9347,TF 9347 disables batch mode for sort operator,Disable trace flag 9347 for this SQL Server instance. This TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace flag 9347 disables batch mode for sort operator. SQL Server 2016 (13.x) introduced a new batch mode sort operator that boosts performance for many analytical queries.,,Server,Windows,OnPremises,"(,13.0)",Warning +TF9349,TF 9349 disables batch mode for top N sort operator,Disable trace flag 9349 for this SQL Server instance. This TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace flag 9349 disables batch mode for top N sort operator. SQL Server 2016 (13.x) introduced a new batch mode top sort operator that boosts performance for many analytical queries.,,Server,Windows,OnPremises,"(,13.0)",Warning +TF9389,TF 9389 enables dynamic memory grant for batch mode operators,Disable trace flag 9389 for this SQL Server instance. The TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'Performance', 'TempDB']","Trace flag 9389 enables additional dynamic memory grant for batch mode operators. If a query does not get all the memory it needs, it spills data to TempDB, incurring additional I/O and potentially impacting query performance. If the dynamic memory grant trace flag is enabled, a batch mode operator may ask for additional memory and avoid spilling to TempDB if additional memory is available.",,Server,Windows,"OnPremises, ManagedInstance","(,13.0)",Warning +TF9476,TF 9476 causes SQL Server to generate a plan using the Simple Containment instead of the default Base Containment under New CE,Disable trace flag 9476 for this SQL Server instance. The TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'Performance', 'QueryOptimizer']","Trace flag 9476 causes SQL Server to generate a plan using the Simple Containment assumption instead of the default Base Containment assumption, under the query optimizer cardinality estimation model of SQL Server 2014 (12.x) through SQL Server 2017 versions.",,Server,Windows,OnPremises,"(,13.0)",Warning +TF9481,"TF 9481 enables Legacy CE model, irrespective of the compatibility level of the database",Disable trace flag 9481 for this SQL Server instance. The TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace flag 9481 enables you to set the query optimizer cardinality estimation model to the SQL Server 2012 (11.x) and earlier versions, irrespective of the compatibility level of the database.",,Server,Windows,OnPremises,"(,12.0)",Warning +TF10204,TF 10204 disables merge/recompress during columnstore index reorganization,Disable trace flag 10204 for this SQL Server instance. The TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'Performance', 'ColumnStore']","Trace flag 10204 disables merge/recompress during columnstore index reorganization. In SQL Server 2016 (13.x), when a columnstore index is reorganized, there is new functionality to automatically merge any small compressed rowgroups into larger compressed rowgroups, as well as recompressing any rowgroups that have a large number of deleted rows.",,Server,Windows,OnPremises,"(,13.0)",Warning +SPNaming,Stored Procedure Naming,Rename the following stored procedures to get rid of the sp_ prefix: @{ObjectName},"['DefaultRuleset', 'Naming']","In SQL Server, the sp_ prefix designates system stored procedures. If you use that prefix for your stored procedures, the name of your procedure might conflict with the name of a system stored procedure that will be created in the future. If such a conflict occurs, your application might break if your application refers to the procedure without qualifying the reference by schema. In this situation, the name will bind to the system procedure instead of to your procedure.",https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172115(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",,Warning +ObjectNamingSpecialChar,Object Naming,Rename the following objects to get rid of special characters: @{ObjectName},"['DefaultRuleset', 'Naming']","If you name a database object by using any character in the following table, you make it more difficult not only to reference that object but also to read code that contains the name of that object.",https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172134(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",,Warning +ColumnNamingSpecialChar,Column Naming,Rename the following columns to get rid of special characters: @{ObjectName},"['DefaultRuleset', 'Naming']","If you name a database object by using any character in the following table, you make it more difficult not only to reference that object but also to read code that contains the name of that object.",https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172134(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",,Warning +FnNaming,User Function Naming,Rename the following functions to get rid of the fn_ prefix: @{ObjectName},"['DefaultRuleset', 'Naming']","In SQL Server, the fn_ prefix designates system functions. If you use that prefix for your functions, the name of your function might conflict with the name of a system function that will be created in the future. If such a conflict occurs, your application might break if your application refers to the function without qualifying the reference by schema. In this situation, the name will bind to the system function instead of to your function.",https://docs.microsoft.com/sql/t-sql/statements/create-function-transact-sql,Database,Windows,"OnPremises, ManagedInstance",,Warning +ObjectNamingResKeywords,Object names contain reserved keywords,Rename the following objects to get rid of reserved keywords: @{ObjectName},"['DefaultRuleset', 'Naming']","Microsoft SQL Server uses reserved keywords for defining, manipulating, and accessing databases. Reserved keywords are part of the grammar of the Transact-SQL language that is used by SQL Server to parse and understand Transact-SQL statements and batches. Although it is syntactically possible to use SQL Server reserved keywords as identifiers and object names in Transact-SQL scripts, you can do this only by using delimited identifiers.",https://docs.microsoft.com/sql/t-sql/language-elements/reserved-keywords-transact-sql,Database,Windows,"OnPremises, ManagedInstance",,Warning +DeprFeaturesInModules,Use of deprecated or discontinued features in modules,Consider getting rid of the following deprecated or discontinued features in @{ObjectName}: @{Keyword},"['DefaultRuleset', 'Security', 'Deprecated', 'LongRunningChecks', 'UpdateIssues']",Deprecated features are scheduled to be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Database,Windows,"OnPremises, ManagedInstance",,Warning +DeprFeaturesInJobs,Use of deprecated or discontinued features in modules,Consider getting rid of the following deprecated or discontinued features in job @{ObjectName}: @{Keyword},"['DefaultRuleset', 'Security', 'Deprecated', 'Agent', 'Jobs', 'LongRunningChecks', 'UpdateIssues']",Deprecated features are scheduled to be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Server,Windows,"OnPremises, ManagedInstance",,Warning +NUMANodeSingleCPU,Single CPU assigned to NUMA node,Consider assigning additional CPUs to NUMA nodes that have only one assigned CPU,"['DefaultRuleset', 'NUMA', 'CPU', 'Memory', 'Performance']","Microsoft SQL Server is non-uniform memory access (NUMA) aware. NUMA architecture provides a scalable solution to performance problem. Computers with hardware NUMA have more than one system bus, each serving a small set of processors. Each group of processors has its own memory and possibly its own I/O channels, but each CPU can access memory associated with other groups in a coherent way. Each group is called a NUMA node. The number of CPUs within a NUMA node depends on the hardware vendor. Your hardware manufacturer can tell you if your computer supports hardware NUMA.",https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms178144(v=sql.105),Server,Windows,"OnPremises, ManagedInstance",,Warning +NUMANodeNoCPU,NUMA nodes without CPUs,Make sure that all NUMA nodes have assigned CPUs,"['DefaultRuleset', 'NUMA', 'Performance', 'CPU', 'Memory']","Microsoft SQL Server is non-uniform memory access (NUMA) aware. NUMA architecture provides a scalable solution to performance problem. Computers with hardware NUMA have more than one system bus, each serving a small set of processors. Each group of processors has its own memory and possibly its own I/O channels, but each CPU can access memory associated with other groups in a coherent way. Each group is called a NUMA node. The number of CPUs within a NUMA node depends on the hardware vendor. Your hardware manufacturer can tell you if your computer supports hardware NUMA.",https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms178144(v=sql.105),Server,Windows,"OnPremises, ManagedInstance",,Warning +IndexKeyGuid,Guid in clustered index key column,Get rid of GUIDs in the following clustered indexes' keys: @{IndexName},"['DefaultRuleset', 'Indexes', 'Performance']","A big reason for a clustered index is when you often want to retrieve rows for a range of values for a given column. Because the data is physically arranged in that order, the rows can be extracted very efficiently. Something like a GUID, while excellent for a primary key, could be positively detrimental to performance, as there will be additional cost for inserts and no perceptible benefit on selects.",https://azure.microsoft.com/blog/uniqueidentifier-and-clustered-indexes/,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +IndexesLargeKeys,Indexes keys with more than 900 bytes,Get rid of keys larger than 900 bytes in index @{FullName},"['DefaultRuleset', 'Indexes', 'Performance']","When you design an index that contains many key columns, or large-size columns, calculate the size of the index key to make sure that you do not exceed the maximum index key size. SQL Server retains the 900-byte limit for the maximum total size of all index key columns. This excludes nonkey columns that are included in the definition of nonclustered indexes.",http://msdn.microsoft.com/library/ms191241.aspx,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +DisabledIndexes,Disabled Indexes exist,Remove or enable this disabled index: @{FullName},"['DefaultRuleset', 'Indexes', 'Performance']","If you need to load a lot of data quickly, you can disable nonclustered indexes in order to improve performance. After the data load finishes, enable the nonclustered indexes again by rebuilding them. This technique works best in large data warehouse environments where entire dimension tables might be reloaded from scratch every night. Disabling nonclustered indexes is safer than dropping and recreating them because scripting indexes is hard. Unfortunately, sometimes our load processes crash before enabling the indexes again, or sometimes we manually load data and we forget to rebuild them.",https://docs.microsoft.com/sql/relational-databases/indexes/disable-indexes-and-constraints,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +IndexesFillFactor,Index fill factor lower 80%,Review index @{FullName} as its fill factor @{FillFactor} is lower than 80 percent,"['DefaultRuleset', 'Indexes', 'Performance']","The fill-factor option is provided for fine-tuning index data storage and performance. When an index is created or rebuilt, the fill-factor value determines the percentage of space on each leaf-level page to be filled with data, reserving the remainder on each page as free space for future growth. For example, specifying a fill-factor value of 80 means that 20 percent of each leaf-level page will be left empty, providing space for index expansion as data is added to the underlying table. The empty space is reserved between the index rows rather than at the end of the index.",https://docs.microsoft.com/sql/relational-databases/indexes/specify-fill-factor-for-an-index,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +NonUniqueClusterIndex,Non-unique clustered indexes,Review this clustered index @{FullName} as it is non-unique,"['DefaultRuleset', 'Indexes', 'Performance']","Index uniqueness is highly desirable attribute of a clustering key, and goes hand-in-hand with index narrowness. SQL Server does not require a clustered index to be unique, but yet it must have some means of uniquely identifying every row. That’s why, for non-unique clustered indexes, SQL Server adds to every duplicate instance of a clustering key value a 4-byte integer value called a uniqueifier. This uniqueifier is added everywhere the clustering key is stored. That means the uniqueifier is stored in both clustered and non-clustered indexes. As you can imagine, if there are many rows using the same clustering key value, this can become quite expensive.",https://docs.microsoft.com/sql/relational-databases/indexes/clustered-and-nonclustered-indexes-described,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +SuspectPages,Suspect pages,Run DBCC CHECKDB to verify affected database. Suspect pages were found: @{EventType},"['DefaultRuleSet', 'Pages', 'DataIntegrity']","The suspect_pages table is used for maintaining information about suspect pages, and is relevant in helping to decide whether a restore is necessary.",https://docs.microsoft.com/sql/relational-databases/backup-restore/manage-the-suspect-pages-table-sql-server,Database,/^(Windows|Linux)$/,,,Warning +SparseFiles,Sparse files,Get rid of sparse files: @{SparseFiles},"['DefaultRuleSet', 'Snapshots', 'Backup', 'DataIntegrity']","If the file is sparse or compressed, the NTFS file system may deallocate disk space in the file. This sets the range of bytes to zeroes (0) without extending the file size.","https://blogs.msdn.microsoft.com/jorgepc/2010/11/25/what-are-sparse-files-and-why-should-i-care-as-sql-server-dba/, https://techcommunity.microsoft.com/t5/SQL-Server-Support/Did-your-backup-program-utility-leave-your-SQL-Server-running-in/ba-p/315840",Database,/^(Windows|Linux)$/,,,Warning +TableNoIndex,Tables without indexes,Review table @{TableName} and create reasonable indexes,"['DefaultRuleset', 'Indexes', 'Performance']","Each table in the database has one or more pages. To keep track of those pages, SQL Server uses a special set of pages, called IAM (for Index Allocation Map) pages. In spite of the word “Index” in the name, IAMs are used for non-indexed tables as well. These are called heaps. All the data is there, but the only way to find anything is to read it starting at the beginning. For a very large table, this will be terribly inefficient.",https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +TableNoClusteredIndex,Tables without clustered indexes,Review table @{TableName} and consider creating a clustered index,"['DefaultRuleset', 'Indexes', 'Performance']","Tables without clustered indexes are called heaps. They’re scattered on disk anywhere that SQL Server can find a spot, and they’re not stored in any order whatsoever. This can make for really fast inserts – SQL Server can just throw the data down – but slow selects, updates, and deletes.",https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +TablePSAlign,Table index not aligned with PS,Consider recreating index @{IndexName} in table @{TableName} to have it aligned with your schema,"['DefaultRuleset', 'Indexes', 'Performance']","Table partitioning is a complex way to break out your large tables into smaller, more manageable chunks, but it comes with a lot of management heartache. One of the challenges is making sure that your indexes are partitioned and aligned the same way as your clustered index.",https://docs.microsoft.com/sql/relational-databases/partitions/partitioned-tables-and-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +LoginNoPassword,Logins with no passwords,Make sure to set strong passwords on the following logins: @{PasswordData},"['DefaultRuleset', 'Security', 'WeakPassword']",Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.,https://docs.microsoft.com/sql/relational-databases/security/password-policy,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +LoginEqPassword,Logins with passwords that are same as the login names,Please review logins with password equals to login: @{PasswordData},"['DefaultRuleset', 'Security', 'WeakPassword']",Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.,https://docs.microsoft.com/sql/relational-databases/security/password-policy,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +SystemHealth,System Health important messages,Error @{Error_Number} has occured @{Error_Count} times. Last time was @{Last_Logged_Days_Ago} days ago,"['DefaultRuleset', 'XEvent', 'SystemHealth', 'Performance']","The system_health session is an Extended Events session that is included by default with SQL Server. This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine",https://docs.microsoft.com/sql/relational-databases/extended-events/use-the-system-health-session,Server,Windows,"OnPremises, ManagedInstance",,Warning +RarelyUsedIndex,Rarely used index,Make sure you need index @{IndexName} as it's used too rarely,"['DefaultRuleset', 'Indexes', 'Performance']","Rarely used indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used quite often. It makes sense to compare impact of writing operations versus rare reading speedup.",https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +UnusedIndex,Unused index,Make sure you need index @{IndexName} as it's unused,"['DefaultRuleset', 'Index', 'Performance']","Unused indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used anywhere.",https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +SkewedCompatibilityLevel,Database with skewed compatibility level,Update database compatibility level (current level: @{CompatibilityLevel}),"['DefaultRuleset', 'CompatibilityLevel', 'Security', 'Performance', 'UpdateIssues']",Some databases may have a compatibility level lower than the allowed level by the Database Engine.,https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-compatibility-level,Database,/^(Windows|Linux)$/,,,Warning From b76035cf24cf5eb1e9399bf182b29c14bc88d96f Mon Sep 17 00:00:00 2001 From: Alex Protsenko <53046834+alexprotsenko@users.noreply.github.com> Date: Tue, 5 Nov 2019 17:18:28 +0300 Subject: [PATCH 5/7] added a blank line so Github updates the file encoding --- .../sql-assessment-api/DefaultRuleset.csv | 143 +++++++++--------- 1 file changed, 72 insertions(+), 71 deletions(-) diff --git a/samples/manage/sql-assessment-api/DefaultRuleset.csv b/samples/manage/sql-assessment-api/DefaultRuleset.csv index 176270bbcb..ce9d38fdce 100644 --- a/samples/manage/sql-assessment-api/DefaultRuleset.csv +++ b/samples/manage/sql-assessment-api/DefaultRuleset.csv @@ -1,112 +1,112 @@ id,displayName,message,tags,description,helpLink,target.type,target.platform,target.engineEdition,target.version,level -AutoCreateStats,Auto-Create Statistics should be on,Turn Auto-Create Statistics option on to improve query performance.,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']","The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. - +AutoCreateStats,Auto-Create Statistics should be on,Turn Auto-Create Statistics option on to improve query performance.,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']","The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. + When the Auto Create statistics setting is ON, the Query Optimizer creates statistics on one or more columns of a table or an indexed view, as necessary, to improve query plans and query performance.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics#CreateStatistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning -AutoUpdateStats,Auto-Update Statistics should be on,Turn Auto-Update Statistics option on to improve query performance.,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']","The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. - +AutoUpdateStats,Auto-Update Statistics should be on,Turn Auto-Update Statistics option on to improve query performance.,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']","The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. + When the Auto Update Statistics setting is ON, the Query Optimizer updates statistics when they are used by a query and when they might be out-of-date. Statistics become out-of-date after insert, update, delete, or merge operations change the data distribution in the table or indexed view. The Query Optimizer determines when statistics might be out-of-date by counting the number of data modifications since the last statistics update and comparing the number of modifications to a threshold. The threshold is based on the number of rows in the table or indexed view. The Query Optimizer checks for out-of-date statistics before compiling a query and before executing a cached query plan. Before compiling a query, the Query Optimizer uses the columns, tables, and indexed views in the query predicate to determine which statistics might be out-of-date. Before executing a cached query plan, the Database Engine verifies that the query plan references up-to-date statistics. The AUTO_UPDATE_STATISTICS option applies to statistics created for indexes, single-columns in query predicates, and statistics that are created by using the CREATE STATISTICS statement. This option also applies to filtered statistics.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics#UpdateStatistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning QueryStoreOn,Query Store should be active,Make sure Query Store actual operation mode is 'Read Write' to keep your performance analysis accurate,"['DefaultRuleset', 'Performance', 'QueryStore', 'Statistics']","The Query Store feature provides you with insight on query plan choice and performance. It simplifies performance troubleshooting by helping you quickly find performance differences caused by query plan changes. Query Store automatically captures a history of queries, plans, and runtime statistics, and retains these for your review. It separates data by time windows so you can see database usage patterns and understand when query plan changes happened on the server. While Query Store collects queries, execution plans and statistics, its size in the database grows until this limit is reached. When that happens, Query Store automatically changes the operation mode to read-only and stops collecting new data, which means that your performance analysis is no longer accurate.",https://docs.microsoft.com/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance","[13.0,)",Warning -TF174,TF 174 increases the plan cache bucket count,Consider enabling trace flag 174 to increase the plan cache bucket count.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']","Trace Flag 174 increases the SQL Server plan cache bucket count from 40,009 to 160,001 on 64-bit systems. - When the SQL Server plan cache reaches its entry limit, plans that have low cost must be evicted in order to insert new plans. This can cause severe contention on the SOS_CACHESTORE spinlock and a high CPU usage occurs in SQL Server. +TF174,TF 174 increases the plan cache bucket count,Consider enabling trace flag 174 to increase the plan cache bucket count.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']","Trace Flag 174 increases the SQL Server plan cache bucket count from 40,009 to 160,001 on 64-bit systems. + When the SQL Server plan cache reaches its entry limit, plans that have low cost must be evicted in order to insert new plans. This can cause severe contention on the SOS_CACHESTORE spinlock and a high CPU usage occurs in SQL Server. On 64-bit systems, the number of buckets for the SQL Server plan cache is 40,009. Therefore, the maximum number of entries that can fit inside the SQL Server plan cache is 160,036. Enabling trace flag 174 on high performance systems increases the size of the cache and can avoid SOS_CACHESTORE spinlock contention.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,"['[11.0.3368,12.0)', '[12.0.2480,13.0)', '[13.0,)']",Information -TF634,TF 634 disables background columnstore compression,Trace Flag 634 disables the background columnstore compression task. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'ColumnStore']","Trace Flag 634 disables the background columnstore compression task. - SQL Server periodically runs the Tuple Mover background task that compresses columnstore index rowgroups with uncompressed data, one such rowgroup at a time. - Columnstore compression improves query performance but also consumes system resources. +TF634,TF 634 disables background columnstore compression,Trace Flag 634 disables the background columnstore compression task. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'ColumnStore']","Trace Flag 634 disables the background columnstore compression task. + SQL Server periodically runs the Tuple Mover background task that compresses columnstore index rowgroups with uncompressed data, one such rowgroup at a time. + Columnstore compression improves query performance but also consumes system resources. You can control the timing of columnstore compression manually, by disabling the background compression task with trace flag 634, and then explicitly invoking ALTER INDEX...REORGANIZE or ALTER INDEX...REBUILD at the time of your choice.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Information -TF652,TF 652 disables page pre-fetching scans,Trace Flag 652 disables Page Pre-fetching Scans. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'Pages']","Trace Flag 652 disables page pre-fetching for scans. - The read-ahead process reads the full extent of a referenced database page into the buffer pool, before those contiguous database pages are consumed by scans. +TF652,TF 652 disables page pre-fetching scans,Trace Flag 652 disables Page Pre-fetching Scans. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'Pages']","Trace Flag 652 disables page pre-fetching for scans. + The read-ahead process reads the full extent of a referenced database page into the buffer pool, before those contiguous database pages are consumed by scans. Enabling the trace flag can lead to performance issues on queries that leverage pre-fetching.",http://support.microsoft.com/kb/920093,Server,Windows,OnPremises,,Information -TF661,TF 661 disables Ghost Cleanup Task,Trace flag 661 disables the background ghost cleanup task. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 661 disables the ghost record removal process. A ghost record is the result of a delete operation. - When you delete a record, the deleted record is kept as a ghost record. Later, the deleted record is purged by the ghost record removal process. When you disable this process, the deleted record is not purged. - Therefore, the space that the deleted record consumes is not freed. This behavior affects space consumption and the performance of scan operations. +TF661,TF 661 disables Ghost Cleanup Task,Trace flag 661 disables the background ghost cleanup task. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 661 disables the ghost record removal process. A ghost record is the result of a delete operation. + When you delete a record, the deleted record is kept as a ghost record. Later, the deleted record is purged by the ghost record removal process. When you disable this process, the deleted record is not purged. + Therefore, the space that the deleted record consumes is not freed. This behavior affects space consumption and the performance of scan operations. If you turn off this trace Flag, the ghost record removal process works correctly.",https://support.microsoft.com/help/920093,Server,Windows,OnPremises,,Information TF834,TF 834 enables large-page allocations,Enable trace flag 834 to use large-page allocations to improve analytical and data warehousing workloads.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'ColumnStore']","Trace Flag 834 causes the server to use large-page memory (LPM) model for the buffer pool allocations. Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload. Trace flag 834 is NOT recommended on SQL Server instances that use columnstore indexes.",https://support.microsoft.com/help/4465518,Server,/^(Windows|Linux)$/,OnPremises,,Information -TF845,TF 845 is not needed in SQL Server 2012 and higher versions,Disable trace flag 845 in SQL Server 2012 and higher versions.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']","Trace Flag 845 supports locking pages in memory in SQL Server Standard edition, which is needed together with trace flag 834 to use the large-page memory (LPM) model for the buffer pool allocations. - Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload. +TF845,TF 845 is not needed in SQL Server 2012 and higher versions,Disable trace flag 845 in SQL Server 2012 and higher versions.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']","Trace Flag 845 supports locking pages in memory in SQL Server Standard edition, which is needed together with trace flag 834 to use the large-page memory (LPM) model for the buffer pool allocations. + Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload. Starting with SQL Server 2012 this behavior is enabled by default for Standard edition, and trace flag 845 must not be used.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,Windows,OnPremises,"[11.0,)",Warning -TF902,TF 902: Database Upgrade Bypass should be disabled,Disable trace flag 902 which bypasses database upgrade.,"['DefaultRuleset', 'TraceFlag', 'UpdateIssues']","Trace Flag 902 bypasses execution of database upgrade script when installing a Cumulative Update or Service Pack. - This trace flag is not supported to run it continuously in a production environment. +TF902,TF 902: Database Upgrade Bypass should be disabled,Disable trace flag 902 which bypasses database upgrade.,"['DefaultRuleset', 'TraceFlag', 'UpdateIssues']","Trace Flag 902 bypasses execution of database upgrade script when installing a Cumulative Update or Service Pack. + This trace flag is not supported to run it continuously in a production environment. If you encounter an error during script upgrade mode, it is recommended to contact Microsoft SQL Customer Service and Support (CSS) for further guidance.",https://support.microsoft.com/help/2163980,Server,Windows,OnPremises,,Warning -TF1117,TF 1117 Enables Filegroup-level Autogrow,Consider enabling trace flag 1117 to enable filegroup autogrow.,"['DefaultRuleset', 'TraceFlag', 'DBFileConfiguration', 'Performance']","Trace Flag 1117 initiates the growth of every file in the filegroup, when a file in the filegroup meets the autogrow threshold, and together with trace flag 1118, can help reduce allocation contention in the SQL Server TempDB database. +TF1117,TF 1117 Enables Filegroup-level Autogrow,Consider enabling trace flag 1117 to enable filegroup autogrow.,"['DefaultRuleset', 'TraceFlag', 'DBFileConfiguration', 'Performance']","Trace Flag 1117 initiates the growth of every file in the filegroup, when a file in the filegroup meets the autogrow threshold, and together with trace flag 1118, can help reduce allocation contention in the SQL Server TempDB database. This trace flag affects all databases and is recommended only if every database is safe to be grow all files in a filegroup by the same amount.",https://support.microsoft.com/help/2154845,Server,Windows,OnPremises,,Information -TF1118,TF 1118 Disables Single Page Allocations,Consider enabling trace flag 1118 to force page allocations on uniform extents.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'Pages']","Trace Flag 1118 forces page allocations on uniform extents instead of mixed extents, and together with trace flag 1117, can help reduce allocation contention in the SQL Server TempDB database. - When a new object is created, by default, the first eight pages are allocated from different extents (mixed extents). - Afterwards, when more pages are needed, those are allocated from that same extent (uniform extent). - The SGAM page is used to track these mixed extents, so can quickly become a bottleneck when numerous mixed page allocations are occurring. +TF1118,TF 1118 Disables Single Page Allocations,Consider enabling trace flag 1118 to force page allocations on uniform extents.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'Pages']","Trace Flag 1118 forces page allocations on uniform extents instead of mixed extents, and together with trace flag 1117, can help reduce allocation contention in the SQL Server TempDB database. + When a new object is created, by default, the first eight pages are allocated from different extents (mixed extents). + Afterwards, when more pages are needed, those are allocated from that same extent (uniform extent). + The SGAM page is used to track these mixed extents, so can quickly become a bottleneck when numerous mixed page allocations are occurring. This trace flag allocates all eight pages from the same extent when creating new objects, minimizing the need to scan the SGAM page and forces uniform extent allocations instead of mixed page allocations.",https://support.microsoft.com/help/328551,Server,Windows,OnPremises,,Information -TF1204,TF 1204 returns deadlock information,Trace Flag 1204 returns deadlock information.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1204 returns the resources and types of locks that are participating in a deadlock, including the affected command. +TF1204,TF 1204 returns deadlock information,Trace Flag 1204 returns deadlock information.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1204 returns the resources and types of locks that are participating in a deadlock, including the affected command. The resulting information is recorded in the SQL Server Errorlog.",https://support.microsoft.com/help/832524,Server,/^(Windows|Linux)$/,OnPremises,,Information -TF1211,TF 1211: Lock Escalation should be enabled,Disable trace flag 1211 to allow lock escalation.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1211 disables lock escalation based on memory pressure, or based on number of locks. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks. If the lock memory grows large enough, attempts to allocate additional locks for any query may fail and cause performance issues. +TF1211,TF 1211: Lock Escalation should be enabled,Disable trace flag 1211 to allow lock escalation.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1211 disables lock escalation based on memory pressure, or based on number of locks. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks. If the lock memory grows large enough, attempts to allocate additional locks for any query may fail and cause performance issues. This trace flag should not be used in order to avoid inability to allocate lock resources because of insufficient memory. If lock escalation needs to be disabled, use trace flag 1224 instead.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Warning -TF1222,TF 1222 returns deadlock information,Trace Flag 1222 returns deadlock information.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1222 returns the resources and types of locks that are participating in a deadlock, including the affected command. +TF1222,TF 1222 returns deadlock information,Trace Flag 1222 returns deadlock information.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1222 returns the resources and types of locks that are participating in a deadlock, including the affected command. The resulting information is recorded in the SQL Server Errorlog, in XML format that does not comply with any XSD schema.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Information TF1224,TF 1224 should be disabled,Disable trace flag 1224 to allow lock escalation.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1224 disables lock escalation based on the number of locks, unless SQL Server is under memory pressure. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Warning -TF1229,TF 1229: Lock Partitioning should be enabled,Disable trace flag 1229 to allow lock partitioning.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance', 'CPU']","Trace Flag 1229 disables lock partitioning regardless of the number of CPUs. By default, SQL Server enables lock partitioning when a server has 16 or more CPUs, to improve the scalability characteristics of larger systems. +TF1229,TF 1229: Lock Partitioning should be enabled,Disable trace flag 1229 to allow lock partitioning.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance', 'CPU']","Trace Flag 1229 disables lock partitioning regardless of the number of CPUs. By default, SQL Server enables lock partitioning when a server has 16 or more CPUs, to improve the scalability characteristics of larger systems. Disabling lock partitioning may cause can cause spinlock contention and poor performance, or unexpected behaviors when switching partitions.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Warning -TF1236,TF 1236: Database Lock Partitioning should be enabled,Enable trace Flag 1236 to allow database lock partitioning.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1236 enables database-level lock partitioning. +TF1236,TF 1236: Database Lock Partitioning should be enabled,Enable trace Flag 1236 to allow database lock partitioning.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1236 enables database-level lock partitioning. Lock Partitioning is utilized to improve the scalability characteristics on larger systems.",https://support.microsoft.com/help/2926217,Server,Windows,OnPremises,"[9.0,)",Warning -TF1462,TF 1462 should be disabled to allow Log Stream Compression,Disable trace flag 1462 to allow log stream compression.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'AvailabilityGroups']","Trace Flag 1462 disables log stream compression for asynchronous availability groups. +TF1462,TF 1462 should be disabled to allow Log Stream Compression,Disable trace flag 1462 to allow log stream compression.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'AvailabilityGroups']","Trace Flag 1462 disables log stream compression for asynchronous availability groups. This feature is enabled by default on asynchronous replicas to optimize network bandwidth.",https://docs.microsoft.com/sql/database-engine/availability-groups/windows/tune-compression-for-availability-group,Server,/^(Windows|Linux)$/,OnPremises,,Warning TF2312,TF 2312 sets the default Cardinality Estimation model,Trace Flag 2312 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 2312 sets the Query Optimizer cardinality estimation model to the default version of the database compability level of SQL Server 2014 and higher versions. If the database compatibility level is lower than 120, enabling trace flag 2312 uses the cardinality estimation model of SQL Server 2014 (120).",https://support.microsoft.com/help/2801413,Server,Windows,OnPremises,,Warning TF2330,TF 2330 disables recording of index usage stats,Trace Flag 2330 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Indexes']","Trace Flag 2330 disables recording of index usage stats, which could lead to a non-yielding condition in SQL 2005.",,Server,/^(Windows|Linux)$/,OnPremises,"[10.0,)",Warning -TF2340,TF 2340 disables Batch Sorts for optimized nested loops joins,Trace Flag 2340 disables Batch Sorts for optimized nested loops joins.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 2340 causes SQL Server not to use a sort operation (batch sort) for optimized nested loops joins when generating a plan. +TF2340,TF 2340 disables Batch Sorts for optimized nested loops joins,Trace Flag 2340 disables Batch Sorts for optimized nested loops joins.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 2340 causes SQL Server not to use a sort operation (batch sort) for optimized nested loops joins when generating a plan. Verify need to set a non-default trace flag with the current system build and configuration.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Information -TF2371,TF 2371 enables a linear recompilation threshold for statistics,Enable trace Flag 2371 to allow a linear recompilation threshold for statistics.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Statistics']","Trace Flag 2371 causes SQL Server to change the fixed update statistics threshold to a linear update statistics threshold. +TF2371,TF 2371 enables a linear recompilation threshold for statistics,Enable trace Flag 2371 to allow a linear recompilation threshold for statistics.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Statistics']","Trace Flag 2371 causes SQL Server to change the fixed update statistics threshold to a linear update statistics threshold. This is especially useful to keep statistics updated on large tables.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,Windows,OnPremises,"[10.5.2500,)",Information -TF2389,TF 2389 enables automatic statistics for Ascending Keys,Trace Flag 2389 enables automatic statistics for ascending keys. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance']","Trace Flag 2389 enables automatically generated quick statistics for ascending keys (histogram amendment). - This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time. +TF2389,TF 2389 enables automatic statistics for Ascending Keys,Trace Flag 2389 enables automatic statistics for ascending keys. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance']","Trace Flag 2389 enables automatically generated quick statistics for ascending keys (histogram amendment). + This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time. Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2801413,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Information -TF2390,TF 2390 enables automatic statistics for Ascending or Unknown Keys,Trace Flag 2390 enables automatic statistics for ascending or unknown keys. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance', 'Indexes']","Trace Flag 2390 enables automatically generated quick statistics for ascending or unknown keys (histogram amendment). - This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time. +TF2390,TF 2390 enables automatic statistics for Ascending or Unknown Keys,Trace Flag 2390 enables automatic statistics for ascending or unknown keys. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance', 'Indexes']","Trace Flag 2390 enables automatically generated quick statistics for ascending or unknown keys (histogram amendment). + This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time. Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2801413,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Information -TF2528,TF 2528 disables parallel operations for integrity checking,Trace Flag 2528 disables parallel operations for integrity checking.,"['DefaultRuleset', 'TraceFlag', 'DataIntegrity', 'DBCC']","Trace Flag 2528 disables parallel checking of objects by DBCC CHECKDB, DBCC CHECKFILEGROUP, and DBCC CHECKTABLE. - By default, the degree of parallelism is automatically determined by the query processor. The maximum degree of parallelism is configured just like that of parallel queries. - When parallel checks are disabled, the DBCC commands will take longer to complete. +TF2528,TF 2528 disables parallel operations for integrity checking,Trace Flag 2528 disables parallel operations for integrity checking.,"['DefaultRuleset', 'TraceFlag', 'DataIntegrity', 'DBCC']","Trace Flag 2528 disables parallel checking of objects by DBCC CHECKDB, DBCC CHECKFILEGROUP, and DBCC CHECKTABLE. + By default, the degree of parallelism is automatically determined by the query processor. The maximum degree of parallelism is configured just like that of parallel queries. + When parallel checks are disabled, the DBCC commands will take longer to complete. Starting with SQL Server 2014 SP2, a MAXDOP option is available to override the max degree of parallelism configuration option of sp_configure for the DBCC statements.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Warning -TF2549,TF 2549 optimizes PHYSICAL_ONLY option of DBCC CHECKDB,Trace Flag 2549 forces DBCC CHECKDB to treat different physical files as one logical file.,"['DefaultRuleset', 'TraceFlag', 'DBCC']","Trace Flag 2549 forces the DBCC CHECKDB command to assume each database file is on a unique disk drive but treating different physical files as one logical file. +TF2549,TF 2549 optimizes PHYSICAL_ONLY option of DBCC CHECKDB,Trace Flag 2549 forces DBCC CHECKDB to treat different physical files as one logical file.,"['DefaultRuleset', 'TraceFlag', 'DBCC']","Trace Flag 2549 forces the DBCC CHECKDB command to assume each database file is on a unique disk drive but treating different physical files as one logical file. This trace flag can improve the performance when using the PHYSICAL_ONLY option, but it's not recommended unless it is known that each file is based on a unique physical disk.",https://support.microsoft.com/help/2634571,Server,/^(Windows|Linux)$/,OnPremises,,Warning -TF2562,TF 2562 forces the DBCC CHECKDB command to execute in a single batch,Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch.,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'TempDB']","Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch regardless of the number of indexes in the database. +TF2562,TF 2562 forces the DBCC CHECKDB command to execute in a single batch,Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch.,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'TempDB']","Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch regardless of the number of indexes in the database. This trace flag can improve the performance when using the PHYSICAL_ONLY option, but space requirements for TempDB may increase.",https://support.microsoft.com/help/2634571,Server,/^(Windows|Linux)$/,OnPremises,,Warning -TF2566,TF 2566 disables default data purity check,Trace Flag 2566 disables default data purity check.,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'DataIntegrity']","Trace Flag 2566 forces the DBCC CHECKDB command to execute without data purity check unless the DATA_PURITY option is specified. +TF2566,TF 2566 disables default data purity check,Trace Flag 2566 disables default data purity check.,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'DataIntegrity']","Trace Flag 2566 forces the DBCC CHECKDB command to execute without data purity check unless the DATA_PURITY option is specified. For databases upgraded from earlier versions of SQL Server, it is recommended to run the DBCC CHECKDB WITH DATA_PURITY command at least once, to enable column-value integrity checks to happen by default.",https://support.microsoft.com/help/945770,Server,/^(Windows|Linux)$/,OnPremises,,Warning -TF3023,TF 3023 enables Backup Checksum option by default,Trace Flag 3023 enables CHECKSUM option as default for BACKUP command.,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3023 enables the CHECKSUM option of the BACKUP command by default. - This trace flag forces the CHECKSUM option for BACKUP command even when not explicitely set. +TF3023,TF 3023 enables Backup Checksum option by default,Trace Flag 3023 enables CHECKSUM option as default for BACKUP command.,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3023 enables the CHECKSUM option of the BACKUP command by default. + This trace flag forces the CHECKSUM option for BACKUP command even when not explicitely set. Starting with SQL Server 2014, this behavior is controlled by setting the Backup Checksum Default configuration option.",https://support.microsoft.com/help/2656988,Server,Windows,OnPremises,,Information -TF3042,TF 3042 bypasses the default backup compression pre-allocation algorithm,Trace Flag 3042 enables the bypass of the default backup compression.,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3042 bypasses the default backup compression pre-allocation algorithm to allow the backup file to grow only as needed to reach its final size. +TF3042,TF 3042 bypasses the default backup compression pre-allocation algorithm,Trace Flag 3042 enables the bypass of the default backup compression.,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3042 bypasses the default backup compression pre-allocation algorithm to allow the backup file to grow only as needed to reach its final size. This trace flag can achieve space savings by allocating only the actual size required for the compressed backup, but might increase the overall backup operation time.",https://docs.microsoft.com/sql/relational-databases/backup-restore/backup-compression-sql-server,Server,/^(Windows|Linux)$/,OnPremises,,Information -TF3226,TF 3226 disables ErrorLog entries for every successful backup operation,Trace Flag 3226 disables ErrorLog entries for every successful backup operation.,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3226 prevents SQL Server from recording an entry to the Errorlog on every successful backup operation. +TF3226,TF 3226 disables ErrorLog entries for every successful backup operation,Trace Flag 3226 disables ErrorLog entries for every successful backup operation.,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3226 prevents SQL Server from recording an entry to the Errorlog on every successful backup operation. Backup operations are registered in the Errorlog by default. Frequent backup operations can contribute to massive Errorlog files that become unwieldy.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Information TF4136,TF 4136 disables Parameter Sniffing,Trace Flag 4136 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag']","Trace Flag 4136 disables parameter sniffing unless OPTION(RECOMPILE), WITH RECOMPILE or OPTIMIZE FOR value is used, but does not apply to this SQL Server version. Starting with SQL Server 2016, to accomplish this at the database level use the PARAMETER_SNIFFING option in ALTER DATABASE SCOPED CONFIGURATION. Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/980653,Server,/^(Windows|Linux)$/,OnPremises,,Warning -TF4137,TF 4137 causes plans to use partial correlation for filters,Trace flag 4137 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 4137 causes SQL Server to generate a plan using minimum selectivity when estimating AND predicates for filters to account for partial correlation instead of independence, under the query optimizer cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). However it does not apply to this SQL Server version. - Does not apply to CE version 120 or above. Use trace flag 9471 instead. - Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'ASSUME_MIN_SELECTIVITY_FOR_FILTER_ESTIMATES' query hint. +TF4137,TF 4137 causes plans to use partial correlation for filters,Trace flag 4137 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 4137 causes SQL Server to generate a plan using minimum selectivity when estimating AND predicates for filters to account for partial correlation instead of independence, under the query optimizer cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). However it does not apply to this SQL Server version. + Does not apply to CE version 120 or above. Use trace flag 9471 instead. + Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'ASSUME_MIN_SELECTIVITY_FOR_FILTER_ESTIMATES' query hint. Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2658214,Server,/^(Windows|Linux)$/,OnPremises,,Warning -TF4138,TF 4138 causes plans to not use Row Goal adjustments,Trace flag 4138 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 4138 causes SQL Server to generate a plan that does not use row goal adjustments with queries that contain TOP, OPTION (FAST N), IN, or EXISTS keywords. - Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'DISABLE_OPTIMIZER_ROWGOAL' query hint. However it does not apply to this SQL Server version. +TF4138,TF 4138 causes plans to not use Row Goal adjustments,Trace flag 4138 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 4138 causes SQL Server to generate a plan that does not use row goal adjustments with queries that contain TOP, OPTION (FAST N), IN, or EXISTS keywords. + Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'DISABLE_OPTIMIZER_ROWGOAL' query hint. However it does not apply to this SQL Server version. Verify need to set a Non-default trace flag with current system build and configuration.",https://support.microsoft.com/help/2667211,Server,/^(Windows|Linux)$/,OnPremises,,Warning -TF4139,TF 4139 enables automatic statistics for any key ordering,Trace flag 4139 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Statistics']","Trace Flag 4139 enables automatically generated quick statistics (histogram amendment) regardless of key column status. - However, this trace flag does not apply to this SQL Server version. +TF4139,TF 4139 enables automatic statistics for any key ordering,Trace flag 4139 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Statistics']","Trace Flag 4139 enables automatically generated quick statistics (histogram amendment) regardless of key column status. + However, this trace flag does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2952101,Server,/^(Windows|Linux)$/,OnPremises,,Warning TF4199,TF 4199 enables Query Optimizer fixes,Trace Flag 4199 enables Query Optimizer fixes. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer']",Trace Flag 4199 enables Query Optimizer fixes released in SQL Server Cumulative Updates and Service Packs.,http://support.microsoft.com/help/974006,Server,/^(Windows|Linux)$/,OnPremises,"[9.0.4035,)",Information -TF6498,TF 6498 enables additional concurrent large queries,Trace Flag 6498 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory']","Trace Flag 6498 enables more than one large query compilation to gain access to the big gateway when there is sufficient memory available. - However, this trace flag does not apply to this SQL Server version. - This trace flag can be used to keep memory usage for the compilation of incoming queries under control, avoiding compilation waits for concurrent large queries. +TF6498,TF 6498 enables additional concurrent large queries,Trace Flag 6498 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory']","Trace Flag 6498 enables more than one large query compilation to gain access to the big gateway when there is sufficient memory available. + However, this trace flag does not apply to this SQL Server version. + This trace flag can be used to keep memory usage for the compilation of incoming queries under control, avoiding compilation waits for concurrent large queries. Starting with SQL Server 2014 SP2 and SQL Server 2016, this behavior is controlled by the engine and trace flag 1236 has no effect.",https://support.microsoft.com/help/3024815,Server,Windows,OnPremises,,Warning -TF6532,TF 6532 enables performance improvements for Spatial data,Enable trace flag 6532 to enable performance improvements for Spatial data.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 6532 enables performance improvements of query operations with spatial data types. +TF6532,TF 6532 enables performance improvements for Spatial data,Enable trace flag 6532 to enable performance improvements for Spatial data.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 6532 enables performance improvements of query operations with spatial data types. The performance gain will vary, depending on the configuration, the types of queries, and the objects.",https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,"['[11.0.6020,11.0.6518)']",Information -TF6532.6533,TF 6532 and TF 6533 enable performance improvements for Spatial data,Trace flags 6532 and 6533 do not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace flags 6532 and 6533 enable performance improvements of query operations with spatial data types. - However, this trace flag does not apply to this SQL Server version. +TF6532.6533,TF 6532 and TF 6533 enable performance improvements for Spatial data,Trace flags 6532 and 6533 do not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace flags 6532 and 6533 enable performance improvements of query operations with spatial data types. + However, this trace flag does not apply to this SQL Server version. Starting with SQL Server 2016, this behavior is controlled by the engine and trace flags 6532 and 6533 have no effect.",https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,,Warning -TF6534,TF 6534 enables performance improvements for Spatial data,Trace flag 6534 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 6534 enables performance improvement of query operations with spatial data types. - However, this trace flag does not apply to this SQL Server version. +TF6534,TF 6534 enables performance improvements for Spatial data,Trace flag 6534 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 6534 enables performance improvement of query operations with spatial data types. + However, this trace flag does not apply to this SQL Server version. Verify need to set a Non-default trace flag with current system build and configuration.",https://support.microsoft.com/help/3107399,Server,Windows,OnPremises,,Warning TF7412,TF 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting,Enable trace flag 7412 to enables the lightweight profiling infrastructure for live query performance troubleshooting.,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace Flag 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting. Consider enabling TF 7412 to have the ability to access runtime information on query execution plans for any session.,https://docs.microsoft.com/sql/relational-databases/performance/query-profiling-infrastructure,Server,/^(Windows|Linux)$/,OnPremises,"[13.0.4001,15.0)",Information TF9024,TF 9024 converts a global log pool memory object into NUMA node partitioned memory object.,Verify need to set a Non-default TF with current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'Memory', 'CPU']",TF9024 converts a global log pool memory object into NUMA node partitioned memory object.,https://support.microsoft.com/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,Server,Windows,OnPremises,,Warning TF8048,TF 8048 converts NUMA partitioned memory objects into CPU partitioned,Verify need to set a Non-default TF with current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'CPU', 'Memory']",TF 8048 converts NUMA partitioned memory objects into CPU partitioned.,https://support.microsoft.com/en-us/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,Server,Windows,OnPremises,,Warning DeprecatedFeatures,Deprecated or discontinued features should not be used,Detected deprecated or discontinued feature uses: @{DeprecatedFeature}. We recommend to replace them with features actual for SQL Server version @{ProductVersion}.,"['DefaultRuleset', 'Deprecated', 'Security', 'UpdateIssues', 'Performance']",This check detects deprecated or discontinued features used on target SQL Server instance. Deprecated features may be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning -SystemHealthSession,system_health XEvent session is not active,Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,"['DefaultRuleset', 'XEvent', 'SystemHealth']","This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. +SystemHealthSession,system_health XEvent session is not active,Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,"['DefaultRuleset', 'XEvent', 'SystemHealth']","This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. We recommend that you do not stop, alter, or delete the system health session.",https://docs.microsoft.com/sql/relational-databases/extended-events/use-the-system-health-session,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning -SPServerDiagnosticsSession,sp_server_diagnostics xEvent session is not active,Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,"['DefaultRuleset', 'XEvent', 'SystemHealth']","This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. +SPServerDiagnosticsSession,sp_server_diagnostics xEvent session is not active,Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,"['DefaultRuleset', 'XEvent', 'SystemHealth']","This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine. We recommend that you do not stop, alter, or delete the system health session.",https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-server-diagnostics-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Warning BlackboxTrace,Blackbox trace is configured and running,Make sure you still need the blackbox trace and stop it otherwise.,"['DefaultRuleset', 'Traces']","This trace is designed to behave similarly to an airplane black box, to help you diagnose intermittent server crashes. It consumes more resources than the default trace and should not be running for extended periods of time.",https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-trace-create-transact-sql,Server,/^(Windows|Linux)$/,OnPremises,,Warning DefaultTrace,No default trace was found or is not active,Make sure that there is enough space for SQL Server to write the default trace file. Then have the default trace run by disabling and re-enabling it.,"['DefaultRuleset', 'Traces']",Default trace provides troubleshooting assistance to database administrators by ensuring that they have the log data necessary to diagnose problems the first time they occur.,https://docs.microsoft.com/sql/relational-databases/policy-based-management/default-trace-log-files-disabled,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning @@ -127,8 +127,8 @@ PageVerify,PAGE_VERIFY option should be CHECKSUM,Set PAGE_VERIFY option to CHECK DbChaining,Cross-Database Access should be disabled,Set DB_CHAINING option to OFF.,"['DefaultRuleset', 'DBConfiguration', 'Security']",Ownership chaining across databases is turned off by default. Microsoft recommends that you disable cross-database ownership chaining because it exposes you to the additional security risks.,https://docs.microsoft.com/dotnet/framework/data/adonet/sql/enabling-cross-database-access-in-sql-server,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning AutoCreateStatsIncremental,Incremental option of auto stats should be ON,Set AUTO_CREATE_STATISTICS to ON and set INCREMENTAL to ON,"['DefaultRuleset', 'DBConfiguration', 'Statistics', 'Performance']","Incremental statistics update at partition level is a feature introduced in SQL Server 2014. When the option INCREMENTAL is turn on at the database level, newly auto created column statistics will use incremental statistics on partitioned tables by default.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance","[12.0,)",Warning TrustWorthy,TRUSTWORTHY should be OFF,Set TRUSTWORTHY option to OFF,"['DefaultRuleset', 'DBConfiguration', 'Security']","You can use the TRUSTWORTHY database setting to indicate whether the instance of Microsoft SQL Server trusts the database and the contents within the database. By default, this setting is set to OFF to mitigate certain threats that may be present when a database is attached to the server.",https://support.microsoft.com/help/2183687/guidelines-for-using-the-trustworthy-database-setting-in-sql-server,Database,/^(Windows|Linux)$/,OnPremises,,Warning -ParameterizationNotSimple,PARAMETERIZATION should be SIMPLE,"Set PARAMETERIZATION = SIMPLE and use forced parameterization only on a certain class of queries, instead of all queries","['DefaultRuleset', 'DBConfiguration', 'Performance', 'QueryOptimizer']","When the PARAMETERIZATION database option is set to SIMPLE, the SQL Server query optimizer may choose to parameterize the queries. This means that any literal values that are contained in a query are substituted with parameters. This process is referred to as simple parameterization. When SIMPLE parameterization is in effect, you cannot control which queries are parameterized and which queries are not. However, you can specify that all queries in a database be parameterized by setting the PARAMETERIZATION database option to FORCED. - +ParameterizationNotSimple,PARAMETERIZATION should be SIMPLE,"Set PARAMETERIZATION = SIMPLE and use forced parameterization only on a certain class of queries, instead of all queries","['DefaultRuleset', 'DBConfiguration', 'Performance', 'QueryOptimizer']","When the PARAMETERIZATION database option is set to SIMPLE, the SQL Server query optimizer may choose to parameterize the queries. This means that any literal values that are contained in a query are substituted with parameters. This process is referred to as simple parameterization. When SIMPLE parameterization is in effect, you cannot control which queries are parameterized and which queries are not. However, you can specify that all queries in a database be parameterized by setting the PARAMETERIZATION database option to FORCED. + Regardless of whether you have a Plan-Stability or not, SQL Server will always auto parameterize your SQL Statements, and reuse the cached execution plan over and over again. It doesn't matter how terrible the execution plan is. Therefore you have to know in exact detail the shape of your execution plans, and whether they can lead to some performance related problems.",https://docs.microsoft.com/sql/relational-databases/performance/specify-query-parameterization-behavior-by-using-plan-guides,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning TempDBFilesNotSameSize,TempDB data files are not the same size,Make all TempDB data files the same size,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']",We recommend that you create all TempDB data files at the same size.,https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,,Warning TempDBFilesMultiple4,Number of TempDB data files should be in multiples of 4,Make sure number of TempDB data files is in multiples of 4,"['DefaultRuleset', 'TempDB', 'Performance', 'DBFileConfiguration']","Number of TempDB data files should correlate with the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 until the contention is reduced to acceptable levels or make changes to the workload/code.",https://support.microsoft.com/kb/2154845,Server,/^(Windows|Linux)$/,OnPremises,,Warning @@ -152,10 +152,10 @@ AgentAlertsSeverity22,Agent doesn't rise alerts for errors with severity 22,Cons AgentAlertsSeverity23,Agent doesn't rise alerts for errors with severity 23,Consider creating alerts for the following errors: @{error_ids},"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",,Warning AgentAlertsSeverity24,Agent doesn't rise alerts for errors with severity 24,Consider creating alerts for the following errors: @{error_ids},"['DefaultRuleset', 'Agent']","Events are generated by SQL Server and entered into the Microsoft Windows application log. SQL Server Agent reads the application log and compares events written there to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert, which is an automated response to an event. In addition to monitoring SQL Server events, SQL Server Agent can also monitor performance conditions and Windows Management Instrumentation (WMI) events.",https://docs.microsoft.com/sql/ssms/agent/alerts,Server,Windows,"OnPremises, ManagedInstance",,Warning WeakPassword,Weak password,Make sure to set strong passwords on the following logins: @{PasswordData},"['DefaultRuleset', 'Security', 'WeakPassword']",Some user logins have weak passwords.,https://docs.microsoft.com/sql/relational-databases/security/strong-passwords,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning -VLFCount,VLF count,Update transaction log settings to reduce the number of VLFs (current number is: @{RecoveryUnitId}),"['DefaultRuleset', 'Backup', 'Performance']","The SQL Server Database Engine divides each physical log file internally into a number of virtual log files (VLFs). Virtual log files have no fixed size, and there is no fixed number of virtual log files for a physical log file. The Database Engine chooses the size of the virtual log files dynamically while it is creating or extending log files. The Database Engine tries to maintain a small number of virtual files. The size of the virtual files after a log file has been extended is the sum of the size of the existing log and the size of the new file increment. The size or number of virtual log files cannot be configured or set by administrators. - - If the log files grow to a large size in many small increments, they will have many virtual log files. This can slow down database startup and also log backup and restore operations. Conversely, if the log files are set to a large size with few or just one increment, they will have few very large virtual log files. - +VLFCount,VLF count,Update transaction log settings to reduce the number of VLFs (current number is: @{RecoveryUnitId}),"['DefaultRuleset', 'Backup', 'Performance']","The SQL Server Database Engine divides each physical log file internally into a number of virtual log files (VLFs). Virtual log files have no fixed size, and there is no fixed number of virtual log files for a physical log file. The Database Engine chooses the size of the virtual log files dynamically while it is creating or extending log files. The Database Engine tries to maintain a small number of virtual files. The size of the virtual files after a log file has been extended is the sum of the size of the existing log and the size of the new file increment. The size or number of virtual log files cannot be configured or set by administrators. + + If the log files grow to a large size in many small increments, they will have many virtual log files. This can slow down database startup and also log backup and restore operations. Conversely, if the log files are set to a large size with few or just one increment, they will have few very large virtual log files. + We recommend that you assign log files a size value close to the final size required, using the required increments to achieve optimal VLF distribution, and also have a relatively large growth_increment value.",https://docs.microsoft.com/sql/relational-databases/sql-server-transaction-log-architecture-and-management-guide,Database,Windows,"OnPremises, ManagedInstance",,Warning TF8015,TF 8015 disables auto-detection and NUMA setup,Disable trace flag 8015 for this SQL Server instance. This TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'CPU', 'NUMA']","SQL Server allows you to group CPUs into nodes referred to as soft-NUMA. You usually configure soft-NUMA when you have many CPUs and do not have hardware NUMA, but you can also use soft-NUMA to subdivide hardware NUMA nodes into smaller groups.",https://techcommunity.microsoft.com/t5/SQL-Server-Support/How-It-Works-Soft-NUMA-I-O-Completion-Thread-Lazy-Writer-Workers/ba-p/316044,Server,Windows,OnPremises,"(,11.0.3349)",Warning TF8032,TF 8032 reverts the cache limit parameters to the SQL Server 2005 RTM,The cache limit parameters reverted to the SQL Server 2005 RTM setting but can cause poor performance if large caches make less memory available for other memory consumers like BP,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace Flag 8032 reverts the cache limit parameters to the SQL Server 2005 RTM setting but can cause poor performance if large caches make less memory available for other memory consumers like BP.,,Server,Windows,OnPremises,"[10.0,)",Warning @@ -179,11 +179,11 @@ IndexKeyGuid,Guid in clustered index key column,Get rid of GUIDs in the followin IndexesLargeKeys,Indexes keys with more than 900 bytes,Get rid of keys larger than 900 bytes in index @{FullName},"['DefaultRuleset', 'Indexes', 'Performance']","When you design an index that contains many key columns, or large-size columns, calculate the size of the index key to make sure that you do not exceed the maximum index key size. SQL Server retains the 900-byte limit for the maximum total size of all index key columns. This excludes nonkey columns that are included in the definition of nonclustered indexes.",http://msdn.microsoft.com/library/ms191241.aspx,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning DisabledIndexes,Disabled Indexes exist,Remove or enable this disabled index: @{FullName},"['DefaultRuleset', 'Indexes', 'Performance']","If you need to load a lot of data quickly, you can disable nonclustered indexes in order to improve performance. After the data load finishes, enable the nonclustered indexes again by rebuilding them. This technique works best in large data warehouse environments where entire dimension tables might be reloaded from scratch every night. Disabling nonclustered indexes is safer than dropping and recreating them because scripting indexes is hard. Unfortunately, sometimes our load processes crash before enabling the indexes again, or sometimes we manually load data and we forget to rebuild them.",https://docs.microsoft.com/sql/relational-databases/indexes/disable-indexes-and-constraints,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning IndexesFillFactor,Index fill factor lower 80%,Review index @{FullName} as its fill factor @{FillFactor} is lower than 80 percent,"['DefaultRuleset', 'Indexes', 'Performance']","The fill-factor option is provided for fine-tuning index data storage and performance. When an index is created or rebuilt, the fill-factor value determines the percentage of space on each leaf-level page to be filled with data, reserving the remainder on each page as free space for future growth. For example, specifying a fill-factor value of 80 means that 20 percent of each leaf-level page will be left empty, providing space for index expansion as data is added to the underlying table. The empty space is reserved between the index rows rather than at the end of the index.",https://docs.microsoft.com/sql/relational-databases/indexes/specify-fill-factor-for-an-index,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning -NonUniqueClusterIndex,Non-unique clustered indexes,Review this clustered index @{FullName} as it is non-unique,"['DefaultRuleset', 'Indexes', 'Performance']","Index uniqueness is highly desirable attribute of a clustering key, and goes hand-in-hand with index narrowness. SQL Server does not require a clustered index to be unique, but yet it must have some means of uniquely identifying every row. That’s why, for non-unique clustered indexes, SQL Server adds to every duplicate instance of a clustering key value a 4-byte integer value called a uniqueifier. This uniqueifier is added everywhere the clustering key is stored. That means the uniqueifier is stored in both clustered and non-clustered indexes. As you can imagine, if there are many rows using the same clustering key value, this can become quite expensive.",https://docs.microsoft.com/sql/relational-databases/indexes/clustered-and-nonclustered-indexes-described,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +NonUniqueClusterIndex,Non-unique clustered indexes,Review this clustered index @{FullName} as it is non-unique,"['DefaultRuleset', 'Indexes', 'Performance']","Index uniqueness is highly desirable attribute of a clustering key, and goes hand-in-hand with index narrowness. SQL Server does not require a clustered index to be unique, but yet it must have some means of uniquely identifying every row. ThatÂ’s why, for non-unique clustered indexes, SQL Server adds to every duplicate instance of a clustering key value a 4-byte integer value called a uniqueifier. This uniqueifier is added everywhere the clustering key is stored. That means the uniqueifier is stored in both clustered and non-clustered indexes. As you can imagine, if there are many rows using the same clustering key value, this can become quite expensive.",https://docs.microsoft.com/sql/relational-databases/indexes/clustered-and-nonclustered-indexes-described,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning SuspectPages,Suspect pages,Run DBCC CHECKDB to verify affected database. Suspect pages were found: @{EventType},"['DefaultRuleSet', 'Pages', 'DataIntegrity']","The suspect_pages table is used for maintaining information about suspect pages, and is relevant in helping to decide whether a restore is necessary.",https://docs.microsoft.com/sql/relational-databases/backup-restore/manage-the-suspect-pages-table-sql-server,Database,/^(Windows|Linux)$/,,,Warning SparseFiles,Sparse files,Get rid of sparse files: @{SparseFiles},"['DefaultRuleSet', 'Snapshots', 'Backup', 'DataIntegrity']","If the file is sparse or compressed, the NTFS file system may deallocate disk space in the file. This sets the range of bytes to zeroes (0) without extending the file size.","https://blogs.msdn.microsoft.com/jorgepc/2010/11/25/what-are-sparse-files-and-why-should-i-care-as-sql-server-dba/, https://techcommunity.microsoft.com/t5/SQL-Server-Support/Did-your-backup-program-utility-leave-your-SQL-Server-running-in/ba-p/315840",Database,/^(Windows|Linux)$/,,,Warning -TableNoIndex,Tables without indexes,Review table @{TableName} and create reasonable indexes,"['DefaultRuleset', 'Indexes', 'Performance']","Each table in the database has one or more pages. To keep track of those pages, SQL Server uses a special set of pages, called IAM (for Index Allocation Map) pages. In spite of the word “Index” in the name, IAMs are used for non-indexed tables as well. These are called heaps. All the data is there, but the only way to find anything is to read it starting at the beginning. For a very large table, this will be terribly inefficient.",https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning -TableNoClusteredIndex,Tables without clustered indexes,Review table @{TableName} and consider creating a clustered index,"['DefaultRuleset', 'Indexes', 'Performance']","Tables without clustered indexes are called heaps. They’re scattered on disk anywhere that SQL Server can find a spot, and they’re not stored in any order whatsoever. This can make for really fast inserts – SQL Server can just throw the data down – but slow selects, updates, and deletes.",https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +TableNoIndex,Tables without indexes,Review table @{TableName} and create reasonable indexes,"['DefaultRuleset', 'Indexes', 'Performance']","Each table in the database has one or more pages. To keep track of those pages, SQL Server uses a special set of pages, called IAM (for Index Allocation Map) pages. In spite of the word “Index” in the name, IAMs are used for non-indexed tables as well. These are called heaps. All the data is there, but the only way to find anything is to read it starting at the beginning. For a very large table, this will be terribly inefficient.",https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning +TableNoClusteredIndex,Tables without clustered indexes,Review table @{TableName} and consider creating a clustered index,"['DefaultRuleset', 'Indexes', 'Performance']","Tables without clustered indexes are called heaps. TheyÂ’re scattered on disk anywhere that SQL Server can find a spot, and theyÂ’re not stored in any order whatsoever. This can make for really fast inserts – SQL Server can just throw the data down – but slow selects, updates, and deletes.",https://docs.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning TablePSAlign,Table index not aligned with PS,Consider recreating index @{IndexName} in table @{TableName} to have it aligned with your schema,"['DefaultRuleset', 'Indexes', 'Performance']","Table partitioning is a complex way to break out your large tables into smaller, more manageable chunks, but it comes with a lot of management heartache. One of the challenges is making sure that your indexes are partitioned and aligned the same way as your clustered index.",https://docs.microsoft.com/sql/relational-databases/partitions/partitioned-tables-and-indexes,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning LoginNoPassword,Logins with no passwords,Make sure to set strong passwords on the following logins: @{PasswordData},"['DefaultRuleset', 'Security', 'WeakPassword']",Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.,https://docs.microsoft.com/sql/relational-databases/security/password-policy,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning LoginEqPassword,Logins with passwords that are same as the login names,Please review logins with password equals to login: @{PasswordData},"['DefaultRuleset', 'Security', 'WeakPassword']",Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.,https://docs.microsoft.com/sql/relational-databases/security/password-policy,Server,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning @@ -191,3 +191,4 @@ SystemHealth,System Health important messages,Error @{Error_Number} has occured RarelyUsedIndex,Rarely used index,Make sure you need index @{IndexName} as it's used too rarely,"['DefaultRuleset', 'Indexes', 'Performance']","Rarely used indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used quite often. It makes sense to compare impact of writing operations versus rare reading speedup.",https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning UnusedIndex,Unused index,Make sure you need index @{IndexName} as it's unused,"['DefaultRuleset', 'Index', 'Performance']","Unused indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used anywhere.",https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning SkewedCompatibilityLevel,Database with skewed compatibility level,Update database compatibility level (current level: @{CompatibilityLevel}),"['DefaultRuleset', 'CompatibilityLevel', 'Security', 'Performance', 'UpdateIssues']",Some databases may have a compatibility level lower than the allowed level by the Database Engine.,https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-compatibility-level,Database,/^(Windows|Linux)$/,,,Warning + From 361ad3358cf89d6718052eac68fa963cb606c7df Mon Sep 17 00:00:00 2001 From: Alex Protsenko <53046834+alexprotsenko@users.noreply.github.com> Date: Tue, 5 Nov 2019 17:22:14 +0300 Subject: [PATCH 6/7] Shrank TF9476 display name --- samples/manage/sql-assessment-api/DefaultRuleset.csv | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/samples/manage/sql-assessment-api/DefaultRuleset.csv b/samples/manage/sql-assessment-api/DefaultRuleset.csv index ce9d38fdce..a188d21eae 100644 --- a/samples/manage/sql-assessment-api/DefaultRuleset.csv +++ b/samples/manage/sql-assessment-api/DefaultRuleset.csv @@ -163,7 +163,7 @@ TF8744,TF 8744 disables pre-fetching for the Nested Loop operator,Disable trace TF9347,TF 9347 disables batch mode for sort operator,Disable trace flag 9347 for this SQL Server instance. This TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace flag 9347 disables batch mode for sort operator. SQL Server 2016 (13.x) introduced a new batch mode sort operator that boosts performance for many analytical queries.,,Server,Windows,OnPremises,"(,13.0)",Warning TF9349,TF 9349 disables batch mode for top N sort operator,Disable trace flag 9349 for this SQL Server instance. This TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace flag 9349 disables batch mode for top N sort operator. SQL Server 2016 (13.x) introduced a new batch mode top sort operator that boosts performance for many analytical queries.,,Server,Windows,OnPremises,"(,13.0)",Warning TF9389,TF 9389 enables dynamic memory grant for batch mode operators,Disable trace flag 9389 for this SQL Server instance. The TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'Performance', 'TempDB']","Trace flag 9389 enables additional dynamic memory grant for batch mode operators. If a query does not get all the memory it needs, it spills data to TempDB, incurring additional I/O and potentially impacting query performance. If the dynamic memory grant trace flag is enabled, a batch mode operator may ask for additional memory and avoid spilling to TempDB if additional memory is available.",,Server,Windows,"OnPremises, ManagedInstance","(,13.0)",Warning -TF9476,TF 9476 causes SQL Server to generate a plan using the Simple Containment instead of the default Base Containment under New CE,Disable trace flag 9476 for this SQL Server instance. The TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'Performance', 'QueryOptimizer']","Trace flag 9476 causes SQL Server to generate a plan using the Simple Containment assumption instead of the default Base Containment assumption, under the query optimizer cardinality estimation model of SQL Server 2014 (12.x) through SQL Server 2017 versions.",,Server,Windows,OnPremises,"(,13.0)",Warning +TF9476,TF 9476 causes SQL Server to generate a plan using the Simple Containment,Disable trace flag 9476 for this SQL Server instance. The TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'Performance', 'QueryOptimizer']","Trace flag 9476 causes SQL Server to generate a plan using the Simple Containment assumption instead of the default Base Containment assumption, under the query optimizer cardinality estimation model of SQL Server 2014 (12.x) through SQL Server 2017 versions.",,Server,Windows,OnPremises,"(,13.0)",Warning TF9481,"TF 9481 enables Legacy CE model, irrespective of the compatibility level of the database",Disable trace flag 9481 for this SQL Server instance. The TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace flag 9481 enables you to set the query optimizer cardinality estimation model to the SQL Server 2012 (11.x) and earlier versions, irrespective of the compatibility level of the database.",,Server,Windows,OnPremises,"(,12.0)",Warning TF10204,TF 10204 disables merge/recompress during columnstore index reorganization,Disable trace flag 10204 for this SQL Server instance. The TF does not apply to this SQL Server version,"['DefaultRuleset', 'TraceFlag', 'Performance', 'ColumnStore']","Trace flag 10204 disables merge/recompress during columnstore index reorganization. In SQL Server 2016 (13.x), when a columnstore index is reorganized, there is new functionality to automatically merge any small compressed rowgroups into larger compressed rowgroups, as well as recompressing any rowgroups that have a large number of deleted rows.",,Server,Windows,OnPremises,"(,13.0)",Warning SPNaming,Stored Procedure Naming,Rename the following stored procedures to get rid of the sp_ prefix: @{ObjectName},"['DefaultRuleset', 'Naming']","In SQL Server, the sp_ prefix designates system stored procedures. If you use that prefix for your stored procedures, the name of your procedure might conflict with the name of a system stored procedure that will be created in the future. If such a conflict occurs, your application might break if your application refers to the procedure without qualifying the reference by schema. In this situation, the name will bind to the system procedure instead of to your procedure.",https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/dd172115(v=vs.100),Database,Windows,"OnPremises, ManagedInstance",,Warning @@ -191,4 +191,3 @@ SystemHealth,System Health important messages,Error @{Error_Number} has occured RarelyUsedIndex,Rarely used index,Make sure you need index @{IndexName} as it's used too rarely,"['DefaultRuleset', 'Indexes', 'Performance']","Rarely used indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used quite often. It makes sense to compare impact of writing operations versus rare reading speedup.",https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning UnusedIndex,Unused index,Make sure you need index @{IndexName} as it's unused,"['DefaultRuleset', 'Index', 'Performance']","Unused indexes can slow down database's performance. Time of write operations is increased because of index maintenance, but index is not used anywhere.",https://docs.microsoft.com/sql/t-sql/statements/drop-index-transact-sql,Database,/^(Windows|Linux)$/,"OnPremises, ManagedInstance",,Warning SkewedCompatibilityLevel,Database with skewed compatibility level,Update database compatibility level (current level: @{CompatibilityLevel}),"['DefaultRuleset', 'CompatibilityLevel', 'Security', 'Performance', 'UpdateIssues']",Some databases may have a compatibility level lower than the allowed level by the Database Engine.,https://docs.microsoft.com/sql/t-sql/statements/alter-database-transact-sql-compatibility-level,Database,/^(Windows|Linux)$/,,,Warning - From 41eaee5d28cf99664a856d9a85f15370d0977de2 Mon Sep 17 00:00:00 2001 From: Alex Protsenko <53046834+alexprotsenko@users.noreply.github.com> Date: Tue, 5 Nov 2019 17:32:51 +0300 Subject: [PATCH 7/7] updated README.MD with description of DefaultRuleset.csv --- samples/manage/sql-assessment-api/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/manage/sql-assessment-api/README.md b/samples/manage/sql-assessment-api/README.md index 2e2c093511..b772b03d5b 100644 --- a/samples/manage/sql-assessment-api/README.md +++ b/samples/manage/sql-assessment-api/README.md @@ -16,6 +16,10 @@ This is the default set of rules shipped with SQL Assessment API. Feel free to o This folder contains two Azure Data Studio notebooks, one is for a quick start with SQL Assessment API and the other is a comprehensive tutorial that will step you through all the features of SQL Assessment API including customizing the existing rules and creating your own ones. The notebooks is written for the powershell kernel in Azure Data Studio, so make sure you use [ADS 1.13.0](https://docs.microsoft.com/sql/azure-data-studio/download) or newer. +## DefaultRuleset.csv + +This is a readable version of the default ruleset so you can familiarize yourself with the existing rules. GitHub renders .csv files as an interactive table and provides convenient search and row filtering. + ## DisablingBuiltInChecks_sample.json Contains three parts. First shows how you can disable a specified rule by its ID. The second disables all the rules with the "TraceFlag" tag. The last disables to run all rules of the default ruleset (using the DefaultRuleset tag) against databases named "DBName1" and "DBName2".