Pull to refresh

Полный список флагов трассировки Microsoft SQL Server

Reading time64 min
Views27K

Microsoft SQL Server Флаги Трассировки


Полный список Microsoft SQL Server флагов трассировки (359 флагов трассировки на текущий момент).


ПОМНИТЕ: Будьте предельно осторожны с флагами трассировки, проверяйте их влияние в первую очередь в тестовой среде.


Github версия в markdown с периодической актуализацией на английском языке доступна по ссылке: SQL Server Trace Flag


Обновления


Update 2016-12-12: добавлены 15 флагов трассировки, обновлена информация по более чем 40 флагам
Update 2016-11-04: добавлены 26 флагов трассировки, большое спасибо @EzhovEA
Update 2016-09-09: добавлен флаг трассировки 9851, спасибо @JeStoneDev
Update 2016-08-11: добавлен флаг трассировки 6533


Также, вас возможно заинтересуют другие статьи о Microsoft SQL Server:



Заголовки:



Источники:



Большое спасибо:


  • Steinar Andersen
  • Brent Ozar
  • Yusuf Anis
  • Lars Utterström
  • Martin Höglund
  • Håkan Winther
  • Toine Rozemeijer
  • Robert L Davis aka @sqlsoldier
  • sql_handle aka @sql_handle
  • Andrzej Kukuła

Что такое флаг трассировки в Microsoft SQL Server?


Флаги трассировки используются для временной установки определенных характеристик сервера или отключения определенного режима.
Флаги трассировки часто используются для диагностики проблем, связанных с производительностью, отладки хранимых процедур или сложных компьютерных систем.
MSDN: https://msdn.microsoft.com/ru-ru/library/ms188396(v=sql.120).aspx


Как включить или выключить флаги трассировки?


  • Вы можете использовать DBCC TRACEON и DBCC TRACEOFF команды
  • Вы можете использовать -T option in the startup configuration for the SQL Server Service.
  • Вы можете использовать подсказку QUERYTRACEON в своих запросах: <querytraceon_hint ::= {QUERYTRACEON trace_flag_number}>

Как определить какие флаги трассировки включены на текущий момент?


Вы можете использовать DBCC TRACESTATUS команду


Следующий пример показывает статус всех флагов трассировки, которые включены глобально на текущй момент:


DBCC TRACESTATUS(-1);
GO

Следующий пример показывает статус флагов трассировки 2528 и 3205:


DBCC TRACESTATUS (2528, 3205);
GO

Следующий пример показывает для флага трассировки 3205 задействован он глобально или нет:


DBCC TRACESTATUS (3205, -1);
GO

Следующий пример показывает список всех флагов трассировки, включенных для текущей сессии:


DBCC TRACESTATUS ();
GO

Что такое правила Оптимизатора?


Каждый раз, когда SQL Server выполняет запрос он строит план выполнения, который переводит логические операции, такие как соединения и предикаты в физические операции, которые реализованы в исходном коде SQL Server.
Это преобразование основано на определенных правилах, известных как правил оптимизатора. Они определяют, например, как выполнить внутреннее соединение.
Когда мы пишем простой оператор выбора с внутреннего соединения, оптимизатор запросов выбирает на основе статистических данных, индексах и задействованных правилах каким образом соединение выполняется (как Merge Join, вложенном цикле или хешировании), а также, может ли соединение использовать свойство коммутативности объединений.
Математически соединение A и B равнозначно соединению B и A, но вычислительные затраты, как правило, могут существенно различаться.


Список всех доступных правил


Для того, чтобы получить список правил в вашей версии SQL Server необходимо использовать недокументированные DBCC команды SHOWONRULES и SHOWOFFRULES.
Эти команды отображают задействованные и выключенные правила для всего сервера. Количество правил различается среди версий.


USE master;
GO

DBCC TRACEON(3604);
GO

DBCC SHOWONRULES;
GO

DBCC SHOWOFFRULES;
GO

Правило Описание
JNtoNL Join to Nested Loop
JNtoHS Join to Hash
JNtoSM Join to Sort Merge
LOJNtoNL Left Outer Join to Nested Loop
LSJNtoHS Left Semi Join to Hash
LASJNtoSM Left Anti Semi Join to Sort Merge

Список флагов трассировки


Всего: 359 флагов трассировки


Список флагов трассировки


Всего: 359 флагов трассировки


Флаг трассировки: -1
Назначение: Sets trace flags for all client connections, rather than for a single client connection. Because trace flags set using the -T command-line option automatically apply to all connections, this trace flag is used only when setting trace flags using DBCC TRACEON and DBCC TRACEOFF.
Ссылка: http://www.sql-server-performance.com/2002/traceflags/


Флаг трассировки: 101
Назначение: Verbose Merge Replication logging output for troubleshooting
Merger repl performance
Ссылка: http://support.microsoft.com/kb/2892633


Флаг трассировки: 102
Назначение: Verbose Merge Replication logging to msmerge_history table
for troubleshooting Merger repl performance
Ссылка: http://support.microsoft.com/kb/2892633


Флаг трассировки: 105
Назначение: Join more than 16 tables in SQL server 6.5
Ссылка: http://www.databasejournal.com/features/mssql/article.php/1443351/SQL-Server-65-Some-Useful-Trace-Flags.htm


Флаг трассировки: 106
Назначение: This enables you to see the messages that are sent to and from the Publisher, if you are using Web Synchronization
Ссылка: http://technet.microsoft.com/en-us/library/ms151872(v=sql.105).aspx


Флаг трассировки: 107
Назначение: SQL 6.5/7/8 – Interprets numbers with a decimal point as float instead of decimal
Ссылка: http://support.microsoft.com/kb/203787
Ссылка: https://support.microsoft.com/en-us/kb/155714


Флаг трассировки: 110
Назначение: SQL 6.5 – Turns off ANSI select characteristics
Ссылка: https://support.microsoft.com/en-us/kb/152032


Флаг трассировки: 144
Назначение: Force server side bucketization.
For legacy applications where change to client side code is not an option and
when the application has queries that are improperly parameterized, this trace flag forces server side bucketization.
Ссылка: http://blogs.msdn.microsoft.com/sqlprogrammability/2007/01/13/6-0-best-programming-practices


Флаг трассировки: 146
Назначение: Consider using when replaying against SQL 8.0, to avoid an attempt to set an encrypted connection.
Ссылка: Нет


Флаг трассировки: 168
Назначение: Bugfix in ORDER BY
Ссылка: http://support.microsoft.com/kb/926292


Флаг трассировки: 174
Назначение: Increases the SQL Server Database Engine plan cache bucket count from 40,009 to 160,001 on 64-bit systems.
Замечание: Please ensure that you thoroughly test this option, before rolling it into a production environment.
Ссылка: https://support.microsoft.com/en-us/kb/3026083
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 204
Назначение: SQL 6.5 – Backward compatibility switch that enables non-ansi standard behavior. E.g. previously SQL server ignored trailing blanks in the like statement and allowed queries that contained aggregated functions to have items in the group by clause that were not in the select list.
Ссылка: Нет


Флаг трассировки: 205
Назначение: Reports to the error log when a statistics-dependent stored procedure is being recompiled as a result of auto-update statistics.
Ссылка: https://support.microsoft.com/en-us/kb/195565
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 206
Назначение: SQL 6.5 – Provides backward compatibility for the set user statement. KB 160732
Ссылка: Нет


Флаг трассировки: 208
Назначение: SET QUOTED IDENTIFIER ON
Ссылка: Нет


Флаг трассировки: 210
Назначение: SQL 9 – Error when you run a query against a view: "An error occurred while executing batch"
Ссылка: https://support.microsoft.com/en-us/kb/945892


Флаг трассировки: 212
Назначение: SQL 9 – Query may run much slower when compared to SQL 8 when you use a cursor to run the query
Ссылка: https://support.microsoft.com/en-us/kb/951184


Флаг трассировки: 237
Назначение: Tells SQL Server to use correlated sub-queries in Non-ANSI standard backward compatibility mode
Ссылка: Нет


Флаг трассировки: 242
Назначение: Provides backward compatibility for correlated subqueries where non-ANSI-standard results are desired
Ссылка: Нет


Флаг трассировки: 243
Назначение: Provides backward compatibility for nullability behavior. When set, SQL Server has the same nullability violation behavior as that of a ver 4.2: Processing of the entire batch is terminated if the nullability error (inserting NULL into a NOT NULL field) can be detected at compile time; Processing of offending row is skipped, but the command continues if the nullability violation is detected at run time.Behavior of SQL Server is now more consistent because nullability checks are made at run time and a nullability violation results in the command terminating and the batch or transaction process continuing.
Ссылка: Нет


Флаг трассировки: 244
Назначение: Disables checking for allowed interim constraint violations. By default, SQL Server checks for and allows interim constraint violations. An interim constraint violation is caused by a change that removes the violation such that the constraint is met, all within a single statement and transaction. SQL Server checks for interim constraint violations for self-referencing DELETE statements, INSERT, and multi-row UPDATE statements. This checking requires more work tables. With this trace flag you can disallow interim constraint violations, thus requiring fewer work tables.
Ссылка: Нет


Флаг трассировки: 246
Назначение: Derived or NULL columns must be explicitly named in a select…INTO or create view statement when not done they raise an error. This flag avoids that.
Ссылка: Нет


Флаг трассировки: 253
Назначение: Prevents ad-hoc query plans to stay in cache
Ссылка: http://www.sqlservercentral.com/Forums/Topic837613-146-1.aspx


Флаг трассировки: 257
Назначение: Will invoke a print algorithm on the XML output before returning it to make the XML result more readable
Ссылка: Нет


Флаг трассировки: 260
Назначение: Prints versioning information about extended stored procedure dynamic-link libraries (DLLs).
For more information about GetXpVersion(), see Creating Extended Stored Procedures.
Ссылка: http://msdn.microsoft.com/en-us/library/ms164627.aspx
Ссылка: MSDN ms188396
Способ применения: global or session


Флаг трассировки: 262
Назначение: SQL 7 – Trailing spaces are no longer truncated from literal strings in CASE statements
Ссылка: https://support.microsoft.com/en-us/kb/891116


Флаг трассировки: 272
Назначение: Generates a log record per identity increment. Can be users
to convert SQL 2012 back to old style Identity behaviour
Ссылка: http://www.big.info/2013/01/how-to-solve-sql-server-2012-identity.html
Ссылка: https://connect.microsoft.com/SQLServer/feedback/details/739013/failover-or-restart-results-in-reseed-of-identity


Флаг трассировки: 302
Назначение: Output Index Selection info
Ссылка: http://www.databasejournal.com/features/mssql/article.php/1443351/SQL-Server-65-Some-Useful-Trace-Flags.htm


Флаг трассировки: 310
Назначение: Outputs info about actual join order
Ссылка: http://www.databasejournal.com/features/mssql/article.php/1443351/SQL-Server-65-Some-Useful-Trace-Flags.htm


Флаг трассировки: 320
Назначение: Disables join-order heuristics used in ANSI joins. To see join-order heuristics use flag 310. SQL Server uses join-order heuristics to reduce of permutations when using the best join order.
Ссылка: Нет


Флаг трассировки: 323
Назначение: Outputs detailed info about updates
Ссылка: http://www.databasejournal.com/features/mssql/article.php/1443351/SQL-Server-65-Some-Useful-Trace-Flags.htm


Флаг трассировки: 325
Назначение: Prints information about the cost of using a non-clustered index or a sort to process an ORDER BY clause
Ссылка: Нет


Флаг трассировки: 326
Назначение: Prints information about estimated & actual costs of sorts. Instructs server to use arithmetic averaging when calculating density instead of a geometric weighted average when updating statistics. Useful for building better stats when an index has skew on the leading column. Use only for updating the stats of a table/index with known skewed data.
Ссылка: Нет


Флаг трассировки: 330
Назначение: Enables full output when using the SET SHOWPLAN_ALL option, which gives detailed information about joins
Ссылка: Нет


Флаг трассировки: 342
Назначение: Disables the costing of pseudo-merge joins, thus significantly reducing time spent on the parse for certain types of large, multi-table joins. One can also use SET FORCEPLAN ON to disable the costing of pseudo-merge joins because the query is forced to use the order specified in the FROM clause.
Ссылка: Нет


Флаг трассировки: 345
Назначение: Changes join order selection logic in SQL Server 6.5
Ссылка: http://www.databasejournal.com/features/mssql/article.php/1443351/SQL-Server-65-Some-Useful-Trace-Flags.htm


Флаг трассировки: 445
Назначение: Prints ”compile issued” message in the errorlog for each compiled statement, when used together with 3605
Ссылка: Нет


Флаг трассировки: 506
Назначение: Enforces SQL-92 standards regarding null values for comparisons between variables and parameters. Any comparison of variables and parameters that contain a NULL always results in a NULL.
Ссылка: Нет


