Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I did my 5 minute research and have not come up with a concise list, or even a list really except for Trace Flags (2012) which is a bit lacking.

Looking at this query which uses 8691, I was wondering if such a list exists.

with cte(guid,other) as ( 
select newid(),1 union all 
select newid(),2 union all 
select newid(),3) 
select a.guid, a.other, b.guid guidb, b.other otherb 
from cte a 
cross join cte b 
order by a.other, b.other 
share|improve this question
The vast majority of Trace Flags are undocumented as they should not be used. They are there for advanced troubleshooting purposes by the SQL support team only. The link you found is valid for known and supported trace flags. – Nic Oct 26 '12 at 21:31 has a pretty good list. – Max Vernon Oct 26 '12 at 23:40
I stumbled upon a great list of the most important trace flags of SQL Server, sharing as you might find this VERY useful – user55759 Dec 29 '14 at 14:57
up vote 6 down vote accepted

Although this isn't complete, it is the biggest single list I know of.

This MSDN article lists the Query Optimizer Trace Flags necessary to support several changes to the QO in various QFEs and hotfixes, etc.

Technet also has a list of various trace flags (probably already documented in the links above:

This documents trace flag 610: (controls minimally logged inserts into indexed tables)

Technet has another huge list of trace flags at:

share|improve this answer
Came across another list here though I haven't cross referenced it against any of your other lists – Martin Smith Nov 27 '12 at 10:03
And another list here – Martin Smith Feb 10 '13 at 17:40
Here Another list of Trace Flags:… – user24199 May 26 '13 at 12:38
Wow, there is dangerous stuff in there. "Turn off transaction logging for the entire SQL dataserver."... That list is Pandora's box. – usr Jun 9 '15 at 21:52

The list of trace flags which you found on MSDN are the only flags which you should be running.

Anything which isn't documented is only supposed to be used by the developers and PSS when troubleshooting problems.

share|improve this answer
Given the context of, don't you think it would help? Since when have developers stopped using something because it's undocumented!? – 孔夫子 Oct 27 '12 at 0:49
Denny's answer is important since it shows the importance of not over-using the flags. – Max Vernon Oct 27 '12 at 4:20

Even though this is a pretty old thread, Microsoft has officially published the list of Trace Flags that can be used when running SQL Server 2012 and up for high performance workloads :

KB - 2964518 - Recommended updates and configuration options for SQL Server 2012 and SQL Server 2014 with high-performance workloads.

Its highly advisable to do a thorough testing when enabling trace flags to avoid any surprises.

share|improve this answer

I thought I'd create a table for quick reference.

CREATE TABLE dbo.TraceDefinition (
 [Description] VARCHAR(MAX) NOT NULL

INSERT INTO dbo.TraceDefinition (TraceFlag, [Description])
SELECT TraceFlag, [Description]
FROM (VALUES (260, 'Prints versioning information about extended stored procedure dynamic-link libraries (DLLs). For more information about __GetXpVersion(), see Creating Extended Stored Procedures. Scope: global or session'),
        (1204,'Returns the resources and types of locks participating in a deadlock and also the current command affected. Scope: global only'),
        (1211,'Disables lock escalation based on memory pressure, or based on number of locks. The SQL Server Database Engine will not escalate row or page locks to table locks. Using this trace flag can generate excessive numbers of locks. This can slow the performance of the Database Engine, or cause 1204 errors (unable to allocate lock resource) because of insufficient memory. For more information, see Lock Escalation (Database Engine). If both trace flag 1211 and 1224 are set, 1211 takes precedence over 1224. However, because trace flag 1211 prevents escalation in every case, even under memory pressure, we recommend that you use 1224. This helps avoid "out-of-locks" errors when many locks are being used. Scope: global or session'),
        (1222,'Returns the resources and types of locks that are participating in a deadlock and also the current command affected, in an XML format that does not comply with any XSD schema. Scope: global only'),
        (1224,'Disables lock escalation based on the number of locks. However, memory pressure can still activate lock escalation. The Database Engine escalates row or page locks to table (or partition) locks if the amount of memory used by lock objects exceeds one of the following conditions: Forty percent of the memory that is used by Database Engine, exclusive of memory allocation using Address Windowing Extension (AWE). This is applicable only when the locks parameter of sp_configure is set to 0. Forty percent of the lock memory that is configured by using the locks parameter of sp_configure. For more information, see Setting Server Configuration Options. If both trace flag 1211 and 1224 are set, 1211 takes precedence over 1224. However, because trace flag 1211 prevents escalation in every case, even under memory pressure, we recommend that you use 1224. This helps avoid "out-of-locks" errors when many locks are being used. Note: Lock escalation to the table- or HoBT-level granularity can also be controlled by using the LOCK_ESCALATION option of the ALTER TABLE statement. Scope: global or session'),
        (2528,'Disables parallel checking of objects by DBCC CHECKDB, DBCC CHECKFILEGROUP, and DBCC CHECKTABLE. By default, the degree of parallelism is automatically determined by the query processor. The maximum degree of parallelism is configured just like that of parallel queries. For more information, see max degree of parallelism Option. Parallel DBCC should typically be left enabled. For DBCC CHECKDB, the query processor reevaluates and automatically adjusts parallelism with each table or batch of tables checked. Sometimes, checking may start when the server is almost idle. An administrator who knows that the load will increase before checking is complete may want to manually decrease or disable parallelism. Disabling parallel checking of DBCC can cause DBCC to take much longer to complete and if DBCC is run with the TABLOCK feature enabled and parallelism set off, tables may be locked for longer periods of time. Scope: global or session'),
        (3205,'By default, if a tape drive supports hardware compression, either the DUMP or BACKUP statement uses it. With this trace flag, you can disable hardware compression for tape drivers. This is useful when you want to exchange tapes with other sites or tape drives that do not support compression. Scope: global or session'),
        (3226,'By default, every successful backup operation adds an entry in the SQL Server error log and in the system event log. If you create very frequent log backups, these success messages accumulate quickly, resulting in huge error logs in which finding other messages is problematic. 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.'),
        (3608,'Prevents SQL Server from automatically starting and recovering any database except the master database. Databases will be started and recovered when accessed. Some features, such as snapshot isolation and read committed snapshot, might not work. Use for Moving System Databases and Moving User Databases. Do not use during normal operation.'),
        (3625,'Limits the amount of information returned in error messages. For more information, see Metadata Visibility Configuration. Scope: global only'),
        (4616,'Makes server-level metadata visible to application roles. In SQL Server, an application role cannot access metadata outside its own database because application roles are not associated with a server-level principal. This is a change of behavior from earlier versions of SQL Server. Setting this global flag disables the new restrictions, and allows for application roles to access server-level metadata. Scope: global only'),
        (6527,'Disables generation of a memory dump on the first occurrence of an out-of-memory exception in CLR integration. By default, SQL Server generates a small memory dump on the first occurrence of an out-of-memory exception in the CLR. The behavior of the trace flag is as follows: If this is used as a startup trace flag, a memory dump is never generated. However, a memory dump may be generated if other trace flags are used. If this trace flag is enabled on a running server, a memory dump will not be automatically generated from that point on. However, if a memory dump has already been generated due to an out-of-memory exception in the CLR, this trace flag will have no effect. Scope: global only'),
        (7806,'Enables a dedicated administrator connection (DAC) on SQL Server Express. By default, no DAC resources are reserved on SQL Server Express. For more information, see Using a Dedicated Administrator Connection.')
) AS t(TraceFlag,[Description])
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.