Skip to content

Commit 2499eb3

Browse files
authored
Add TF 12311, 12312, 12314, 12318
Great thanks to Tracy Boggiano
1 parent 3e61d9f commit 2499eb3

File tree

1 file changed

+53
-5
lines changed

1 file changed

+53
-5
lines changed

SQL Server Trace Flag.md

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Microsoft SQL Server Trace Flags
2-
Detailed list of all discovered (documented and undocumented) Microsoft SQL Server trace flags (**614** trace flags).
2+
Detailed list of all discovered (documented and undocumented) Microsoft SQL Server trace flags (**618** trace flags).
33

44
**REMEMBER: Be extremely careful with trace flags, test in your development environment first.
55
And consult professionals first if you are the slightest uncertain about the effects of your changes.**
@@ -81,7 +81,7 @@ Source links:
8181
- Andrzej Kukula
8282
- Aaron Bertrand ([b](https://sqlperformance.com/author/abertrand) | [t](https://twitter.com/AaronBertrand))
8383
- Wilfred van Dijk
84-
- Tracy Boggiano ([b](databasesuperhero.com) | [t](https://twitter.com/TracyBoggiano))
84+
- Tracy Boggiano ([b](http://databasesuperhero.com) | [t](https://twitter.com/TracyBoggiano))
8585

8686

8787
<a id="what-are-microsoft-sql-server-trace-flags"></a>
@@ -289,7 +289,7 @@ Use this trace flag if SQL Server is experiencing high number of [QDS_LOADDB](ht
289289

290290
<a id="trace-flags-list"></a>
291291
## Trace Flags List
292-
Summary: **614 trace flags**
292+
Summary: **618 trace flags**
293293

294294

295295
<a id="-1"></a>
@@ -5436,28 +5436,76 @@ Link: [Docs Trace Flags]<br />
54365436
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.
54375437
Scope: global only
54385438

5439+
54395440
<a id="11631"></a>
54405441
#### Trace Flag: 11631
54415442
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.
54425443
**Note: This trace flag applies to SQL Server 2019 CU9 (15.x) and higher builds.**<br />
54435444
Link: https://techcommunity.microsoft.com/t5/sql-server-support/new-trace-flags-for-better-maintenance-of-deleted-rows-in/ba-p/2127034
54445445
Scope: global only
54455446

5447+
54465448
<a id="11634"></a>
54475449
#### Trace Flag: 11634
54485450
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.
54495451
**Note: This trace flag applies to SQL Server 2019 CU9 (15.x) and higher builds.**<br />
54505452
Link: https://techcommunity.microsoft.com/t5/sql-server-support/new-trace-flags-for-better-maintenance-of-deleted-rows-in/ba-p/2127034
54515453
Scope: global only
54525454

5455+
54535456
<a id="12306"></a>
54545457
#### Trace Flag: 12306
5455-
Function: Enable setting maximum [group commit time](https://www.sqlshack.com/sql-server-wait-type-hadr-group-commit/), use new trace flag 12306. This TF can be enabled during SQL Server startup or dynamically (through `DBCC TRACEON(12306, -1)`).
5456-
After TF 12306 is enabled, you can further enable 12311, 12312, 12314, 12318. These represent maximum group commit times of 1ms, 2ms, 4ms, and 8ms, respectively. They settings are additive. 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.
5458+
Function: Enable setting maximum [group commit time](https://www.sqlshack.com/sql-server-wait-type-hadr-group-commit/). This TF can be enabled during SQL Server startup or dynamically (through `DBCC TRACEON(12306, -1)`).<br />
5459+
After TF 12306 is enabled, you can further enable 12311, 12312, 12314, 12318. These represent maximum group commit times of 1ms, 2ms, 4ms, and 8ms, respectively. They settings are additive. 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 />
54575460
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.
54585461
The effect of TFs 12311, 12312, 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.
54595462
In the SQL Server error log, you can see entries about this actions.<br />
54605463
Link: [KB4565944]<br />
5464+
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/<br />
5465+
Scope: global or session
5466+
5467+
5468+
<a id="12311"></a>
5469+
#### Trace Flag: 12311
5470+
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 />
5471+
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.
5473+
In the SQL Server error log, you can see entries about this actions.<br />
5474+
Link: [KB4565944]<br />
5475+
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/<br />
5476+
Scope: global or session
5477+
5478+
5479+
<a id="12312"></a>
5480+
#### Trace Flag: 12312
5481+
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 />
5482+
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.
5484+
In the SQL Server error log, you can see entries about this actions.<br />
5485+
Link: [KB4565944]<br />
5486+
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/<br />
5487+
Scope: global or session
5488+
5489+
5490+
<a id="12314"></a>
5491+
#### Trace Flag: 12314
5492+
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 />
5493+
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.
5495+
In the SQL Server error log, you can see entries about this actions.<br />
5496+
Link: [KB4565944]<br />
5497+
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/<br />
5498+
Scope: global or session
5499+
5500+
5501+
<a id="12318"></a>
5502+
#### Trace Flag: 12318
5503+
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 />
5504+
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.
5506+
In the SQL Server error log, you can see entries about this actions.<br />
5507+
Link: [KB4565944]<br />
5508+
Link: https://aboutsqlserver.com/2019/06/09/hadr-sync-commit/<br />
54615509
Scope: global or session
54625510

54635511

0 commit comments

Comments
 (0)