Флаг трассировки: 610
Назначение: Controls minimally logged inserts into indexed tables.
Ссылка: http://msdn.microsoft.com/en-us/library/dd425070%28v=SQL.100%29.aspx
Ссылка: https://www.pythian.com/blog/minimally-logged-operations-data-loads/
Ссылка: https://msdn.microsoft.com/library/dd425070.aspx
Ссылка: MSDN ms188396
Способ применения: global or session


Флаг трассировки: 611
Назначение: SQL 9 – When turned on, each lock escalation is recorded in the error log along with the SQL Server handle number.
Aaron confirmed this still works in SQL 2014. Outputs info of the form: "Escalated
locks — Reason: LOCK_THRESHOLD, Mode: S, Granularity: TABLE, Table: 222623836,
HoBt: 150:256, HoBt Lock Count: 6248, Escalated Lock Count: 6249, Line Number: 1,
Start Offset: 0, SQL Statement: select count(*) from dbo.BigTable"
Ссылка: Нет


Флаг трассировки: 617
Назначение: SQL 9 – When turned on, each lock escalation is recorded in the error log along with the SQL Server handle number.
As long as there are no SCH_M lock requests waiting in the ‘lock wait list’,
the ‘lock wait list’ will be bypassed by statements issued in uncommitted read transaction isolation level.
If there is a SCH_M lock request in the ‘lock wait list’, a query in uncommitted read transaction isolation level
will not bypass the ‘lock wait list’, but the SCH_S lock request will go into the ‘lock wait list’.
In order behind the SCH_M lock waiting in the same list. As a result the grant of the SCH_S request for such a query
is dependent on the grant and release of the SCH_M lock request entering the ‘lock wait list’ earlier.
Ссылка: https://blogs.msdn.microsoft.com/saponsqlserver/2014/01/17/new-functionality-in-sql-server-2014-part-3-low-priority-wait/


Флаг трассировки: 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.
Ссылка: Niko Neugebauer Columnstore Indexes – part 35
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 646
Назначение: Serves for getting detailed information on which Columnstore were eliminated by the Query Optimiser right into the error log.
Ссылка: Niko Neugebauer Columnstore Indexes – part 35


Флаг трассировки: 652
Назначение: Disable page pre-fetching scans
Ссылка: KB920093]
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 653
Назначение: Disables read ahead for the current connection
Ссылка: Нет


Флаг трассировки: 661
Назначение: Disables the ghost record removal process.
Ссылка: KB920093
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 662
Назначение: Prints detailed information about the work done by the ghost
cleanup task when it runs next. Use TF 3605 to see the output in the
errorlog
Ссылка: http://blogs.msdn.com/b/sqljourney/archive/2012/07/28/an-in-depth-look-at-ghost-records-in-sql-server.aspx


Флаг трассировки: 698
Назначение: SQL 9 – Performance of INSERT operations against a table with an identity column may be slow when compared to SQL 8
Ссылка: https://support.microsoft.com/en-gb/kb/940545


Флаг трассировки: 699
Назначение: Turn off transaction logging for the entire SQL dataserver
Ссылка: Нет


Флаг трассировки: 715
Назначение: Enables table lock for bulk load operations into a heap with no non-clustered indexes.
When this trace flag is enabled, bulk load operations acquire bulk update (BU) locks when bulk copying data into a table.
Bulk update (BU) locks allow multiple threads to bulk load data concurrently into the same table, while preventing other processes that are not bulk loading data from accessing the table.
The behavior is similar to when the user explicitly specifies TABLOCK hint while performing bulk load, or when the sp_tableoption table lock on bulk load is enabled for a given table.
However, when this trace flag is enabled, this behavior becomes default without any query or database changes.
Ссылка: MSDN ms188396
Способ применения: global or session


Флаг трассировки: 806
Назначение: Turn on Page Audit functionality, to verify page validity
Ссылка: http://technet.microsoft.com/en-au/library/cc917726.aspx


Флаг трассировки: 809
Назначение: SQL 8 – Limits the amount of Lazy write activity
Ссылка: Нет


Флаг трассировки: 815
Назначение: SQL 8/9 – Enables latch enforcement. SQL Server 8 (with service pack 4) and SQL Server 9 can perform latch enforcement for data pages found in the buffer pool cache. Latch enforcement changes the virtual memory protection state while database page status changes from "clean" to "dirty" ("dirty" means modified through INSERT, UPDATE or DELETE operation). If an attempt is made to modify a data page while latch enforcement is set, it causes an exception and creates a mini-dump in SQL Server installation's LOG directory. Microsoft support can examine the contents of such mini-dump to determine the cause of the exception. In order to modify the data page the connection must first acquire a modification latch. Once the data modification latch is acquired the page protection is changed to read-write. Once the modification latch is released the page protection changes back to read-only.
Ссылка: Нет


Флаг трассировки: 818
Назначение: Turn on ringbuffer to store info about IO write operations.
Used to troubleshoot IO problems
Ссылка: http://support.microsoft.com/kb/826433


Флаг трассировки: 828
Назначение: SQL 8 — When enabled checkpoint ignores the recovery interval target and keeps steady I/O otherwise it uses recovery interval setting as a target for the length of time that checkpoint will take
Ссылка: https://support.microsoft.com/en-gb/kb/906121


Флаг трассировки: 830
Назначение: SQL 9 – Disable the reporting of CPU Drift errors in the SQL Server errorlog like SQL Server has encountered 2 occurrence(s) of I/O requests taking longer than 15 seconds to complete
Ссылка: https://support.microsoft.com/en-us/kb/897284


Флаг трассировки: 831
Назначение: Protect unchanged pages in the buffer pool to catch memory corruptions
Ссылка: Нет


Флаг трассировки: 834
Назначение: Uses Microsoft Windows large-page allocations for the buffer pool.
Замечание: If you are using the Columnstore Index feature of SQL Server 2012 to SQL Server 2016, we do not recommend turning on trace flag 834.
Ссылка: http://www.sqlservice.se/sv/start/blogg/nagra-trace-flags-for-sql-server.aspx
Ссылка: https://support.microsoft.com/en-us/kb/920093
Ссылка: https://support.microsoft.com/en-us/kb/3210239
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 835
Назначение: SQL 9 / 10 – On 64 bit SQL Server it turns off Lock pages in memory
Ссылка: Нет


Флаг трассировки: 836
Назначение: Use the max server memory option for the buffer pool
Ссылка: KB920093


Флаг трассировки: 840
Назначение: SQL 9 – When trace turned on, SQL Server can perform larger I/O extent reads to populate the buffer pool when SQL Server starts this populates the buffer pool faster. Additionally, the larger I/O extent reads improve the initial query compilation and the response time when SQL Server starts.
Ссылка: https://support.microsoft.com/en-gb/kb/912322


Флаг трассировки: 842
Назначение: Use sys.dm_os_memory_node_access_stats to verify local vs. foreign memory under NUMA configurations after turning on this flag
Ссылка: Нет


Флаг трассировки: 845
Назначение: Enable Lock pages in Memory on Standard Edition
Ссылка: http://www.sqlservice.se/sv/start/blogg/sql-server-performance-with-dynamics-axapta.aspx
Ссылка: https://support.microsoft.com/en-gb/kb/970070


Флаг трассировки: 902
Назначение: Bypasses execution of database upgrade script when installing a Cumulative Update or Service Pack.
If you encounter an error during script upgrade mode, it is recommended to contact Microsoft SQL Customer Service and Support (CSS) for further guidance.
Предупреждение: This trace flag is meant for troubleshooting of failed updates during script upgrade mode, and it is not supported to run it continuously
in a production environment. Database upgrade scripts needs to execute successfully for a complete install of Cumulative Updates and Service Packs.
Not doing so can cause unexpected issues with your SQL Server instance.

Ссылка: http://www.sqlservice.se/sv/start/blogg/sql-server-2012-cu1-upgrade-step--msdb110_upgrade-sql--encountered-error-547.aspx
Ссылка: https://support.microsoft.com/en-us/kb/2163980
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 1106
Назначение: SQL 9 — Used space in tempdb increases continuously when you run a query that creates internal objects in tempdb
Ссылка: https://support.microsoft.com/en-gb/kb/947204


Флаг трассировки: 1117
Назначение: When a file in the filegroup meets the autogrow threshold, all files in the filegroup grow.br />
Замечание: Beginning with SQL Server 2016 this behavior is controlled by the AUTOGROW_SINGLE_FILE and AUTOGROW_ALL_FILES option of ALTER DATABASE, and trace flag 1117 has no affect. For more information, see ALTER DATABASE File and Filegroup Options (Transact-SQL).
Ссылка: http://www.sqlservice.se/sv/start/blogg/nagra-trace-flags-for-sql-server.aspx
Ссылка: http://blogs.technet.com/technet_blog_images/b/sql_server_sizing_ha_and_performance_hints/archive/2012/02/09/sql-server-2008-trace-flag-t-1117.aspx
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 1118
Назначение: Removes most single page allocations on the server, reducing contention on the SGAM page.
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.
Замечание: Beginning with SQL Server 2016 this behavior is controlled by the SET MIXED_PAGE_ALLOCATION option of ALTER DATABASE, and trace flag 1118 has no affect. For more information, see ALTER DATABASE SET Options (Transact-SQL).
Ссылка: http://www.sqlservice.se/sv/start/blogg/nagra-trace-flags-for-sql-server.aspx
Ссылка: http://blogs.msdn.com/b/psssql/archive/2008/12/17/sql-server-2005-and-2008-trace-flag-1118-t1118-usage.aspx
Ссылка: http://www.sqlskills.com/blogs/paul/misconceptions-around-tf-1118/
Ссылка: https://support.microsoft.com/en-us/kb/328551
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 1119
Назначение: Turns of mixed extent allocation (Similar to 1118?)
Ссылка: TECHNET List Of SQL Server Trace Flags


Флаг трассировки: 1124
Назначение: Unknown. Has been reportedly found turned on in some SQL Server instances running Dynamics AX. Also rumored to be invalid in public builds of SQL Server
Ссылка: Нет


Флаг трассировки: 1140
Назначение: Fix for growing tempdb in special cases
Ссылка: http://support.microsoft.com/kb/2000471


Флаг трассировки: 1180
Назначение: SQL 7 — Forces allocation to use free pages for text or image data and maintain efficiency of storage. Helpful in case when DBCC SHRINKFILE and SHRINKDATABASE commands may not work because of sparsely populated text, ntext, or image columns.
Ссылка: Нет


Флаг трассировки: 1197
Назначение: Applies only in the case of SQL 7 – SP3, similar with trace flag 1180
Ссылка: Нет


Флаг трассировки: 1200
Назначение: Prints detailed lock information as every request for a lock is made (the process ID and type of lock requested)
Ссылка: TECHNET List Of SQL Server Trace Flags


Флаг трассировки: 1202
Назначение: Insert blocked lock requests into syslocks
Ссылка: Нет


Флаг трассировки: 1204
Назначение: Returns the resources and types of locks participating in a deadlock and also the current command affected.
Ссылка: https://support.microsoft.com/en-us/kb/832524
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 1205
Назначение: More detailed information about the command being executed at the time of a deadlock. Documented in SQL 7 BOL.
Ссылка: Нет


Флаг трассировки: 1206
Назначение: Used to complement flag 1204 by displaying other locks held by deadlock parties
Ссылка: Нет


Флаг трассировки: 1211
Назначение: Disables lock escalation based on memory pressure, or based on number of locks. The SQL Server Database Engine will not escalate row or page locks to table locks.
Using this trace flag can generate excessive numbers of locks. This can slow the performance of the Database Engine, or cause 1204 errors (unable to allocate lock resource) because of insufficient memory.
If both trace flag 1211 and 1224 are set, 1211 takes precedence over 1224.
However, because trace flag 1211 prevents escalation in every case, even under memory pressure, we recommend that you use 1224.
This helps avoid "out-of-locks" errors when many locks are being used.
Ссылка: MSDN ms188396
Способ применения: global or session


Флаг трассировки: 1216
Назначение: SQL 7 — Disables Health reporting. Lock monitor when detects a (worker thread) resource level blocking scenario. If a SPID that owns a lock is currently queued to the scheduler, because all the assigned worker threads have been created and all the assigned worker threads are in an un-resolvable wait state, the following error message is written to the SQL Server error log: Error 1223: Process ID %d:%d cannot acquire lock "%s" on resource %s because a potential deadlock exists on Scheduler %d for the resource. Process ID %d:% d holds a lock "%h" on this resource.
Ссылка: Нет


