Skip to content

Commit c97e53c

Browse files
authored
Add some useful trace flags info
1 parent 2499eb3 commit c97e53c

File tree

1 file changed

+28
-17
lines changed

1 file changed

+28
-17
lines changed

SQL Server Trace Flag.md

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5410,7 +5410,8 @@ Function: Applies the default timeout set by `query wait (s)` or the Resource Go
54105410
**Note: This trace flag applies to SQL Server 2016 (13.x) SP2 CU5, SQL Server 2017 (14.x) CU14, and higher builds.**<br />
54115411
Link: [Docs Trace Flags]<br />
54125412
Link: https://support.microsoft.com/kb/4480641<br />
5413-
Scope: global or session
5413+
Scope: global or session<br />
5414+
SQL Server Version: >= 2019 RTM, >= 2017 CU14, >= 2016 SP2 CU5
54145415

54155416

54165417
<a id="11064"></a>
@@ -5420,7 +5421,8 @@ For more information on loading data into a columnstore index, see [Columnstore
54205421
**Note: This trace flag applies to SQL Server 2019 (15.x) and higher builds.**<br />
54215422
Link: [Docs Trace Flags]<br />
54225423
Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags 876, 11064, and 11068, SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9.
5423-
Scope: global only
5424+
Scope: global only<br />
5425+
SQL Server Version: >= 2019 RTM
54245426

54255427

54265428
<a id="11068"></a>
@@ -5433,24 +5435,29 @@ For example, using this trace flag when loading 1,048,577 rows into a columnstor
54335435
Without this trace flag, the insert operation would result in one compressed rowgroup.**<br />
54345436
**Note: This trace flag applies to SQL Server 2019 (15.x) and higher builds.**<br />
54355437
Link: [Docs Trace Flags]<br />
5436-
Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags 876, 11064, and 11068, SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9.
5437-
Scope: global only
5438+
Link: https://support.microsoft.com/en-us/topic/kb4588980-fix-higher-than-expected-number-of-single-row-columnstore-rowgroups-may-be-generated-for-columnstore-bulk-insert-when-both-large-page-allocator-and-scalable-columnstore-bulk-insert-features-are-turned-on-0d74afa4-96e7-2026-b486-122d2619554a - if you turn on trace flags [876](#876), [11064](#11064), and [11068](#11068), SQL Server may generate single row columnstore rowgroups. Fixed in 2019 CU9.
5439+
Scope: global only<br />
5440+
SQL Server Version: >= 2019 RTM
54385441

54395442

54405443
<a id="11631"></a>
54415444
#### Trace Flag: 11631
54425445
Function: When reorganizing a columnstore index, use a threshold of 10% of the actual number of rows in the rowgroup. By default, without this trace flag, SQL Server uses 10% of a theoretical max of ~1M rows in the rowgroup, 100K rows, which meant that small rowgroups would never get reorganized.
54435446
**Note: This trace flag applies to SQL Server 2019 CU9 (15.x) and higher builds.**<br />
54445447
Link: https://techcommunity.microsoft.com/t5/sql-server-support/new-trace-flags-for-better-maintenance-of-deleted-rows-in/ba-p/2127034
5445-
Scope: global only
5448+
Link: [Docs Trace Flags]<br />
5449+
Scope: global only<br />
5450+
SQL Server Version: >= 2019 CU9
54465451

54475452

54485453
<a id="11634"></a>
54495454
#### Trace Flag: 11634
5450-
Function: When reorganizing a columnstore index, use a threshold of 1% of the rows in the rowgroup rather than the default of 10%. Keep in mind that unless you also enable trace flag 11631, then it's 1% of the theoretical maximum number of rows in the rowgroup (~1M) rather than the actual number of rows in the rowgroup. Use both 11631 and 11634 trace flags together for the most accurate thresholds of when to rebuild a rowgroup.
5455+
Function: When reorganizing a columnstore index, use a threshold of 1% of the rows in the rowgroup rather than the default of 10%. Keep in mind that unless you also enable trace flag [11631](#11631), then it's 1% of the theoretical maximum number of rows in the rowgroup (~1M) rather than the actual number of rows in the rowgroup. Use both [11631](#11631) and 11634 trace flags together for the most accurate thresholds of when to rebuild a rowgroup.
54515456
**Note: This trace flag applies to SQL Server 2019 CU9 (15.x) and higher builds.**<br />
54525457
Link: https://techcommunity.microsoft.com/t5/sql-server-support/new-trace-flags-for-better-maintenance-of-deleted-rows-in/ba-p/2127034
5453-
Scope: global only
5458+
Link: [Docs Trace Flags]<br />
5459+
Scope: global only<br />
5460+
SQL Server Version: >= 2019 CU9
54545461

54555462

54565463
<a id="12306"></a>
@@ -5462,51 +5469,56 @@ The effect of TFs 12311, 12312, 12314, and 12318 occurs when there is a checkpoi
54625469
In the SQL Server error log, you can see entries about this actions.<br />
54635470
Link: [KB4565944]<br />
54645471
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/<br />
5465-
Scope: global or session
5472+
Scope: global or session<br />
5473+
SQL Server Version: >= 2019 CU9, >= 2017 CU21
54665474

54675475

54685476
<a id="12311"></a>
54695477
#### Trace Flag: 12311
54705478
Function: After TF [12306](#12306) is enabled, you can further enable 12311 trace flag that represent maximum group commit times of **1ms**. This TF is additive whith [12312](#12312), [12314](#12314), and [12318](#12318). The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.<br />
54715479
If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF [12306](#12306).
5472-
The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint.
5480+
The effect of TFs 12311, [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint.
54735481
In the SQL Server error log, you can see entries about this actions.<br />
54745482
Link: [KB4565944]<br />
54755483
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/<br />
5476-
Scope: global or session
5484+
Scope: global or session<br />
5485+
SQL Server Version: >= 2019 CU9, >= 2017 CU21
54775486

54785487

54795488
<a id="12312"></a>
54805489
#### Trace Flag: 12312
54815490
Function: After TF [12306](#12306) is enabled, you can further enable 12312 trace flag that represent maximum group commit times of **2ms**. This TF is additive whith [12311](#12311), [12314](#12314), and [12318](#12318). The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.<br />
54825491
If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF [12306](#12306).
5483-
The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint.
5492+
The effect of TFs [12311](#12311), 12312, [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint.
54845493
In the SQL Server error log, you can see entries about this actions.<br />
54855494
Link: [KB4565944]<br />
54865495
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/<br />
5487-
Scope: global or session
5496+
Scope: global or session<br />
5497+
SQL Server Version: >= 2019 CU9, >= 2017 CU21
54885498

54895499

54905500
<a id="12314"></a>
54915501
#### Trace Flag: 12314
54925502
Function: After TF [12306](#12306) is enabled, you can further enable 12314 trace flag that represent maximum group commit times of **4ms**. This TF is additive whith [12311](#12311), [12312](#12312), and [12318](#12318). The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.<br />
54935503
If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF [12306](#12306).
5494-
The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint.
5504+
The effect of TFs [12311](#12311), [12312](#12312), 12314, and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint.
54955505
In the SQL Server error log, you can see entries about this actions.<br />
54965506
Link: [KB4565944]<br />
54975507
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/<br />
5498-
Scope: global or session
5508+
Scope: global or session<br />
5509+
SQL Server Version: >= 2019 CU9, >= 2017 CU21
54995510

55005511

55015512
<a id="12318"></a>
55025513
#### Trace Flag: 12318
55035514
Function: After TF [12306](#12306) is enabled, you can further enable 12318 trace flag that represent maximum group commit times of **8ms**. This TF is additive whith [12311](#12311), [12312](#12312), and [12314](#12314). The maximum group commit time setting is capped at 10ms. However, these should not be repeated. For example, do not specify the same TF more than one time.<br />
55045515
If you do not want to set maximum group commit time but want, instead, to revert to the default behavior of 10ms, disable TF [12306](#12306).
5505-
The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and [12318](#12318) occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint.
5516+
The effect of TFs [12311](#12311), [12312](#12312), [12314](#12314), and 12318 occurs when there is a checkpoint in the database. You can rely on the setting of SQL Server or the database to let the checkpoint automatically occur. If you want to let the TFs take effect immediately, you can issue a manual checkpoint.
55065517
In the SQL Server error log, you can see entries about this actions.<br />
55075518
Link: [KB4565944]<br />
55085519
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/<br />
5509-
Scope: global or session
5520+
Scope: global or session<br />
5521+
SQL Server Version: >= 2019 CU9, >= 2017 CU21
55105522

55115523

55125524
[Docs Trace Flags]:https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql
@@ -5594,4 +5606,3 @@ Scope: global or session
55945606
[Minimizing the impact of DBCC CHECKDB]:https://sqlperformance.com/2012/11/io-subsystem/minimize-impact-of-checkdb
55955607
[KB2634571]:https://web.archive.org/web/20150303213855/http://support.microsoft.com/kb/2634571
55965608
[KB4565944]:https://support.microsoft.com/kb/4565944
5597-

0 commit comments

Comments
 (0)