Skip to content

Commit da96196

Browse files
committed
Update some links and info for undocumented trace flags
1 parent d57ab93 commit da96196

File tree

1 file changed

+38
-9
lines changed

1 file changed

+38
-9
lines changed

SQL Server Trace Flag.md

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ A lowercase "t" is accepted by SQL Server, but this sets other internal trace fl
5050
- Joe Obbish ([b](https://orderbyselectnull.com/))
5151
- Glenn Berry ([b](https://sqlserverperformance.wordpress.com/) | [t](https://twitter.com/GlennAlanBerry))
5252
- Pedro Lopes ([b](https://social.msdn.microsoft.com/profile/Pedro+Lopes+%28PL%29) | [t](https://twitter.com/sqlpto))
53+
- Paul White ([b](http://sqlblog.com/blogs/paul_white/) | [t](https://twitter.com/SQL_Kiwi))
5354

5455

5556
<a id="what-are-microsoft-sql-server-trace-flags"></a>
@@ -153,14 +154,15 @@ With this option enabled, page checksums are validated during a backup, and a ch
153154
Starting in SQL Server 2014, this option can be set instance-wide through `sp_configure ('backup checksum default')`.
154155

155156
**Trace flag 3226** prevents the writing of successful backup messages to the SQL Server ERRORLOG.
156-
Information about successful backups is still written to msdb and can be queried using T-SQL.
157+
Information about successful backups is still written to `msdb` and can be queried using T-SQL.
157158
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.
158159
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.
159160

160161
**Trace flag 7412** Enables the lightweight query execution statistics profiling infrastructure.
161-
unless your server is already CPU bound, like you’re running all the time with 95% CPU, unless you are at that point, turn on this trace flag at any server you have.
162+
Unless your server is already CPU bound, like you’re running all the time with 95% CPU, unless you are at that point, turn on this trace flag at any server you have.
162163
This would be my advice here because this enables that lightweight profiling infrastructure there and then you’ll see in a few minutes what it unleashes here.
163-
So one thing that happens when I enable the lightweight profiling is that the sys.dm_exec_query_profiles DMV, which is something that actually populates the live query stats ability or feature of SSMS, now also is also populated with this lightweight profiling, which means that for all essence, we are now able to run a live query stats on all fashions at any given point in time, and this is extremely useful for let’s say a production DBA that someone calls and says, “Hey, you have a problem. To tap into running system and look at what it’s doing.”
164+
So one thing that happens when I enable the lightweight profiling is that the sys.dm_exec_query_profiles DMV, which is something that actually populates the live query stats ability or feature of SSMS, now also is also populated with this lightweight profiling, which means that for all essence, we are now able to run a live query stats on all fashions at any given point in time, and this is extremely useful for let’s say a production DBA that someone calls and says, “Hey, you have a problem.
165+
To tap into running system and look at what it’s doing.”
164166

165167
**Trace flag 7745** forces Query Store to not flush data to disk on database shutdown.
166168
Using this trace may cause Query Store data not previously flushed to disk to be lost in case of shutdown.
@@ -177,49 +179,61 @@ Summary: **533 trace flags**
177179

178180
<a id="-1"></a>
179181
#### Trace Flag: -1
180-
Function: 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.<br />
182+
Function: Sets trace flags for all client connections, rather than for a single client connection.
183+
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.<br />
181184
Link: http://www.sql-server-performance.com/2002/traceflags/
182185

183186

184187
<a id="101"></a>
185188
#### Trace Flag: 101
186189
Function: Verbose Merge Replication logging output for troubleshooting
187190
Merger repl performance<br />
188-
Link: http://support.microsoft.com/kb/2892633
191+
Link: https://support.microsoft.com/en-us/help/2892633<br />
192+
Scope: global only
189193

190194

191195
<a id="102"></a>
192196
#### Trace Flag: 102
193197
Function: Verbose Merge Replication logging to msmerge\_history table for troubleshooting Merger repl performance<br />
194-
Link: http://support.microsoft.com/kb/2892633
198+
Link: https://support.microsoft.com/en-us/help/2892633<br />
199+
Scope: global only
195200

196201

197202
<a id="105"></a>
203+
**Undocumented trace flag**<br />
198204
#### Trace Flag: 105
199205
Function: Join more than 16 tables in SQL server 6.5<br />
200206
Link: http://www.databasejournal.com/features/mssql/article.php/1443351/SQL-Server-65-Some-Useful-Trace-Flags.htm
201207

202208

203209
<a id="106"></a>
204210
#### Trace Flag: 106
205-
Function: This enables you to see the messages that are sent to and from the Publisher, if you are using Web Synchronization<br />
211+
Function: If you are using Web Synchronization, you can start Replmerg.exe and pass the -T 106 option to use trace flag 106.
212+
This enables you to see the messages that are sent to and from the Publisher.
213+
The agent writes the client's input messages to a file that is named ExchangeID(guid).IN.XML, and writes the output messages to a file that is named ExchangeID(guid).OUT.XML.
214+
(In these file names, guid is the GUID of the Exchange Server session.)
215+
These files are created in the directory from which Replmerg.exe was invoked.
216+
For security, you should delete these files after you are finished.<br />
206217
Link: http://technet.microsoft.com/en-us/library/ms151872(v=sql.105).aspx
207218

208219

209220
<a id="107"></a>
210221
#### Trace Flag: 107
222+
**Undocumented trace flag**<br />
211223
Function: SQL 6.5/7/8 – Interprets numbers with a decimal point as float instead of decimal<br />
212224
Link: None
213225

214226

215227
<a id="110"></a>
216228
#### Trace Flag: 110
229+
**Undocumented trace flag**<br />
217230
Function: SQL 6.5 – Turns off ANSI select characteristics<br />
218231
Link: None
219232

220233

221234
<a id="120"></a>
222235
#### Trace Flag: 120
236+
**Undocumented trace flag**<br />
223237
Function: FIX: Error message when you schedule a Replication Merge Agent job to run after you install SQL Server 2000 Service Pack 4: "The process could not enumerate changes at the 'Subscriber'"<br />
224238
Link: None
225239

@@ -245,14 +259,17 @@ Link: http://blogs.msdn.microsoft.com/sqlprogrammability/2007/01/13/6-0-best-pro
245259

246260
<a id="146"></a>
247261
#### Trace Flag: 146
262+
**Undocumented trace flag**<br />
248263
Function: Consider using when replaying against SQL 8.0, to avoid an attempt to set an encrypted connection.<br />
249264
Link: None
250265

251266

252267
<a id="168"></a>
253268
#### Trace Flag: 168
254-
Function: Bugfix in ORDER BY<br />
255-
Link: http://support.microsoft.com/kb/926292
269+
Function: Bugfix in ORDER BY. This hotfix introduces trace flag 168. After you apply this hotfix, you must enable trace flag 168.
270+
Trace flag 168 must be set before the database is migrated to SQL Server 2005.
271+
If trace flag 168 is set after the database is migrated, the query result will remain unsorted.<br />
272+
Link: https://support.microsoft.com/en-us/help/926292
256273

257274

258275
<a id="174"></a>
@@ -288,12 +305,14 @@ Scope: global only
288305

289306
<a id="206"></a>
290307
#### Trace Flag: 206
308+
**Undocumented trace flag**<br />
291309
Function: SQL 6.5 – Provides backward compatibility for the set user statement. KB 160732<br />
292310
Link: None
293311

294312

295313
<a id="208"></a>
296314
#### Trace Flag: 208
315+
**Undocumented trace flag**<br />
297316
Function: SET QUOTED IDENTIFIER ON<br />
298317
Link: None
299318

@@ -306,60 +325,70 @@ Link: https://support.microsoft.com/en-us/kb/945892
306325

307326
<a id="212"></a>
308327
#### Trace Flag: 212
328+
**Undocumented trace flag**<br />
309329
Function: SQL 9 – Query may run much slower when compared to SQL 8 when you use a cursor to run the query<br />
310330
Link: None
311331

312332

313333
<a id="220"></a>
314334
#### Trace Flag: 220
335+
**Undocumented trace flag**<br />
315336
Function: “FIX: Error Message: "Insufficient key column information for updating" Occurs in SQL Server 2000 SP3”<br />
316337
Link: None
317338

318339

319340
<a id="221"></a>
320341
#### Trace Flag: 221
342+
**Undocumented trace flag**<br />
321343
Function: “FIX: The query runs slower than you expected when you try to parse a query in SQL Server 2000”<br />
322344
Link: None
323345

324346

325347
<a id="222"></a>
326348
#### Trace Flag: 222
349+
**Undocumented trace flag**<br />
327350
Function: “FIX: Each query takes a long time to compile when you execute a single query or when you execute multiple concurrent queries in SQL Server 2000”<br />
328351
Link: None
329352

330353

331354
<a id="237"></a>
332355
#### Trace Flag: 237
356+
**Undocumented trace flag**<br />
333357
Function: Tells SQL Server to use correlated sub-queries in Non-ANSI standard backward compatibility mode<br />
334358
Link: None
335359

336360

337361
<a id="242"></a>
338362
#### Trace Flag: 242
363+
**Undocumented trace flag**<br />
339364
Function: Provides backward compatibility for correlated subqueries where non-ANSI-standard results are desired<br />
340365
Link: None
341366

342367

343368
<a id="243"></a>
344369
#### Trace Flag: 243
370+
**Undocumented trace flag**<br />
345371
Function: 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.<br />
346372
Link: None
347373

348374

349375
<a id="244"></a>
350376
#### Trace Flag: 244
377+
**Undocumented trace flag**<br />
351378
Function: 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.<br />
352379
Link: None
353380

354381

355382
<a id="246"></a>
356383
#### Trace Flag: 246
384+
**Undocumented trace flag**<br />
357385
Function: 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.<br />
358386
Link: None
359387

360388

361389
<a id="253"></a>
362390
#### Trace Flag: 253
391+
**Undocumented trace flag**<br />
363392
Function: Prevents ad-hoc query plans to stay in cache<br />
364393
Link: http://www.sqlservercentral.com/Forums/Topic837613-146-1.aspx
365394

0 commit comments

Comments
 (0)