Флаг трассировки: 1222
Назначение: Returns the resources and types of locks that are participating in a deadlock and also the current command affected, in an XML format that does not comply with any XSD schema.
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 1224
Назначение: Disables lock escalation based on the number of locks. However, memory pressure can still activate lock escalation.
The Database Engine escalates row or page locks to table (or partition) locks if the amount of memory used by lock objects exceeds one of the following conditions:


  • Forty percent of the memory that is used by Database Engine. This is applicable only when the locks parameter of sp_configure is set to 0.
  • Forty percent of the lock memory that is configured by using the locks parameter of sp_configure.

For more information, see Server Configuration Options (SQL Server).
If both trace flag 1211 and 1224 are set, 1211 takes precedence over 1224.
However, because trace flag 1211 prevents escalation in every case, even under memory pressure, we recommend that you use 1224.
This helps avoid "out-of-locks" errors when many locks are being used.
Замечание: Lock escalation to the table- or HoBT-level granularity can also be controlled by using the LOCK_ESCALATION option of the ALTER TABLE statement.
Ссылка: MSDN ms188396
Способ применения: global or session


Флаг трассировки: 1228
Назначение: Enable lock partitioning.
By default, lock partitioning is enabled when a server has 16 or more CPUs. Otherwise, lock partitioning is disabled.
Trace flag 1228 enables lock partitioning for 2 or more CPUs. Trace flag 1229 disables lock partitioning.
Trace flag 1229 overrides trace flag 1228 if trace flag 1228 is also set.
Lock partitioning is useful on multiple-CPU servers where some tables have very high lock rates.
You can turn on trace flag 1228 and trace flag 1229 only at startup.
Ссылка: Trace Flag 1228 and 1229
Ссылка: Microsoft SQL Server 2005 TPC-C Trace Flags


Флаг трассировки: 1229
Назначение: Enable lock partitioning.
By default, lock partitioning is enabled when a server has 16 or more CPUs. Otherwise, lock partitioning is disabled.
Trace flag 1228 enables lock partitioning for 2 or more CPUs. Trace flag 1229 disables lock partitioning.
Trace flag 1229 overrides trace flag 1228 if trace flag 1228 is also set.
Lock partitioning is useful on multiple-CPU servers where some tables have very high lock rates.
You can turn on trace flag 1228 and trace flag 1229 only at startup.
Ссылка: Trace Flag 1228 and 1229
Ссылка: Microsoft SQL Server 2005 TPC-C Trace Flags


Флаг трассировки: 1236
Назначение: Enables database lock partitioning. Fixes performance problem in scenarios with high lock activity in SQL 2012 and SQL 2014.
Замечание: Beginning with SQL Server 2012 SP3 and SQL Server 2014 SP1 this behavior is controlled by the engine and trace flag 1236 has no effect.
Ссылка: https://support.microsoft.com/en-us/kb/2926217
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 1260
Назначение: Disabled mini-dump for non-yield condition.
Disables mini-dump generation for "any of the 17883, 17884, 17887, or 17888 errors.
The trace flag can be used in conjunction with trace flag –T1262. For example, you
could enable –T1262 to get 10- and a 60-second interval reporting and also enable – T1260 to avoid getting mini-dumps."
Ссылка: A Topical Collection of SQL Server Flags v6
Ссылка: How To Diagnose and Correct Errors 17883, 17884, 17887, and 17888
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 1261
Назначение: SQL 8 — Disables Health reporting. Lock monitor when detects a (worker thread) resource level blocking scenario. If a SPID that owns a lock is currently queued to the scheduler, because all the assigned worker threads have been created and all the assigned worker threads are in an un-resolvable wait state, the following error message is written to the SQL Server error log: Error 1229: Process ID %d:%d owns resources that are blocking processes on scheduler %d.
Ссылка: Нет


Флаг трассировки: 1262
Назначение: The default behavior (for 1788* errors) is for SQL to generate a mini-dump on the first
occurrence, but never after. 1262 changes the behavior: “When –T1262 is enabled, a
mini-dump is generated when the non-yielding condition is declared (15 seconds) and
at subsequent 60-second intervals for the same non-yield occurrence. A new nonDiagCorrect17883etc;
yielding occurrence causes dump captures to occur again.”
In SQL 2000 this was a startup-only flag; in 2005+ it can be enabled via TRACEON.
Note that the flag is also covered in Khen2005, p400, but with no new information.
Ссылка: A Topical Collection of SQL Server Flags v6
Ссылка: How To Diagnose and Correct Errors 17883, 17884, 17887, and 17888


Флаг трассировки: 1264
Назначение: Collect process names in non-yielding scenario memory dumps
Ссылка: A Topical Collection of SQL Server Flags v6
Ссылка: http://support.microsoft.com/kb/2630458/en-us


Флаг трассировки: 1400
Назначение: SQL 9 RTM – Enables creation of database mirroring endpoint, which is required for setting up and using database mirroring
Ссылка: Нет


Флаг трассировки: 1439
Назначение: Trace database restart and failover messages to SQL Errorlog for mirrored databases
Ссылка: Trace flags in sql server from trace flag 902 to trace flag 1462


Флаг трассировки: 1448
Назначение: Enables the replication log reader to move forward even if the async secondaries have not acknowledged the reception of a change.
Even with this trace flag enabled the log reader always waits for the sync secondaries. The log reader will not go beyond the min ack of the sync secondaries.
This trace flag applies to the instance of SQL Server, not just an availability group, an availability database, or a log reader instance.
Takes effect immediately without a restart. This trace flag can be activated ahead of time or when an async secondary fails.
Ссылка: https://support.microsoft.com/en-us/kb/937041
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 1449
Назначение: When you use SNAC to connect to an instance of a principal server in a database mirroring session: "The connection attempted to fail over to a server that does not have a failover partner".
Ссылка: https://support.microsoft.com/en-gb/kb/936179


Флаг трассировки: 1462
Назначение: Disables log stream compression for asynchronous availability groups.
This feature is enabled by default on asynchronous availability groups in order to optimize network bandwidth.
Ссылка: http://sqlcat.com/sqlcat/b/technicalnotes/archive/2007/09/17/database-mirroring-log-compression-in-sql-server-2008-improves-throughput.aspx
Ссылка: MSDN mt736907
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 1504
Назначение: Dynamic memory grant expansion can also help with parallel index build plans where the distribution of rows across threads is uneven.
The amount of memory that can be consumed this way is not unlimited, however.
SQL Server checks each time an expansion is needed to see if the request is reasonable given the resources available at that time.
Some insight to this process can be obtained by enabling undocumented trace flag 1504, together with 3604 (for message output to the console)
or 3605 (output to the SQL Server error log). If the index build plan is parallel, only 3605 is effective because parallel workers cannot send trace messages cross-thread to the console.
Ссылка: Internals of the Seven SQL Server Sorts – Part 1


Флаг трассировки: 1603
Назначение: Use standard disk I/O (i.e. turn off asynchronous I/O)
Ссылка: Нет


Флаг трассировки: 1604
Назначение: Once enabled at start up makes SQL Server output information regarding memory allocation requests
Ссылка: Нет


Флаг трассировки: 1609
Назначение: Turns on the unpacking and checking of RPC information in Open Data Services. Used only when applications depend on the old behavior.
Ссылка: Нет


Флаг трассировки: 1610
Назначение: Boot the SQL dataserver with TCP_NODELAY enabled
Ссылка: Нет


Флаг трассировки: 1611
Назначение: If possible, pin shared memory — check errorlog for success/failure
Ссылка: Нет


Флаг трассировки: 1613
Назначение: Set affinity of the SQL data server engine's onto particular CPUs — usually pins engine 0 to processor 0, engine 1 to processor 1...
Ссылка: Нет


Флаг трассировки: 1704
Назначение: Prints information when a temporary table is created or dropped
Ссылка: Нет


Флаг трассировки: 1717
Назначение: MSShipped bit will be set automatically at Create time when creating stored procedures
Ссылка: Нет


Флаг трассировки: 1800
Назначение: Enables SQL Server optimization when disks of different sector sizes are used for primary and secondary replica log files, in SQL Server AG and Log Shipping environments.
Ссылка: https://support.microsoft.com/en-us/kb/3009974
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 1802
Назначение: SQL 9 — After detaching a database that resides on network-attached storage, you cannot reattach the SQL Server database
Ссылка: https://support.microsoft.com/en-us/kb/922804


Флаг трассировки: 1806
Назначение: Disable Instant File Initialization
Ссылка: http://technet.microsoft.com/en-au/library/cc917726.aspx


Флаг трассировки: 1807
Назначение: Enable option to have database files on SMB share for SQL Server 2008 and 2008R2
Ссылка: http://blogs.msdn.com/b/varund/archive/2010/09/02/create-a-sql-server-database-on-a-network-shared-drive.aspx


Флаг трассировки: 1810
Назначение: Prints the file create/open/close timings
Ссылка: Нет


Флаг трассировки: 1903
Назначение: SQL 8 — When you capture a SQL Profiler trace in a file and then you try to import the trace files into tables by using the fn_trace_gettable function no rows may be returned
Ссылка: https://support.microsoft.com/en-us/kb/911678


Флаг трассировки: 2301
Назначение: Enable advanced decision support optimizations
Ссылка: KB920093
Ссылка: MSDN ms188396
Способ применения: global and session and query


Флаг трассировки: 2312
Назначение: Enables you to set the query optimizer cardinality estimation model to the SQL Server 2014 through SQL Server 2016 versions,
dependent of the compatibility level of the database.
Ссылка: KB2801413
Ссылка: New Features in SQL Server 2016 Service Pack 1
Ссылка: MSDN ms188396
Способ применения: global or session or query


Флаг трассировки: 2328
Назначение: SQL 9+ — Makes cardinality estimates upon resulting selectivity. The reasoning for this is that one or more of the constants may be statement parameters, which would change from one execution of the statement to the next.
Ссылка: Нет


Флаг трассировки: 2330
Назначение: Query performance decreases when sys.dm_db_index_usage_stats has large number of rows
Ссылка: https://support.microsoft.com/en-us/kb/2003031
Ссылка: http://www.brentozar.com/archive/2015/11/trace-flag-2330-who-needs-missing-index-requests/


Флаг трассировки: 2335
Назначение: Causes SQL Server to assume a fixed amount of memory is available during query optimization. It does not limit the memory SQL Server grants to execute the query.
The memory configured for SQL Server will still be used by data cache, query execution and other consumers.
Замечание: Please ensure that you thoroughly test this option, before rolling it into a production environment.
Ссылка: https://support.microsoft.com/en-us/kb/2413549
Ссылка: MSDN ms188396
Способ применения: global or session or query


Флаг трассировки: 2340
Назначение: Causes SQL Server not to use a sort operation (batch sort) for optimized nested loop joins when generating a plan.
Beginning with SQL Server 2016 SP1, to accomplish this at the query level, add the USE HINT query hint instead of using this trace flag.
Замечание: Please ensure that you thoroughly test this option, before rolling it into a production environment.
Ссылка: https://support.microsoft.com/en-us/kb/2009160
Ссылка: New Features in SQL Server 2016 Service Pack 1
Ссылка: MSDN ms188396
Способ применения: global or session or query


Флаг трассировки: 2363
Назначение: TF Selectivity
Ссылка: Cardinality Estimation Framework 2014 First Look


Флаг трассировки: 2371
Назначение: Changes the fixed auto update statistics threshold to dynamic auto update statistics threshold.
Замечание: Beginning with SQL Server 2016 this behavior is controlled by the engine and trace flag 2371 has no effect.
Ссылка: http://www.sqlservice.se/sv/start/blogg/sql-server--auto-update-stats-part-2.aspx
Ссылка: https://support.microsoft.com/en-us/kb/2754171
Ссылка: http://blogs.msdn.com/b/saponsqlserver/archive/2011/09/07/changes-to-automatic-update-statistics-in-sql-server-traceflag-2371.aspx
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 2372
Назначение: Displays memory utilization during the optimization process. Memory for Phases.
Ссылка: More Undocumented Query Optimizer Trace Flags
Ссылка: Cardinality Estimation Framework 2014 First Look


Флаг трассировки: 2373
Назначение: Displays memory utilization during the optimization process. Memory for Deriving Properties.
Ссылка: More Undocumented Query Optimizer Trace Flags
Ссылка: Cardinality Estimation Framework 2014 First Look


Флаг трассировки: 2388
Назначение: Change DBCC SHOW_STATISTICS output to show stats history and lead key type such as known ascending keys
Ссылка: http://www.benjaminnevarez.com/2013/02/statistics-on-ascending-keys


