Information about enabled trace flags is added to the showplan XML in SQL Server 2014 SP2 or 2016

Summary
In SQL Server 2014 Service Pack 2 (SP2) or SQL Server 2016, the new TraceFlags element is added to the QueryPlan element in the showplan XML. This element lists all trace flags that are enabled at the instance or session level when the query plan is compiled, and for actual execution showplans, a specific query is executed. There can be up to two instances of TraceFlags element, one for compile time (with the IsCompileTime attribute equaling to one), and one for execution time (If a trace flag is enabled during both compilation and execution, it will be presented in both lists). Each element can have a list of one or more TraceFlag elements that have two attributes. The Value attribute identifies the trace flag number, and the Scope attribute can be "Global" or "Session" depending on how the trace flag is enabled (If a trace flag is enabled at the query level by using OPTION QUERYTRACEON, it will appear as in the "Session" scope in showplan).

If no trace flag is enabled during compile or execution time, corresponding elements won't be included.

Note The showplan XML will list up to 100 trace flags that are enabled.
Resolution

Service pack information

Service Pack 2 for SQL Server for SQL Server 2014 

SQL Server 2016 Service Pack 1

About Service packs for SQL Server

Service packs are cumulative. Each new service pack contains all the fixes that are in previous service packs, together with any new fixes. Our recommendation is to apply the latest service pack and the latest cumulative update for that service pack. You don't have to install a previous service pack before you install the latest service pack. Use Table 1 in the following article for finding more information about the latest service pack and latest cumulative update.

How to determine the version, edition and update level of SQL Server and its components

Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Properties

Article ID: 3170115 - Last Review: 11/16/2016 10:34:00 - Revision: 2.0

Microsoft SQL Server 2014 Developer, Microsoft SQL Server 2014 Enterprise, Microsoft SQL Server 2014 Enterprise Core, Microsoft SQL Server 2014 Express, Microsoft SQL Server 2014 Standard, Microsoft SQL Server 2014 Web, Microsoft SQL Server 2016 Developer, Microsoft SQL Server 2016 Enterprise, Microsoft SQL Server 2016 Enterprise Core, Microsoft SQL Server 2016 Standard

  • kbqfe kbfix kbsurveynew kbexpertiseadvanced KB3170115
Feedback