You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -25,6 +26,7 @@ A lowercase "t" is accepted by SQL Server, but this sets other internal trace fl
25
26
(Parameters specified in the Control Panel startup window are not read.)**: https://technet.microsoft.com/en-us/en-en/library/ms190737%28v=sql.120%29.aspx
26
27
-[Enabling SQL Server Trace Flag for a Poor Performing Query Using QUERYTRACEON](https://www.mssqltips.com/sqlservertip/3320/enabling-sql-server-trace-flag-for-a-poor-performing-query-using-querytraceon/)
27
28
-[Disabling SQL Server Optimizer Rules with QUERYRULEOFF](https://www.mssqltips.com/sqlservertip/4175/disabling-sql-server-optimizer-rules-with-queryruleoff/)
## What are Microsoft SQL Server Trace Flags? <aid="what-are-microsoft-sql-server-trace-flags"></a>
@@ -112,7 +115,27 @@ GO
112
115
| LASJNtoSM | Left Anti Semi Join to Sort Merge |
113
116
114
117
115
-
## Trace flags list <aid="trace-flags-list"></a>
118
+
## Recommended Trace Flags
119
+
<aid="recommended-trace-flags"></a>
120
+
121
+
-[Trace Flag 1118](#1118) (for versions prior to SQL Server 2016)
122
+
-[Trace Flag 3023](#3023) (for versions prior to SQL Server 2014)
123
+
-[Trace Flag 3226](#3226)
124
+
125
+
Trace flag 1118 addresses contention that can exist on a particular type of page in a database, the SGAM page.
126
+
This trace flag typically provides benefit for customers that make heavy use of the tempdb system database.
127
+
In SQL Server 2016, you change this behavior using the MIXED_PAGE_ALLOCATION database option, and there is no need for TF 1118.
128
+
129
+
Trace flag 3023 is used to enable the CHECKSUM option, by default, for all backups taken on an instance.
130
+
With this option enabled, page checksums are validated during a backup, and a checksum for the entire backup is generated.
131
+
Starting in SQL Server 2014, this option can be set instance-wide through sp_configure (‘backup checksum default’).
132
+
133
+
The last trace flag, 3226, prevents the writing of successful backup messages to the SQL Server ERRORLOG.
134
+
Information about successful backups is still written to msdb and can be queried using T-SQL.
135
+
For servers with multiple databases and regular transaction log backups, enabling this option means the ERRORLOG is no longer bloated with BACKUP DATABASE and Database backed up messages. As a DBA, this is a good thing because when I look in my ERRORLOG, I really only want to see errors, I don’t want to scroll through hundreds or thousands of entries about successful backups.
136
+
137
+
## Trace Flags List
138
+
<aid="trace-flags-list"></a>
116
139
Summary: **510 trace flags**
117
140
118
141
@@ -591,6 +614,7 @@ Scope: global only
591
614
592
615
593
616
**Trace Flag: 1118**<br />
617
+
<aid="1118"></a>
594
618
Function: Removes most single page allocations on the server, reducing contention on the SGAM page.
595
619
When a new object is created, by default, the first eight pages are allocated from different extents (mixed extents).
596
620
Afterwards, when more pages are needed, those are allocated from that same extent (uniform extent).
Function: Enables CHECKSUM option as default for BACKUP command<br />
1400
1425
**Note: Beginning with SQL Server 2014 this behavior is controlled by setting the backup checksum default configuration option.
1401
1426
For more information, see [Server Configuration Options (SQL Server)](https://msdn.microsoft.com/en-us/library/ms189631.aspx)**.<br />
@@ -1515,6 +1540,7 @@ Link: [TECHNET List Of SQL Server Trace Flags]
1515
1540
1516
1541
1517
1542
**Trace Flag: 3226**<br />
1543
+
<aid="3226"></a>
1518
1544
Function: By default, every successful backup operation adds an entry in the SQL Server error log and in the system event log.
1519
1545
If you create very frequent log backups, these success messages accumulate quickly, resulting in huge error logs in which finding other messages is problematic.
1520
1546
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.<br />
0 commit comments