Флаг трассировки: 2389
Назначение: Enable automatically generated quick statistics for ascending keys (histogram amendment).
If trace flag 2389 is set, and a leading statistics column is marked as ascending, then the histogram used to estimate cardinality will be adjusted at query compile time.
Ссылка: KB2801413
Ссылка: http://www.sqlservice.se/sv/start/blogg/sql-server-statistics--traceflags-2389--2390.aspx
Ссылка: http://blogs.msdn.com/b/ianjo/archive/2006/04/24/582227.aspx
Ссылка: http://www.sqlmag.com/article/tsql3/making-the-most-of-automatic-statistics-updating--96767
Ссылка: http://sqlperformance.com/2016/07/sql-statistics/trace-flag-2389-new-cardinality-estimator
Ссылка: https://www.sswug.org/sswugresearch/community/trace-flag-2389-and-the-new-cardinality-estimator/
Ссылка: New Features in SQL Server 2016 Service Pack 1
Ссылка: MSDN ms188396
Способ применения: global or session or query


Флаг трассировки: 2390
Назначение: Enable automatically generated quick statistics for ascending or unknown keys (histogram amendment).
If trace flag 2390 is set, and a leading statistics column is marked as ascending or unknown, then the histogram used to estimate cardinality will be adjusted at query compile time
Ссылка: http://www.sqlservice.se/sv/start/blogg/sql-server-statistics--traceflags-2389--2390.aspx
Ссылка: http://blogs.msdn.com/b/ianjo/archive/2006/04/24/582227.aspx
Ссылка: KB2801413
Ссылка: http://www.sqlmag.com/article/tsql3/making-the-most-of-automatic-statistics-updating--96767
Ссылка: MSDN ms188396
Способ применения: global or session or query


Флаг трассировки: 2430
Назначение: Fixes performance problem when using large numbers of locks
Ссылка: https://support.microsoft.com/en-us/kb/2754301


Флаг трассировки: 2440
Назначение: SQL 10 — Parallel query execution strategy on partitioned tables. SQL 9 used single thread per partition parallel query execution strategy. In SQL 10, multiple threads can be allocated to a single partition by turning on this flag.
Ссылка: Нет


Флаг трассировки: 2453
Назначение: Allow a table variable to trigger recompile when enough number of rows are changed with may allow the query optimizer to choose a more efficient plan.
Замечание: Please ensure that you thoroughly test this option, before rolling it into a production environment.
Ссылка: http://sqlperformance.com/2014/06/t-sql-queries/table-variable-perf-fix
Ссылка: https://support.microsoft.com/en-us/kb/2952444
Ссылка: MSDN ms188396
Способ применения: global or session or query


Флаг трассировки: 2470
Назначение: Fixes performance problem when using AFTER triggers on partitioned tables
Ссылка: https://support.microsoft.com/en-us/kb/2606883


Флаг трассировки: 2505
Назначение: SQL 7 — Prevents DBCC TRACEON 208, SPID 10 errors from appearing in the error log
Ссылка: https://support.microsoft.com/en-us/kb/243352


Флаг трассировки: 2508
Назначение: Disables parallel non-clustered index checking for DBCC CHECKTABLE
Ссылка: Нет


Флаг трассировки: 2509
Назначение: Used with DBCC CHECKTABLE to see the total count of forward records in a table
Ссылка: Нет


Флаг трассировки: 2514
Назначение: Verbose Merge Replication logging to msmerge_history table for troubleshooting Merger repl performance
Ссылка: http://sqlblog.com/blogs/argenis_fernandez/archive/2012/05/29/ghost-records-backups-and-database-compression-with-a-pinch-of-security-considerations.aspx


Флаг трассировки: 2520
Назначение: Forces DBCC HELP to return syntax of undocumented DBCC statements. If 2520 is not turned on, DBCC HELP will refuse to give you the syntax stating: "No help available for DBCC statement 'undocumented statement'". dbcc help ('?')
Ссылка: Нет


Флаг трассировки: 2521
Назначение: SQL 7 SP2 — Facilitates capturing a Sqlservr.exe user-mode crash dump for postmortem analysis
Ссылка: Нет


Флаг трассировки: 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.
For more information, see Configure the max degree of parallelism Server Configuration Option.
Parallel DBCC should typically be left enabled.
For DBCC CHECKDB, the query processor reevaluates and automatically adjusts parallelism with each table or batch of tables checked.
Sometimes, checking may start when the server is almost idle.
An administrator who knows that the load will increase before checking is complete may want to manually decrease or disable parallelism.
Disabling parallel checking of DBCC can cause DBCC to take much longer to complete and if DBCC is run with the TABLOCK feature enabled and parallelism set off, tables may be locked for longer periods of time.
Ссылка: MSDN ms188396
Способ применения: global or session


Флаг трассировки: 2529
Назначение: Displays memory usage for DBCC commands when used with TF 3604
Ссылка: Нет


Флаг трассировки: 2536
Назначение: Allows you to see inactive records in transaction log using fn_dblog.
Similar to trace flag 2537 for older version than SQL Server 2008.
Ссылка: http://www.sqlsoldier.com/wp/sqlserver/day19of31daysofdisasterrecoveryhowmuchlogcanabackuplog


Флаг трассировки: 2537
Назначение: Allows you to see inactive records in transaction log using fn_dblog
Ссылка: http://www.sqlsoldier.com/wp/sqlserver/day19of31daysofdisasterrecoveryhowmuchlogcanabackuplog


Флаг трассировки: 2540
Назначение: Unknown, but related to controlling the contents of a memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2541
Назначение: Unknown, but related to controlling the contents of a memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2542
Назначение: Unknown, but related to controlling the contents of a memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2543
Назначение: Unknown, but related to controlling the contents of a memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2544
Назначение: Produces a full memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2545
Назначение: Unknown, but related to controlling the contents of a
memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2546
Назначение: Dumps all threads for SQL Server in the dump file
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2547
Назначение: Unknown, but related to controlling the contents of a
memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2548
Назначение: Shrink will run faster with this trace flag if there are LOB pages that need conversion and/or compaction, because that actions will be skipped.
Ссылка: http://blogs.msdn.com/b/psssql/archive/2008/03/28/how-it-works-sql-server-2005-dbcc-shrink-may-take-longer-than-sql-server-2000.aspx


Thanks to: Andrzej Kukula


Флаг трассировки: 2549
Назначение: Runs the DBCC CHECKDB command assuming each database file is on a unique disk drive.
DBCC CHECKDB command builds an internal list of pages to read per unique disk drive across all database files.
This logic determines unique disk drives based on the drive letter of the physical file name of each file.
Замечание: Do not use this trace flag unless you know that each file is based on a unique physical disk.
Although this trace flag improve the performance of the DBCC CHECKDB commands which target usage of the PHYSICAL_ONLY option, some users may not see any improvement in performance.
While this trace flag improves disk I/O resources usage, the underlying performance of disk resources may limit the overall performance of the DBCC CHECKDB command.

Ссылка: http://www.sqlservice.se/sv/start/blogg/faster-dbcc-checkdb-by-using-trace-flag-2562-and-2549.aspx
Ссылка: http://blogs.msdn.com/b/saponsqlserver/archive/2011/12/22/faster-dbcc-checkdb-released-in-sql-2008-r2-sp1-traceflag-2562-amp-2549.aspx
Ссылка: http://support.microsoft.com/kb/2634571
Ссылка: https://support.microsoft.com/en-us/kb/2732669
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 2550
Назначение: Unknown, but related to controlling the contents of a
memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2551
Назначение: Produces a filtered memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2552
Назначение: Unknown, but related to controlling the contents of a
memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2553
Назначение: Unknown, but related to controlling the contents of a
memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2554
Назначение: Unknown, but related to controlling the contents of a
memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2555
Назначение: Unknown, but related to controlling the contents of a
memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2556
Назначение: Unknown, but related to controlling the contents of a
memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2557
Назначение: Unknown, but related to controlling the contents of a
memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2558
Назначение: Unknown, but related to controlling the contents of a
memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2559
Назначение: Unknown, but related to controlling the contents of a
memory dump
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 2562
Назначение: Runs the DBCC CHECKDB command in a single "batch" regardless of the number of indexes in the database.
By default, the DBCC CHECKDB command tries to minimize tempdb resources by limiting the number of indexes or "facts" that it generates by using a "batches" concept.
This trace flag forces all processing into one batch.
One effect of using this trace flag is that the space requirements for tempdb may increase.
Tempdb may grow to as much as 5% or more of the user database that is being processed by the DBCC CHECKDB command.
Замечание: Although this trace flag improve the performance of the DBCC CHECKDB commands which target usage of the PHYSICAL_ONLY option, some users may not see any improvement in performance.
While this trace flag improves disk I/O resources usage, the underlying performance of disk resources may limit the overall performance of the DBCC CHECKDB command.

Ссылка: http://www.sqlservice.se/sv/start/blogg/faster-dbcc-checkdb-by-using-trace-flag-2562-and-2549.aspx
Ссылка: http://blogs.msdn.com/b/saponsqlserver/archive/2011/12/22/faster-dbcc-checkdb-released-in-sql-2008-r2-sp1-traceflag-2562-amp-2549.aspx
Ссылка: http://support.microsoft.com/kb/2634571
Ссылка: http://support.microsoft.com/kb/2732669/en-us
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 2566
Назначение: Runs the DBCC CHECKDB command without data purity check unless DATA_PURITY option is specified.
Замечание: Column-value integrity checks are enabled by default and do not require the DATA_PURITY option.
For databases upgraded from earlier versions of SQL Server, column-value checks are not enabled by default until DBCC CHECKDB WITH DATA_PURITY has been run error free on the database at least once.
After this, DBCC CHECKDB checks column-value integrity by default.

Ссылка: https://support.microsoft.com/en-us/kb/945770
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 2588
Назначение: Get more information about undocumented DBCC commands
Ссылка: http://www.sqlservice.se/sv/start/blogg/trace-flag--undocumented-commands.aspx


Флаг трассировки: 2701
Назначение: SQL 6.5 — Sets the @@ERROR system function to 50000 for RAISERROR messages with severity levels of 10 or less. When disabled, sets the @@ERROR system function to 0 for RAISERROR messages with severity levels of 10 or less
Ссылка: Нет


Флаг трассировки: 2861
Назначение: Keep zero cost plans in cache. Tip: Avoid Using Trace Flag 2861 to Cache Zero-Cost Query Plan
Ссылка: http://support.microsoft.com/kb/325607


Флаг трассировки: 3001
Назначение: Stops sending backup entries into MSDB
Ссылка: Нет


Флаг трассировки: 3004
Назначение: Returns more info about Instant File Initialization. Shows information about backups and file creations use with 3605 to direct to error log.
Ссылка: https://blogs.msdn.microsoft.com/psssql/2008/01/23/how-it-works-what-is-restorebackup-doing/
Ссылка: http://victorisakov.files.wordpress.com/2011/10/sql_pass_summit_2011-important_trace_flags_that_every_dba_should_know-victor_isakov.pdf


Флаг трассировки: 3014
Назначение: Returns more info about backups to the errorlog
Ссылка: http://victorisakov.files.wordpress.com/2011/10/sql_pass_summit_2011-important_trace_flags_that_every_dba_should_know-victor_isakov.pdf


Флаг трассировки: 3023
Назначение: Enables CHECKSUM option as default for BACKUP command
Замечание: Beginning with SQL Server 2014 this behavior is controlled by setting the backup checksum default configuration option.
For more information, see Server Configuration Options (SQL Server)
.
Ссылка: https://support.microsoft.com/en-us/kb/2656988
Ссылка: MSDN ms188396
Способ применения: global and session


Флаг трассировки: 3031
Назначение: SQL 9 — Will turn the NO_LOG and TRUNCATE_ONLY options into checkpoints in all recovery modes
Ссылка: Нет


Флаг трассировки: 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 is useful if you need to save on space by allocating only the actual size required for the compressed backup. Using this trace flag might cause a slight performance penalty (a possible increase in the duration of the backup operation).
For more information about the pre-allocation algorithm, see Backup Compression (SQL Server).
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 3051
Назначение: Enables SQL Server Backup to URL logging to a specific error log file.
Ссылка: MSDN ms188396
Ссылка: https://msdn.microsoft.com/en-us/library/jj919149.aspx
Способ применения: global only


Флаг трассировки: 3101
Назначение: Fix performance problems when restoring database with CDC
Ссылка: http://support.microsoft.com/kb/2567366/


Флаг трассировки: 3104
Назначение: Causes SQL Server to bypass checking for free space
Ссылка: Нет


Флаг трассировки: 3106
Назначение: Required to move sys databases
Ссылка: Нет


Флаг трассировки: 3111
Назначение: Cause LogMgr::ValidateBackedupBlock to be skipped during backup and restore operation
Ссылка: Нет


Флаг трассировки: 3117
Назначение: QL 9 — SQL Server 2005 tries to restore the log files and the data files in a single step which some third-party snapshot backup utilities do not support. Turing on 3117 does things the SQL 8 way multiple-step restore process.
Ссылка: https://support.microsoft.com/en-us/kb/915385


