|
1 | 1 | # 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). |
3 | 3 |
|
4 | 4 | ⚠ **REMEMBER: Be extremely careful with trace flags, test in your development environment first. |
5 | 5 | And consult professionals first if you are the slightest uncertain about the effects of your changes.** |
@@ -81,7 +81,7 @@ Source links: |
81 | 81 | - Andrzej Kukula |
82 | 82 | - Aaron Bertrand ([b](https://sqlperformance.com/author/abertrand) | [t](https://twitter.com/AaronBertrand)) |
83 | 83 | - 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)) |
85 | 85 |
|
86 | 86 |
|
87 | 87 | <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 |
289 | 289 |
|
290 | 290 | <a id="trace-flags-list"></a> |
291 | 291 | ## Trace Flags List |
292 | | -Summary: **614 trace flags** |
| 292 | +Summary: **618 trace flags** |
293 | 293 |
|
294 | 294 |
|
295 | 295 | <a id="-1"></a> |
@@ -5436,28 +5436,76 @@ Link: [Docs Trace Flags]<br /> |
5436 | 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 | 5437 | Scope: global only |
5438 | 5438 |
|
| 5439 | + |
5439 | 5440 | <a id="11631"></a> |
5440 | 5441 | #### Trace Flag: 11631 |
5441 | 5442 | 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. |
5442 | 5443 | **Note: This trace flag applies to SQL Server 2019 CU9 (15.x) and higher builds.**<br /> |
5443 | 5444 | Link: https://techcommunity.microsoft.com/t5/sql-server-support/new-trace-flags-for-better-maintenance-of-deleted-rows-in/ba-p/2127034 |
5444 | 5445 | Scope: global only |
5445 | 5446 |
|
| 5447 | + |
5446 | 5448 | <a id="11634"></a> |
5447 | 5449 | #### Trace Flag: 11634 |
5448 | 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. |
5449 | 5451 | **Note: This trace flag applies to SQL Server 2019 CU9 (15.x) and higher builds.**<br /> |
5450 | 5452 | Link: https://techcommunity.microsoft.com/t5/sql-server-support/new-trace-flags-for-better-maintenance-of-deleted-rows-in/ba-p/2127034 |
5451 | 5453 | Scope: global only |
5452 | 5454 |
|
| 5455 | + |
5453 | 5456 | <a id="12306"></a> |
5454 | 5457 | #### 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 /> |
5457 | 5460 | 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. |
5458 | 5461 | 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. |
5459 | 5462 | In the SQL Server error log, you can see entries about this actions.<br /> |
5460 | 5463 | 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 /> |
5461 | 5509 | Scope: global or session |
5462 | 5510 |
|
5463 | 5511 |
|
|
0 commit comments