Флаг трассировки: 3205
Назначение: Disable HW compression for backup to tape drives
Ссылка: MSDN ms188396
Способ применения: global


Флаг трассировки: 3213
Назначение: Output buffer info for backups to ERRORLOG
Ссылка: http://sqlcat.com/sqlcat/b/technicalnotes/archive/2008/04/21/tuning-the-performance-of-backup-compression-in-sql-server-2008.aspx


Флаг трассировки: 3222
Назначение: Disables the read ahead that is used by the recovery operation during roll forward operations
Ссылка: TECHNET List Of SQL Server Trace Flags


Флаг трассировки: 3226
Назначение: By default, every successful backup operation adds an entry in the SQL Server error log and in the system event log.
If you create very frequent log backups, these success messages accumulate quickly, resulting in huge error logs in which finding other messages is problematic.
With this trace flag, you can suppress these log entries. This is useful if you are running frequent log backups and if none of your scripts depend on those entries.
Ссылка: MSDN ms188396
Способ применения: global only


Thanks to: @lwiederstein (https://twitter.com/lwiederstein)


Флаг трассировки: 3422
Назначение: Log record auditing
Ссылка: http://technet.microsoft.com/en-au/library/cc917726.aspx


Флаг трассировки: 3231
Назначение: SQL 8/9 — Will turn the NO_LOG and TRUNCATE_ONLY options into no-ops in FULL/BULK_LOGGED recovery mode, and will clear the log in SIMPLE recovery mode. When set, BACKUP LOG with TRUNCATE_ONLY and BACKUP LOG with NO_LOG do not allow a log backup to run if the database's recovery model is FULL or BULK_LOGGED.
Ссылка: Нет


Флаг трассировки: 3282
Назначение: SQL 6.5 — Used after backup restoration fails
Ссылка: https://support.microsoft.com/en-us/kb/215458


Флаг трассировки: 3400
Назначение: Prints the recovery timings
Ссылка: Нет


Флаг трассировки: 3422
Назначение: Cause auditing of transaction log records as they're read (during transaction rollback or log recovery).
This is useful because there is no equivalent to page checksums for transaction log records and so no way to detect whether log records are being corrupted e careful with these trace flags — I don't recommend using them unless you are experiencing corruptions that you can't diagnose. Turning them on will cause a big CPU hit because of the extra auditing that's happening.
Ссылка: https://support.microsoft.com/en-us/kb/215458


Флаг трассировки: 3502
Назначение: Writes info about checkpoints to teh errorlog
Ссылка: http://victorisakov.files.wordpress.com/2011/10/sql_pass_summit_2011-important_trace_flags_that_every_dba_should_know-victor_isakov.pdf


Флаг трассировки: 3503
Назначение: Indicates whether the checkpoint at the end of automatic recovery was skipped for a database (this applies only to read-only databases)
Ссылка: http://www.sql-server-performance.com/2002/traceflags/


Флаг трассировки: 3504
Назначение: For internal testing. Will raise a bogus log-out-of-space condition from checkpoint
Ссылка: Нет


Флаг трассировки: 3505
Назначение: Disables automatic checkpointing
Ссылка: http://support.microsoft.com/kb/815436


Флаг трассировки: 3601
Назначение: Stack trace when error raised. Also see 3603.
Ссылка: Нет


Флаг трассировки: 3602
Назначение: Records all error and warning messages sent to the client
Ссылка: Нет


Флаг трассировки: 3603
Назначение: SQL Server fails to install on tricore, Bypass SMT check is enabled, flags are added via registry. Also see 3601.
Ссылка: Нет


Флаг трассировки: 3604
Назначение: Redirect DBCC command output to query window
Ссылка: http://blogs.msdn.com/b/askjay/archive/2011/01/21/why-do-we-need-trace-flag-3604-for-dbcc-statements.aspx
Ссылка: Internals of the Seven SQL Server Sorts – Part 1
Ссылка: http://www.sqlservice.se/sv/start/blogg/querytraceon.aspx


Флаг трассировки: 3605
Назначение: Directs the output of some Trace Flags to the Errorlog
Ссылка: Internals of the Seven SQL Server Sorts – Part 1
Ссылка: http://sqlcat.com/sqlcat/b/technicalnotes/archive/2008/04/21/tuning-the-performance-of-backup-compression-in-sql-server-2008.aspx


Флаг трассировки: 3607
Назначение: Skip recovery on startup
Ссылка: http://sqlkbs.blogspot.se/2008/01/trace-flag.html


Флаг трассировки: 3608
Назначение: Prevents SQL Server from automatically starting and recovering any database except the master database.
If activities that require tempdb are initiated, then model is recovered and tempdb is created. Other databases will be started and recovered when accessed.
Some features, such as snapshot isolation and read committed snapshot, might not work.
Use for Move System Databases and Move User Databases.
Замечание: Do not use during normal operation.
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 3609
Назначение: Do not create tempdb at startup
Ссылка: http://basitaalishan.com/2012/02/20/essential-trace-flags-for-recovery-debugging/


Флаг трассировки: 3610
Назначение: SQL 9 — Divide by zero to result in NULL instead of error
Ссылка: Нет


Флаг трассировки: 3625
Назначение: Limits the amount of information returned to users who are not members of the sysadmin fixed server role, by masking the parameters of some error messages using '**'.
This can help prevent disclosure of sensitive information.
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 3626
Назначение: Turns on tracking of the CPU data for the sysprocesses table.
Ссылка: Нет


Флаг трассировки: 3635
Назначение: Print diagnostic information. Trace Flag 3635 Diagnostics are written to the console that started it.
There are not written to the errorlog, even if 3605 is turned on.
Ссылка: Нет


Флаг трассировки: 3640
Назначение: Eliminates sending DONE_IN_PROC messages to client for each statement in stored procedure. This is similar to the session setting of SET NOCOUNT ON, but when set as a trace flag, every client session is handled this way.
Ссылка: Нет


Флаг трассировки: 3654
Function:Allocations to stack
Ссылка: Нет


Флаг трассировки: 3656
Назначение: Enables resolve of all call stacks in extended events
Ссылка: http://sqlcat.com/sqlcat/b/msdnmirror/archive/2010/05/11/resolving-dtc-related-waits-and-tuning-scalability-of-dtc.aspx


Флаг трассировки: 3659
Назначение: Enables logging all errors to error log during server startup
Ссылка: http://spaghettidba.com/2011/05/20/trace-flag-3659/


Флаг трассировки: 3688
Назначение: Removes messages to error log about traces started and stopped
Ссылка: http://support.microsoft.com/kb/922578/en-us


Флаг трассировки: 3689
Назначение: Logs extended errors to errorlog when network disconnect occurs, turned off by default. Will dump out the socket error code this can sometimes give you a clue as to the root cause.
Ссылка: http://support.microsoft.com/kb/922578/en-us


Флаг трассировки: 3801
Назначение: Prohibits use of USE DB statement
Ссылка: Нет


Флаг трассировки: 3913
Назначение: SQL 7/8 — SQL Server does not update the rowcnt column of the sysindexes system table until the transaction is committed. When turned on the optimizer gets row count information from in-memory metadata that is saved to sysindexes system table when the transaction commits.
Ссылка: Нет


Флаг трассировки: 3923
Назначение: Let SQL Server throw an exception to the application when the 3303 warning message is raised
Ссылка: https://support.microsoft.com/kb/3014867/en-us


Флаг трассировки: 4001
Назначение: Very verbose logging of each login attempt to the error log. Includes tons of information
Ссылка: Нет


Флаг трассировки: 4010
Назначение: Allows only shared memory connections to the SQL Server. Meaning, you will only be able to connect from the server machine itself. Client connections over TCP/IP or named pipes will not happen.
Ссылка: Нет


Флаг трассировки: 4013
Назначение: Log each new connection the error log
Ссылка: http://sqlkbs.blogspot.se/2008/01/trace-flag.html


Флаг трассировки: 4020
Назначение: Boot without recover
Ссылка: Нет


Флаг трассировки: 4022
Назначение: Bypass Startup procedures
Ссылка: http://www.sqlservice.se/sv/start/blogg/sql-server-2012-cu1-upgrade-step--msdb110_upgrade-sql--encountered-error-547.aspx


Флаг трассировки: 4029
Назначение: Logs extended errors to errorlog when network disconnect occurs, turned off by default. Will dump out the socket error code this can sometimes give you a clue as to the root cause.
Ссылка: Нет


Флаг трассировки: 4030
Назначение: Prints both a byte and ASCII representation of the receive buffer. Used when you want to see what queries a client is sending to SQL Server. You can use this trace flag if you experience a protection violation and want to determine which statement caused it. Typically, you can set this flag globally or use SQL Server Enterprise Manager. You can also use DBCC INPUTBUFFER.
Ссылка: Нет


Флаг трассировки: 4031
Назначение: Prints both a byte and ASCII representation of the send buffers (what SQL Server sends back to the client). You can also use DBCC OUTPUTBUFFER.
Ссылка: Нет


Флаг трассировки: 4032
Назначение: Traces the SQL commands coming in from the client. When enabled with 3605 it will direct those all to the error log.
Ссылка: Нет


Флаг трассировки: 4044
Назначение: SA account can be unlocked by rebooting server with trace flag. If sa (or sso_role) password is lost, add this to your RUN_serverfile. This will generate new password when server started.
Ссылка: Нет


Флаг трассировки: 4052
Назначение: SQL 9+ Prints TDS packets sent to the client (output) to console. Startup only.
Ссылка: Нет


Флаг трассировки: 4055
Назначение: SQL 9+ Prints TDS packets received from the client to console. Startup only.
Ссылка: Нет


Флаг трассировки: 4102
Назначение: SQL 9 — Query performance is slow if the execution plan of the query contains semi join operators Typically, semi join operators are generated when the query contains the IN keyword or the EXISTS keyword. Enable flag 4102 and 4118 to overcome this.
Ссылка: https://support.microsoft.com/en-us/kb/940128


Флаг трассировки: 4104
Назначение: SQL 9 — Overestimating cardinality of JOIN operator. When additional join predicates are involved, this problem may increase the estimated cost of the JOIN operator to the point where the query optimizer chooses a different join order. When the query optimizer chooses a different join order, SQL 9 system performance may be slow.
Ссылка: https://support.microsoft.com/en-us/kb/920346


Флаг трассировки: 4107
Назначение: SQL 9 — When you run a query that references a partitioned table, query performance may decrease
Ссылка: https://support.microsoft.com/en-us/kb/923849


Флаг трассировки: 4116
Назначение: SQL 9 — Query runs slowly when using joins between a local and a remote table
Ссылка: https://support.microsoft.com/en-us/kb/950880


Флаг трассировки: 4121
Назначение: SQL 9 — Query that involves an outer join operation runs very slowly. However, if you use the FORCE ORDER query hint in the query, the query runs much faster. Additionally, the execution plan of the query contains the following text in the Warnings column: NO JOIN PREDICATE.
Ссылка: Нет


Флаг трассировки: 4123
Назначение: Query that has many outer joins takes a long time to compile in SQL Server 2005
Ссылка: https://support.microsoft.com/en-us/kb/943060


Флаг трассировки: 4125
Назначение: SQL 9 — Query may take more time to finish if using an inner join to join a derived table that uses DISTINCT keyword
Ссылка: https://support.microsoft.com/en-us/kb/949854


Флаг трассировки: 4127
Назначение: SQL 9 — Compilation time of some queries is very long in an x64-based version.
Basically its more than execution time because more memory allocations are necessary in the compilation process.
Ссылка: https://support.microsoft.com/en-us/kb/953569


Флаг трассировки: 4130
Назначение: XML performance fix
Ссылка: http://support.microsoft.com/kb/957205


Флаг трассировки: 4134
Назначение: Bugfix for error: parallel query returning different results every time
Ссылка: http://support.microsoft.com/kb/2546901
Ссылка: http://sql-sasquatch.blogspot.se/2014/04/whaddayaknow-bout-sqlserver-trace-flag.html


Флаг трассировки: 4135
Назначение: Bugfix for error inserting to temp table
Ссылка: http://support.microsoft.com/kb/960770


Флаг трассировки: 4136
Назначение: Disables parameter sniffing unless OPTION(RECOMPILE), WITH RECOMPILE or OPTIMIZE FOR value is used.
To accomplish this at the database level, see ALTER DATABASE SCOPED CONFIGURATION (Transact-SQL).
To accomplish this at the query level, add the OPTIMIZE FOR UNKNOWN query hint.
Beginning with SQL Server 2016 SP1, to accomplish this at the query level, add the USE HINT query hint instead of using this trace flag.
Замечание: Please ensure that you thoroughly test this option, before rolling it into a production environment.
Ссылка: http://blogs.msdn.com/b/axinthefield/archive/2010/11/04/sql-server-trace-flags-for-dynamics-ax.aspx
Ссылка: http://www.sqlservice.se/sv/start/blogg/nagra-trace-flags-for-sql-server.aspx
Ссылка: New Features in SQL Server 2016 Service Pack 1
Ссылка: MSDN ms188396
Способ применения: global or session or query


Флаг трассировки: 4137
Назначение: Causes SQL Server to generate a plan using minimum selectivity when estimating AND predicates for filters to account for correlation, under the query optimizer cardinality estimation model of SQL Server 2012 and earlier versions
Beginning with SQL Server 2016 SP1, to accomplish this at the query level, add the USE HINT query hint instead of using this trace flag.
Замечание: Please ensure that you thoroughly test this option, before rolling it into a production environment.
Ссылка: http://support.microsoft.com/kb/2658214
Ссылка: New Features in SQL Server 2016 Service Pack 1
Ссылка: MSDN ms188396
Способ применения: global or session or query


Флаг трассировки: 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
Beginning with SQL Server 2016 SP1, to accomplish this at the query level, add the USE HINT query hint instead of using this trace flag.
Замечание: Please ensure that you thoroughly test this option, before rolling it into a production environment.
Ссылка: http://support.microsoft.com/kb/2667211
Ссылка: New Features in SQL Server 2016 Service Pack 1
Ссылка: MSDN ms188396
Способ применения: global or session or query


Флаг трассировки: 4139
Назначение: Enable automatically generated quick statistics (histogram amendment) regardless of key column status.
If trace flag 4139 is set, regardless of the leading statistics column status (ascending, descending, or stationary), the histogram used to estimate cardinality will be adjusted at query compile time
Beginning with SQL Server 2016 SP1, to accomplish this at the query level, add the USE HINT query hint instead of using this trace flag.
Замечание: Please ensure that you thoroughly test this option, before rolling it into a production environment.
Link: https://support.microsoft.com/en-us/kb/2952101
Ссылка: MSDN ms188396
Способ применения: global or session or query


Флаг трассировки: 4199
Назначение: Controls query optimizer changes released in SQL Server Cumulative Updates and Service Packs.
Starting with SQL Server 2016, trace flag 4199 changes that are made to previous releases of SQL Server will become enabled under database compatibility level 130 without trace flag 4199 enabled
To enable this at the database level, see ALTER DATABASE SCOPED CONFIGURATION (Transact-SQL).
Замечание: Starting with SQL Server 2016, customers are advised to remove trace flag 4199 after they migrate their databases to the latest compatibility level
because trace flag 4199 will be reused for future query optimizer changes that may not apply to your application and could cause unexpected plan performance changes on a production system.
This means that different trace flag 4199 changes are enabled for each compatibility level that is supported in a given product release.

Ссылка: http://www.sqlservice.se/sv/start/blogg/one-trace-flag-to-rule-them-all.aspx
Ссылка: https://msdn.microsoft.com/en-us/library/bb510411.aspx#TraceFlag
Ссылка: https://support.microsoft.com/en-us/kb/974006
Ссылка: New Features in SQL Server 2016 Service Pack 1
Ссылка: MSDN ms188396
Способ применения: global or session


Флаг трассировки: 4606
Назначение: Over comes SA password by startup. Disables password policy check during server startup.
Ссылка: https://support.microsoft.com/en-us/kb/936892


Флаг трассировки: 4610
Назначение: When you use trace flag 4618 together with trace flag 4610, the number of entries in the cache store is limited to 8,192. When the limit is reached, SQL 2005 removes some entries from the TokenAndPermUserStore cache store.
Ссылка: https://support.microsoft.com/en-us/kb/959823
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 4612
Назначение: Disable the ring buffer logging — no new entries will be made into the ring buffer
Ссылка: Нет


Флаг трассировки: 4613
Назначение: Generate a minidump file whenever an entry is logged into the ring buffer
Ссылка: Нет


Флаг трассировки: 4614
Назначение: Enables SQL Server authenticated logins that use Windows domain password policy enforcement to log on to the instance even though the SQL Server service account is locked out or disabled on the Windows domain controller.
Ссылка: https://support.microsoft.com/en-us/kb/925744


Флаг трассировки: 4616
Назначение: Makes server-level metadata visible to application roles.
In SQL Server, an application role cannot access metadata outside its own database because application roles are not associated with a server-level principal.
This is a change of behavior from earlier versions of SQL Server.
Setting this global flag disables the new restrictions, and allows for application roles to access server-level metadata.
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 4618
Назначение: Limits number of entries per user cache store to 1024.
It may incur a small CPU overhead as when removing old cache entries when new entries are inserted.
It performs this action to limit the size of the cache store growth. However, the CPU overhead is spread over time.
When used together with trace flag 4610 increases the number of entries in the TokenAndPermUserStore cache store to 8192
Ссылка: MSDN ms188396
Ссылка: https://support.microsoft.com/en-us/kb/933564
Способ применения: global only


Флаг трассировки: 4621
Назначение: SQL 9 – After 4610 & 4618 you can still customize the quota for TokenAndPermUserStore cache store that is based on the current workload
Ссылка: https://support.microsoft.com/en-us/kb/959823


Флаг трассировки: 5101
Назначение: Forces all I/O requests to go through engine 0.
This removes the contention between processors but could create a bottleneck if engine 0 becomes busy with non-I/O tasks.
Ссылка: Нет


Флаг трассировки: 5102
Назначение: Prevents engine 0 from running any non-affinitied tasks.
Ссылка: Нет


Флаг трассировки: 5302
Назначение: Alters default behavior of select…INTO (and other processes) that lock system tables for the duration of the transaction.
This trace flag disables such locking during an implicit transaction.
Ссылка: Нет


Флаг трассировки: 6498
Назначение: Enables more than one large query compilation to gain access to the big gateway when there is sufficient memory available.
It is based on the 80 percentage of SQL Server Target Memory, and it allows for one large query compilation per 25 gigabytes (GB) of memory.
Замечание: Beginning with SQL Server 2014 SP2 and SQL Server 2016 this behavior is controlled by the engine and trace flag 6498 has no effect.
Ссылка: https://support.microsoft.com/en-us/kb/3024815
Ссылка: MSDN ms188396
Ссылка: http://blogs.msdn.com/b/sql_server_team/archive/2015/10/09/query-compile-big-gateway-policy-changes-in-sql-server.aspx
Способ применения: global only


Флаг трассировки: 6527
Назначение: Disables generation of a memory dump on the first occurrence of an out-of-memory exception in CLR integration.
By default, SQL Server generates a small memory dump on the first occurrence of an out-of-memory exception in the CLR.
The behaviour of the trace flag is as follows: If this is used as a startup trace flag, a memory dump is never generated.
However, a memory dump may be generated if other trace flags are used.
If this trace flag is enabled on a running server, a memory dump will not be automatically generated from that point on.
However, if a memory dump has already been generated due to an out-of-memory exception in the CLR, this trace flag will have no effect.
Ссылка: MSDN ms188396
Способ применения: global


Флаг трассировки: 6532
Назначение: Enables performance improvement of query operations with spatial data types in SQL Server 2012 and SQL Server 2014.
The performance gain will vary, depending on the configuration, the types of queries, and the objects.
Ссылка: KB3107399
Ссылка: MSDN ms188396
Способ применения: global and session


Флаг трассировки: 6533
Назначение: Enables performance improvement of query operations with spatial data types in SQL Server 2012 and SQL Server 2014.
The performance gain will vary, depending on the configuration, the types of queries, and the objects.
Ссылка: KB3107399
Ссылка: MSDN ms188396
Способ применения: global and session


Флаг трассировки: 6534
Назначение: Enables performance improvement of query operations with spatial data types in SQL Server 2012, SQL Server 2014 and SQL Server 2016.
The performance gain will vary, depending on the configuration, the types of queries, and the objects.
Ссылка: https://support.microsoft.com/en-us/kb/3054180
Ссылка: KB3107399
Ссылка: https://blogs.msdn.microsoft.com/bobsql/2016/06/03/sql-2016-it-just-runs-faster-native-spatial-implementations/
Ссылка: MSDN ms188396
Способ применения: global and session


Флаг трассировки: 7103
Назначение: Disable table lock promotion for text columns
Ссылка: https://support.microsoft.com/en-us/kb/230044


Флаг трассировки: 7300
Назначение: Outputs extra info about linked server errors
Ссылка: http://support.microsoft.com/kb/314530


Флаг трассировки: 7314
Назначение: Forces NUMBER values with unknown precision/scale to be treated as double values with OLE DB provider
Ссылка: MSDN ms188396
Ссылка: https://support.microsoft.com/en-us/kb/3051993
Способ применения: global and session


Флаг трассировки: 7352
Назначение: Show the optimizer output and the post-optimization rewrite in action
Ссылка: Internals of the Seven SQL Server Sorts – Part 1


Флаг трассировки: 7412
Назначение: Enables the lightweight query execution statistics profiling infrastructure
Ссылка: MSDN ms188396
Ссылка: https://support.microsoft.com/en-us/kb/3170113
Способ применения: global only


Флаг трассировки: 7470
Назначение: Fix for sort operator spills to tempdb in SQL Server 2012 or SQL Server 2014 when estimated number of rows and row size are correct
Ссылка: https://support.microsoft.com/en-us/kb/3088480


Флаг трассировки: 7471
Назначение: Running multiple UPDATE STATISTICS for different statistics on a single table concurrently
Ссылка: https://support.microsoft.com/en-us/kb/3156157
Ссылка: http://sqlperformance.com/2016/05/sql-performance/parallel-rebuilds


Флаг трассировки: 7501
Назначение: Dynamic cursors are used by default on forward-only cursors.
Dynamic cursors are faster than in earlier versions and no longer require unique indexes.
This flag disables the dynamic cursor enhancements and reverts to version 6.0 behavior.
Ссылка: https://support.microsoft.com/en-us/kb/152032


Флаг трассировки: 7502
Назначение: Disable cursor plan caching for extended stored procedures
Ссылка: http://basitaalishan.com/2012/02/20/essential-trace-flags-for-recovery-debugging/


Флаг трассировки: 7505
Назначение: Enables version 6.x handling of return codes when calling dbcursorfetchex and the resulting cursor position follows the end of the cursor result set
Ссылка: Нет


Флаг трассировки: 7525
Назначение: SQL 8 — Reverts to ver 7 behavior of closing nonstatic cursors regardless of the SET CURSOR_CLOSE_ON_COMMIT state
Ссылка: Нет


Флаг трассировки: 7601
Назначение: Helps in gathering more information in full text search by turning on full text tracing which gathers information on indexing process using the error log. Also 7603, 7604, 7605 trace flags.
Ссылка: Нет


Флаг трассировки: 7608
Назначение: Performance fix for slow full text population with a composite clustered index
Ссылка: https://support.microsoft.com/en-us/kb/938672


Флаг трассировки: 7613
Назначение: SQL 9 — Search results are missing when performing a full-text search operation on Win SharePoint Services 2.0 site after upgrading
Ссылка: https://support.microsoft.com/en-us/kb/927643


Флаг трассировки: 7614
Назначение: SQL 9 — Full-text index population for the indexed view is very slow
Ссылка: https://support.microsoft.com/en-us/kb/928537


Флаг трассировки: 7646
Назначение: SQL 10 — Avoids blocking when using full text indexing. An issue we experienced that full text can be slow when there is a high number of updates to the index and is caused by blocking on the docidfilter internal table.
Ссылка: Нет


Флаг трассировки: 7806
Назначение: SQL 9 — Enables a dedicated administrator connection on SQL Express, DAC resources are not reserved by default
Ссылка: MSDN ms188396
Ссылка: https://msdn.microsoft.com/en-us/library/ms189595.aspx
Способ применения: global only


Флаг трассировки: 7826
Назначение: Disable Connectivity ring buffer
Ссылка: http://blogs.msdn.com/b/sql_protocols/archive/2008/05/20/connectivity-troubleshooting-in-sql-server-2008-with-the-connectivity-ring-buffer.aspx


Флаг трассировки: 7827
Назначение: Record connection closure info in ring buffer
Ссылка: http://blogs.msdn.com/b/sql_protocols/archive/2008/05/20/connectivity-troubleshooting-in-sql-server-2008-with-the-connectivity-ring-buffer.aspx
Ссылка: https://connect.microsoft.com/SQLServer/feedback/details/518158/-packet-error-a-fatal-error-occurred-while-reading-the-input-stream-from-the-network


Флаг трассировки: 8002
Назначение: Changes CPU Affinity behaviour
Ссылка: http://support.microsoft.com/kb/818769


Флаг трассировки: 8004
Назначение: SQL server to create a mini-dump once you enable 2551 and a out of memory condition is hit
Ссылка: Нет


Флаг трассировки: 8010
Назначение: Fixes problem that SQL Server services can not be stopped
Ссылка: http://support.microsoft.com/kb/2633271/en-us


Флаг трассировки: 8011
Назначение: Disable the ring buffer for Resource Monitor
Ссылка: KB920093
Ссылка: MSDN ms188396
Способ применения: global and session


Флаг трассировки: 8012
Назначение: Disable the ring buffer for schedulers
Ссылка: KB920093
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 8015
Назначение: Disable auto-detection and NUMA setup
Ссылка: https://support.microsoft.com/en-us/kb/948450
Ссылка: MSDN ms188396
Ссылка: http://sql-sasquatch.blogspot.se/2013/04/startup-trace-flags-i-love.html
Способ применения: global only


Thanks to: @sql_handle (https://twitter.com/sql_handle)


Флаг трассировки: 8017
Назначение: Upgrade version conflict
Ссылка: http://social.msdn.microsoft.com/Forums/eu/sqlexpress/thread/dd6fdc16-9d8d-4186-9549-85ba4c322d10
Ссылка: http://connect.microsoft.com/SQLServer/feedback/details/407692/indicateur-de-trace-8017-reported-while-upgrading-from-ssee2005-to-ssee2008


Флаг трассировки: 8018
Назначение: Disable the exception ring buffer
Ссылка: KB920093
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 8019
Назначение: Disable stack collection for the exception ring buffer
Ссылка: KB920093
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 8020
Назначение: Disable working set monitoring
Ссылка: KB920093
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 8021
Назначение: On some lower end hardware we used to get reported that each CPU has its own NUMA node.
This was usually incorrect and when we detected only a single CPU per NODE we would assume NO NUMA.
Trace flag 8021 disables this override.
Ссылка: https://blogs.msdn.microsoft.com/psssql/2011/11/11/sql-server-clarifying-the-numa-configuration-information/


Флаг трассировки: 8024
Назначение: When this TF is on, it affects the mini-dump generation logic for the 1788* errors:
"To capture a mini-dump, one of the following checks must also be met.


  1. The non-yielding workers CPU utilization must be > 40 percent.
  2. The SQL Server process is not starved for overall CPU resource utilization.
    Additional check #1 is targeted at runaway CPU users. Additional check #2 is targeted
    at workers with lower utilizations that are probably stuck in an API call or similar activity."
    Ссылка: [How To Diagnose and Correct Errors 17883, 17884, 17887, and 17888]

Флаг трассировки: 8026
Назначение: SQL Server will clear a dump trigger after generating the dump once
Ссылка: http://support.microsoft.com/kb/917825/en-us


Флаг трассировки: 8030
Назначение: Fix for performance bug
Ссылка: http://support.microsoft.com/kb/917035
Ссылка: http://www.sqlservice.se/sv/start/blogg/sql-server-2005-slowing-down-after-a-while.aspx


Флаг трассировки: 8032
Назначение: Alters cache limit settings
Предупреждение: Trace flag 8032 can cause poor performance if large caches make less memory available for other memory consumers, such as the buffer pool.
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 8033
Назначение: Alters cache limit settings
Предупреждение: SQL 9 — Disable the reporting of CPU Drift errors in the SQL Server error log like time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
Ссылка: Нет


Флаг трассировки: 8038
Назначение: Will drastically reduce the number of context switches when running SQL 2005 or 2008
Ссылка: KB972767
Ссылка: http://forum.proxmox.com/threads/15844-Win7-x64-guest-with-SQLServer-2012-High-CPU-usage
Ссылка: TECHNET List Of SQL Server Trace Flags


Флаг трассировки: 8040
Назначение: Disables Resource Governor
Ссылка: http://www.sqlservergeeks.com/blogs/AmitBansal/sql-server-bi/64/sql-server-disabling-resource-governor-permanently-somewhat


Флаг трассировки: 8048
Назначение: Converts NUMA partitioned memory objects into CPU partitioned
Ссылка: http://sql-sasquatch.blogspot.se/2013/04/startup-trace-flags-i-love.html
Ссылка: https://support.microsoft.com/en-us/kb/2809338
Ссылка: http://blogs.msdn.com/b/psssql/archive/2012/12/20/how-it-works-cmemthread-and-debugging-them.aspx
Ссылка: MSDN ms188396
Ссылка: http://blogs.msdn.com/b/psssql/archive/2011/09/01/sql-server-2008-2008-r2-on-newer-machines-with-more-than-8-cpus-presented-per-numa-node-may-need-trace-flag-8048.aspx
Замечание: Beginning with SQL Server 2014 SP2 and SQL Server 2016 this behavior is controlled by the engine and trace flag 8048 has no effect.
Способ применения: global only


Thanks to: @sql_handle (https://twitter.com/sql_handle)
Related to: 8015, 9024


Флаг трассировки: 8049
Назначение: SQL 9+ Startup only – Allows use of 1ms times even when patched. Check 8038 for details.
Ссылка: KB972767


Флаг трассировки: 8050
Назначение: Causes "optional" wait types (see the CSS article) to be excluded when querying sys.dm_os_wait_stats
Ссылка: https://blogs.msdn.microsoft.com/psssql/2009/11/02/the-sql-server-wait-type-repository/


Флаг трассировки: 8079
Назначение: Allows SQL Server 2014 SP2 to interrogate the hardware layout and automatically configure Soft-NUMA on systems reporting 8 or more CPUs per NUMA node.
The automatic Soft-NUMA behavior is Hyperthread (HT/logical processor) aware.
The partitioning and creation of additional nodes scales background processing by increasing the number of listeners, scaling and network and encryption capabilities.
Замечание: This trace flag applies to SQL Server 2014 SP2. Beginning with SQL Server 2016 this behavior is controlled by the engine and trace flag 8048 has no effect.
Ссылка: KB972767
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 8202
Назначение: Used to replicate UPDATE as DELETE/INSERT pair at the publisher. i.e.
UPDATE commands at the publisher can be run as an "on-page DELETE/INSERT" or a "full DELETE/INSERT".
If the UPDATE command is run as an "on-page DELETE/INSERT," the Logreader send UDPATE command to the subscriber,
If the UPDATE command is run as a "full DELETE/INSERT," the Logreader send UPDATE as DELETE/INSERT Pair.
If you turn on trace flag 8202, then UPDATE commands at the publisher will be always send to the subscriber as DELETE/INSERT pair.
Ссылка: Нет


Флаг трассировки: 8203
Назначение: Display statement and transaction locks on a deadlock error
Ссылка: Нет


Флаг трассировки: 8206
Назначение: SQL 8 — Supports stored procedure execution with a user specified owner name for SQL Server subscribers or without owner qualification for heterogeneous subscribers
Ссылка: Нет


Флаг трассировки: 8207
Назначение: Enables singleton updates for Transactional Replication. Updates to subscribers can be replicated as a DELETE and INSERT pair.
This might not meet business rules, such as firing an UPDATE trigger. With trace flag 8207 an update to a unique column that affects only one row (a singleton update) is replicated as an UPDATE and not as a DELETE or INSERT pair.
If the update affects a column on which has a unique constraint or if the update affects multiple rows, the update is still replicated as a DELETE or INSERT pair.
Ссылка: https://blogs.msdn.microsoft.com/psssql/2009/11/02/the-sql-server-wait-type-repository/
Ссылка: MSDN ms188396
Ссылка: https://support.microsoft.com/en-us/kb/302341
Способ применения: global only


Флаг трассировки: 8209
Назначение: Output extra information to error log regarding replication of schema changes in SQL Server Replication
Ссылка: http://support.microsoft.com/kb/916706/en-us


Флаг трассировки: 8295
Назначение: Creates a secondary index on the identifying columns on the change tracking side table at enable time
Link: https://social.msdn.microsoft.com/forums/sqlserver/en-US/00250311-7991-47b0-b788-7fae2e102254/trace-flag-8295
Thanks to: Wilfred van Dijk


Флаг трассировки: 8446
Назначение: Databases in SQL 8 do not have a Service Broker ID. If you restore these databases on SQL 9 by using the WITH NORECOVERY option, these databases will not be upgraded causing mirroring & log-shipping configurations to fail.
Ссылка: https://support.microsoft.com/en-us/kb/959008


Флаг трассировки: 8501
Назначение: Writes detailed information about Ms-DTC context & state changes to the log
Ссылка: Нет


Флаг трассировки: 8599
Назначение: Allows you to use a save-point within a distributed transaction
Ссылка: Нет


Флаг трассировки: 8602
Назначение: Disable Query Hints
Ссылка: http://www.sqlservice.se/sv/start/blogg/sql-server-trace-flag-8602.aspx


Флаг трассировки: 8605
Назначение: Displays logical and physical trees used during the optimization process
Ссылка: More Undocumented Query Optimizer Trace Flags
Ссылка: Yet another X-Ray for the QP


Флаг трассировки: 8606
Назначение: Show LogOp Trees
Ссылка: Cardinality Estimation Framework 2014 First Look
Ссылка: Yet another X-Ray for the QP


Флаг трассировки: 8607
Назначение: Displays the optimization output tree during the optimization process
Ссылка: Internals of the Seven SQL Server Sorts – Part 1
Ссылка: More Undocumented Query Optimizer Trace Flags
Ссылка: Yet another X-Ray for the QP


Флаг трассировки: 8612
Назначение: Add Extra Info to the Trees Output
Ссылка: Cardinality Estimation Framework 2014 First Look


Флаг трассировки: 8615
Назначение: Display the final memo structure
Ссылка: http://www.benjaminnevarez.com/2012/04/inside-the-query-optimizer-memo-structure/
Ссылка: http://www.somewheresomehow.ru/optimizer-part-3-full-optimiztion-optimization-search0/


Флаг трассировки: 8619
Назначение: Show Applied Transformation Rules
Ссылка: http://sqlblog.com/blogs/paul_white/archive/2013/02/06/incorrect-results-with-indexed-views.aspx
Ссылка: Cardinality Estimation Framework 2014 First Look
Ссылка: Yet another X-Ray for the QP


Флаг трассировки: 8620
Назначение: Add memo arguments to trace flag 8619
Ссылка: Query Optimizer Deep Dive — Part 4
Ссылка: Yet another X-Ray for the QP


Флаг трассировки: 8621
Назначение: Rule with resulting tree
Ссылка: Query Optimizer Deep Dive — Part 4
Ссылка: Yet another X-Ray for the QP


Флаг трассировки: 8628
Назначение: When used with TF 8666, causes extra information about the transformation rules applied to be put into the XML showplan.
Ссылка: Yet another X-Ray for the QP


Флаг трассировки: 8649
Назначение: Set Cost Threshold for parallelism from 1 to 0
Ссылка: http://www.sqlservice.se/sv/start/blogg/enable-parallellism-for-specific-query.aspx


Флаг трассировки: 8666
Назначение: CQScanPartitionSortNew is one of only two sort classes that sets the Soft Sort property exposed when Sort operator execution plan properties are generated with undocumented trace flag 8666 enabled
Ссылка: Internals of the Seven SQL Server Sorts – Part 1
Ссылка: Yet another X-Ray for the QP


Флаг трассировки: 8675
Назначение: Displays the query optimization phases for a specific optimization
Ссылка: More Undocumented Query Optimizer Trace Flags


Флаг трассировки: 8679
Назначение: Prevents the SQL Server optimizer from using a Hash Match Team operator
Ссылка: Нет


Флаг трассировки: 8687
Назначение: Prevents the SQL Server optimizer from using a Hash Match Team operator
Ссылка: Нет


Флаг трассировки: 8690
Undocumented trace flag
Назначение: Disable the spool on the inner side of nested loop.
Spools improve performance in majority of the cases. But it’s based on estimates.
Sometimes, this can be incorrect due to unevenly distributed or skewed data, causing slow performance.
But in vast majority of situations, you don’t need to manually disable spool with this trace flag.
Ссылка: https://blogs.msdn.microsoft.com/psssql/2015/12/15/spool-operator-and-trace-flag-8690/
Ссылка: http://dba.stackexchange.com/questions/52552/index-not-making-execution-faster-and-in-some-cases-is-slowing-down-the-query


Флаг трассировки: 8721
Назначение: Reports to the error log when auto-update statistics executes
Ссылка: https://support.microsoft.com/en-us/kb/195565
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 8722
Назначение: Disable all hints except locking hints
Ссылка: http://sqlmag.com/sql-server/investigating-trace-flags


Флаг трассировки: 8744
Назначение: Disable pre-fetching for the Nested Loop operator
Ссылка: KB920093
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 8755
Назначение: Disable all locking hints
Ссылка: http://sqlmag.com/sql-server/investigating-trace-flags


Флаг трассировки: 8757
Назначение: Skip trivial plan optimization and force a full optimization
Ссылка: More Undocumented Query Optimizer Trace Flags


Флаг трассировки: 8765
Назначение: Allows use of variable length data, from ODBC driver; fixes the issue of a field returning the wrong data length
Ссылка: Нет


Флаг трассировки: 8780
Назначение: Give the optimizer more time to find a better plan
Ссылка: http://www.sqlservice.se/sv/start/blogg/sql-server-trace-flag--8780.aspx


Флаг трассировки: 8783
Назначение: Allows DELETE, INSERT, and UPDATE statements to honor the SET ROWCOUNT ON setting when enabled
Ссылка: Нет


Флаг трассировки: 8809
Назначение: Extended Page Heap Activities.
Referenced in passing in the CSS article in relation to debugging memory scribbler problems.
Ссылка: https://blogs.msdn.microsoft.com/psssql/2012/11/12/how-can-reference-counting-be-a-leading-memory-scribbler-cause/


Флаг трассировки: 8816
Назначение: Logs every two-digit year conversion to a four-digit year
Ссылка: Нет


Флаг трассировки: 9024
Назначение: Converts a global log pool memory object into NUMA node partitioned memory object
Замечание: Beginning with SQL Server 2012 SP3 and SQL Server 2014 SP1 this behavior is controlled by the engine and trace flag 9024 has no effect.
Ссылка: https://support.microsoft.com/en-us/kb/2809338
Ссылка: MSDN ms188396
Способ применения: global only
Related to: 8048


Флаг трассировки: 9059
Назначение: SQL 8 — Turns back behavior to SP3 after a SP4 installation, this allows to choose an index seek when comparing numeric columns or numeric constants that are of different precision or scale; else would have to change schema/code.
Ссылка: Нет


Флаг трассировки: 9082
Назначение: SQL 9 — Stored procedure using views, perform slow compared to ver 8 if views use JOIN operator and contain sub queries
Ссылка: https://support.microsoft.com/en-us/kb/942906


Флаг трассировки: 9130
Назначение: Disables the particular copy out stage rewrite from Filter + (Scan or Seek) to (Scan or Seek) + Residual Predicate.
Enabling this flag retains the Filter in the final execution plan, resulting in a SQL Server 2008+ plan that mirrors the 2005 version.
Ссылка: http://sqlblog.com/blogs/paul_white/archive/2012/10/15/cardinality-estimation-bug-with-lookups-in-sql-server-2008-onward.aspx
Ссылка: http://sqlblogcasts.com/blogs/sqlandthelike/archive/2012/12/06/my-new-favourite-traceflag.aspx
Ссылка: http://sqlblog.com/blogs/paul_white/archive/2013/06/11/hello-operator-my-switch-is-bored.aspx
Ссылка: https://connect.microsoft.com/SQLServer/feedback/details/767395/cardinality-estimation-error-with-pushed-predicate-on-a-lookup
Ссылка: http://www.theboreddba.com/Categories/FunWithFlags/Revealing-Predicates-in-Execution-Plans-(TF-9130).aspx


Флаг трассировки: 9134
Назначение: SQL 8 — Does additional reads to test if the page is allocated & linked correctly this checks IAM & PFS. Fixes error 601 for queries under Isolation level read uncommitted. In case performance is affected (because of a bug) apply SP4.
Ссылка: Нет


Флаг трассировки: 9185
Назначение: Cardinality estimates for literals that are outside the
histogram range are very low
Ссылка: https://support.microsoft.com/en-us/kb/kbview/833406
Related to: 9205


Флаг трассировки: 9204
Назначение: Output Statistics used by Query Optimizer. When enabled and a plan is compiled or recompiled there is a listing of statistics which is being fully loaded & used to produce cardinality and distribution estimates for some plan alternative or other.
Ссылка: http://sqlblog.com/blogs/paul_white/archive/2011/09/21/how-to-find-the-statistics-used-to-compile-an-execution-plan.aspx
Related to: 9292


Флаг трассировки: 9205
Назначение: Cardinality estimates for literals that are outside the histogram range are very low for tables that have parent-child relationships
Ссылка: https://support.microsoft.com/en-us/kb/kbview/833406
Related to: 9185


Флаг трассировки: 9207
Назначение: Fixes that SQL Server underestimates the cardinality of a query expression and query performance may be slow
Ссылка: https://support.microsoft.com/en-us/kb/831302


Флаг трассировки: 9259
Назначение: SQL 9/10 — An access violation occurs on running a query marked by the following message and a dump in the log folder: KB 970279 / 971490. Msg 0, Level 11, State 0, Line 0 — A severe error occurred on the current command. The results, if any, should be discarded.
Ссылка: Нет


Флаг трассировки: 9268
Назначение: SQL 8 — When SQL Server runs a parameterized query that contains several IN clauses, each with a large number of values, SQL Server may return the following error message after a minute or more of high CPU utilization: KB 325658. Server: Msg 8623, Level 16, State 1. Internal Query Processor Error: The query processor could not produce a query plan. Contact your primary support provider for more information.
Ссылка: Нет


Флаг трассировки: 9292
Назначение: Output Statistics considered to be used by Query Optimizer
Ссылка: http://sqlblog.com/blogs/paul_white/archive/2011/09/21/how-to-find-the-statistics-used-to-compile-an-execution-plan.aspx
Related to: 9204


Флаг трассировки: 9347
Назначение: Disables batch mode for sort operator. SQL Server 2016 introduces a new batch mode sort operator that boosts performance for many analytical queries.
Ссылка: https://support.microsoft.com/en-us/kb/3172787
Ссылка: MSDN ms188396
Ссылка: Niko Neugebauer Columnstore Indexes – part 86
Способ применения: global only


Флаг трассировки: 9349
Ссылка: https://support.microsoft.com/en-us/kb/3172787
Назначение: Disables batch mode for top N sort operator. SQL Server 2016 introduces a new batch mode top sort operator that boosts performance for many analytical queries.
Ссылка: MSDN ms188396
Ссылка: Niko Neugebauer Columnstore Indexes – part 86
Способ применения: global or session or query


Флаг трассировки: 9358
Назначение: Disable batch mode sort operations in a complex parallel query. For example, this flag could apply if the query contains merge join operations.
Ссылка: Niko Neugebauer Columnstore Indexes – part 86
Ссылка: https://support.microsoft.com/en-us/kb/3171555


Флаг трассировки: 9389
Назначение: Enables 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.
Ссылка: Niko Neugebauer Columnstore Indexes – part 86
Ссылка: MSDN ms188396
Способ применения: global or session


Флаг трассировки: 9453
Назначение: Disables Batch Mode in Parallel Columnstore query plans.
(Note that a plan using batch mode appears to require a recompile before the TF takes effect)
Sunil Agarwal also used this trace flag in demo scripts for a PASS 2014 session on column store indexing
Ссылка: Niko Neugebauer Columnstore Indexes – part 35
Ссылка: http://sqlmag.com/sql-server/what-you-need-know-about-batch-mode-window-aggregate-operator-sql-server-2016-part-1


Флаг трассировки: 9471
Назначение: Causes SQL Server to generate a plan using minimum selectivity for single-table filters, under the query optimizer cardinality estimation model of SQL Server 2014 through SQL Server 2016 versions.
Beginning with SQL Server 2016 SP1, to accomplish this at the query level, add the USE HINT query hint instead of using this trace flag.
Замечание: Please ensure that you thoroughly test this option, before rolling it into a production environment.
Ссылка: New Features in SQL Server 2016 Service Pack 1
Ссылка: MSDN ms188396
Способ применения: global or session or query


Флаг трассировки: 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 through SQL Server 2016 versions.
Beginning with SQL Server 2016 SP1, to accomplish this at the query level, add the USE HINT query hint instead of using this trace flag.
Замечание: Please ensure that you thoroughly test this option, before rolling it into a production environment.
Ссылка: https://support.microsoft.com/en-us/kb/3189675
Ссылка: New Features in SQL Server 2016 Service Pack 1
Ссылка: MSDN ms188396
Способ применения: global or session or query


Флаг трассировки: 9481
Назначение: Enables you to set the query optimizer cardinality estimation model to the SQL Server 2012 and earlier version independent of the compatibility level of the database.
To accomplish this at the database level, see ALTER DATABASE SCOPED CONFIGURATION (Transact-SQL).
To accomplish this at the query level, add the QUERYTRACEONquery hint
Ссылка: http://support.microsoft.com/kb/2801413
Ссылка: New Features in SQL Server 2016 Service Pack 1
Ссылка: https://sqlserverscotsman.wordpress.com/2016/11/28/a-guide-on-forcing-the-legacy-ce/
Ссылка: MSDN ms188396
Способ применения: global or session or query


Флаг трассировки: 9485
Назначение: Disables SELECT permission for DBCC SHOW_STATISTICS
Ссылка: https://support.microsoft.com/en-us/kb/2683304
Ссылка: MSDN ms188396
Способ применения: global only


Флаг трассировки: 9495
Назначение: Disables parallelism during insertion for INSERT...SELECT operations and it applies to both user and temporary tables
Ссылка: https://support.microsoft.com/en-us/kb/3180087
Ссылка: MSDN ms188396
Способ применения: global or session


Флаг трассировки: 9532
Назначение: SQL 11 CTP3 — to get more than 1 availability group replica in CTP3 Scope Startup
Ссылка: http://connect.microsoft.com/SQLServer/feedback/details/682581/denali-hadron-read-only-routing-url-is-not-yet-implemente


Флаг трассировки: 9567
Назначение: Enables compression of the data stream for availability groups during automatic seeding.
Compression can significantly reduce the transfer time during automatic seeding and will increase the load on the processor.
Ссылка: MSDN ms188396
Ссылка: https://www.mssqltips.com/sqlservertip/4537/sql-server-2016-availability-group-automatic-seeding/
Ссылка: https://msdn.microsoft.com/en-us/library/mt735149.aspx
Ссылка: MSDN mt736907
Способ применения: global or session


Флаг трассировки: 9592
Назначение: Enables log stream compression for synchronous availability groups.
This feature is disabled by default on synchronous availability groups because compression adds latency.
Ссылка: MSDN ms188396
Ссылка: MSDN mt736907
Способ применения: global or session


Флаг трассировки: 9806
Назначение: Unknown. Is turned on on SQL Server 2014 CTP1 standard installation in Windows Azure VM
Ссылка: Нет


Флаг трассировки: 9807
Назначение: Unknown. Is turned on on SQL Server 2014 CTP1 standard installation in Windows Azure VM
Ссылка: Нет


Флаг трассировки: 9808
Назначение: Unknown. Is turned on on SQL Server 2014 CTP1 standard installation in Windows Azure VM
Ссылка: Нет


Флаг трассировки: 9830
Undocumented trace flag
Назначение: Activate the trace flag before creating a natively compiled procedure.
If you now open up the SQL Server error log you should see the compilation process for the natively compiled procedure.
This is an undocumented trace flag so please don’t use this on a production system.
Ссылка: https://web.archive.org/web/20160327221828/http://speedysql.com/2015/10/28/new-trace-flag-for-in-memory-oltp-hekaton/


Флаг трассировки: 9851
Undocumented trace flag
Назначение: For testing purposes, you might want to turn off automatic merging of files, so that you can more readily
explore this metadata. You can do that by turning on the undocumented trace flag 9851. And of course,
be sure to turn off the trace flag when done testing.
Ссылка: http://gsl.azurewebsites.net/Portals/0/Users/dewitt/talks/HekatonWhitePaper.pdf


Флаг трассировки: 10204
Назначение: Disables merge/recompress during columnstore index reorganization.
In SQL Server 2016, 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.
Замечание: Trace flag 10204 does not apply to column store indexes which are created on memory-optimized tables.
Ссылка: MSDN ms188396
Способ применения: global or session


Флаг трассировки: 10213
Назначение: Enables the option to configure compression delay in columnstore indexes in SQL Server 2016
Ссылка: http://www.nikoport.com/2016/02/04/columnstore-indexes-part-76-compression-delay/
Способ применения: session


Флаг трассировки: 10316
Назначение: Enables creation of additional indexes on internal memory-optimized staging temporal table, beside the default one.
If you have specific query pattern that includes columns which are not covered by the default index you may consider adding additional ones.
Замечание: System-versioned temporal tables for Memory-Optimized Tables are designed to provide high transactional throughput.
Please be aware that creating additional indexes may introduce overhead for DML operations that update or delete rows in the current table.
With the additional indexes you should aim to find the right balance between performance of temporal queries and additional DML overhead.

Ссылка: MSDN ms188396
Ссылка: https://support.microsoft.com/en-us/kb/3198846
Ссылка: https://blogs.msdn.microsoft.com/sqlcat/2016/12/08/improve-query-performance-on-memory-optimized-tables-with-temporal-using-new-index-creation-enhancement-in-sp1/
Способ применения: global or session

Tags:
Hubs:
Total votes 17: ↑13 and ↓4+9
Comments10

Articles