Skip to content

Commit a41d85c

Browse files
committed
2 parents 0caa543 + ddfb379 commit a41d85c

File tree

4 files changed

+192
-60
lines changed

4 files changed

+192
-60
lines changed

SQL Server Trace Flag.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Microsoft SQL Server Trace Flags
2-
Complete list of Microsoft SQL Server trace flags (**590** trace flags)
2+
Complete list of Microsoft SQL Server trace flags (**591** trace flags)
33

4-
**REMEMBER: Be extremely careful with trace flags, test in your test environment first. And consult professionals first if you are the slightest uncertain about the effects of your changes.**
4+
**REMEMBER: Be extremely careful with trace flags, test in your test environment first. And consult professionals first if you are the slightest uncertain about the effects of your changes.**
55

6-
**Some trace flags were introduced in specific SQL Server versions.
6+
**Some trace flags were introduced in specific SQL Server versions.
77
For more information on the applicable version, see the Microsoft Support article associated with a specific trace flag.**
88

9-
**Trace flag behavior may not be supported in future releases of SQL Server.**
9+
**Trace flag behavior may not be supported in future releases of SQL Server.**
1010

1111
Headers:
1212
- [Unknown trace flags](#unknown-trace-flags")
@@ -64,6 +64,8 @@ A lowercase "t" is accepted by SQL Server, but this sets other internal trace fl
6464
- Scott Caldwell ([b](https://blog.rdx.com/) | [t](https://twitter.com/sqldroid))
6565
- Mike Fal ([b](http://www.mikefal.net) | [t](https://twitter.com/Mike_Fal))
6666
- Prince Kumar Rastogi ([b](http://www.sqlservergeeks.com/) | [t](https://twitter.com/princerastogi2))
67+
- Kendra Little ([b](http://www.littlekendra.com/) | [t](https://twitter.com/Kendra_Little))
68+
- Slava Oks ([t](https://twitter.com/slava_oks/))
6769

6870

6971
<a id="unknown-trace-flags"></a>
@@ -99,7 +101,7 @@ Trace Flags are settings that in some way or another alters the behavior of vari
99101

100102
<a id="how-do-i-turn-trace-flags-on-and-off"></a>
101103
## How do I turn Trace Flags on and off?
102-
- You can use the [DBCC TRACEON](https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceon-transact-sql "Official Microsoft Docs DBCC TRACEON Article") and [DBCC TRACEOFF](https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceoff-transact-sql "Official Microsoft Docs DBCC TRACEOFF Article") commands
104+
- You can use the [DBCC TRACEON] and [DBCC TRACEOFF] commands
103105
- You can use the [-T option](https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/database-engine-service-startup-options "Official Microsoft Docs Database Engine Service Startup Options Article") in the startup configuration for the SQL Server Service.
104106
**When specifying a trace flag with the `-T` option, use an uppercase `"T"` to pass the trace flag number. A lowercase `"t"` is accepted by SQL Server, but this sets other internal trace flags that are required only by SQL Server support engineers. (Parameters specified in the Control Panel startup window are not read.)**
105107
- You can also use the hint [QUERYTRACEON](https://support.microsoft.com/help/2801413 "Official QUERYTRACEON KB Article") in your queries: **&lt;querytraceon_hint ::= {QUERYTRACEON trace_flag_number}>**
@@ -230,13 +232,13 @@ Use this trace flag if SQL Server is experiencing high number of [QDS_LOADDB](ht
230232

231233
<a id="trace-flags-list"></a>
232234
## Trace Flags List
233-
Summary: **588 trace flags**
235+
Summary: **591 trace flags**
234236

235237

236238
<a id="-1"></a>
237239
#### Trace Flag: -1
238240
Function: Sets trace flags for all client connections, rather than for a single client connection.
239-
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 />
241+
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 />
240242
Link: http://www.sql-server-performance.com/2002/traceflags/
241243

242244

@@ -887,6 +889,15 @@ Link: [New Undocumented Trace Flags]<br />
887889
Scope: ?
888890

889891

892+
<a id="876"></a>
893+
#### Trace Flag: 876
894+
**Undocumented trace flag**<br />
895+
Function: Turns 8k page allocations for Column Store segments into 2MB instead.<br />
896+
Link: https://twitter.com/slava_oks/status/1044257034361757696<br />
897+
Link: https://github.com/ktaranov/sqlserver-kit/issues/151<br />
898+
Scope: ?
899+
900+
890901
<a id="888"></a>
891902
**Undocumented trace flag**<br />
892903
#### Trace Flag: 888
@@ -924,7 +935,8 @@ Link: https://blogs.msdn.microsoft.com/arvindsh/2014/02/24/tracking-tempdb-inter
924935
<a id="1117"></a>
925936
#### Trace Flag: 1117
926937
Function: When a file in the filegroup meets the autogrow threshold, all files in the filegroup grow.<br />
927-
**Note: Beginning with SQL Server 2016 this behavior is controlled by the AUTOGROW_SINGLE_FILE and AUTOGROW_ALL_FILES option of ALTER DATABASE, and trace flag 1117 has no affect. For more information, see ALTER DATABASE File and Filegroup Options (Transact-SQL).**<br />
938+
**Note: Beginning with SQL Server 2016 this behavior is controlled by the AUTOGROW_SINGLE_FILE and AUTOGROW_ALL_FILES option of ALTER DATABASE, and trace flag 1117 has no affect.
939+
For more information, see [ALTER DATABASE File and Filegroup Options (Transact-SQL)](https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup-options).**<br />
928940
Link: https://www.littlekendra.com/2017/01/03/parallelism-and-tempdb-data-file-usage-in-sql-server/<br />
929941
Link: [SQL Server 2016 : Getting tempdb a little more right]<br />
930942
Link: [Docs Trace Flags]<br />
@@ -1000,7 +1012,7 @@ Link: None
10001012
Function: Prints detailed lock information as every request for a lock is made (the process ID and type of lock requested)<br />
10011013
Link: [TECHNET List Of SQL Server Trace Flags]<br />
10021014
Link: https://blogs.msdn.microsoft.com/sqlserverstorageengine/2008/03/30/tempdb-table-variable-vs-local-temporary-table<br />
1003-
Link: https://support.microsoft.com/help/169960/inf-analyzing-and-avoiding-deadlocks-in-sql-server<br />
1015+
Link: [KB169960]<br />
10041016
Link: [Important Trace Flags That Every DBA Should Know]<br />
10051017
Scope: ?
10061018

@@ -1031,13 +1043,13 @@ Link: https://support.microsoft.com/help/832524/sql-server-technical-bulletin---
10311043
<a id="1206"></a>
10321044
#### Trace Flag: 1206
10331045
Function: Used to complement flag 1204 by displaying other locks held by deadlock parties<br />
1034-
Link: https://support.microsoft.com/help/169960/inf-analyzing-and-avoiding-deadlocks-in-sql-server
1046+
Link: [KB169960]
10351047

10361048

10371049
<a id="1208"></a>
10381050
#### Trace Flag: 1208
10391051
Function: KB: “Prints the host name and program name supplied by the client. This can help identify a client involved in a deadlock, assuming the client specifies a unique value for each connection.”<br />
1040-
Link: https://support.microsoft.com/help/169960/inf-analyzing-and-avoiding-deadlocks-in-sql-server
1052+
Link: [KB169960]
10411053

10421054

10431055
<a id="1211"></a>
@@ -3639,7 +3651,8 @@ We can use this trace flag to troubleshooting the query performance without chan
36393651
Link: http://download.microsoft.com/download/6/e/5/6e52bf39-0519-42b7-b806-c32905f4a066/eim_perf_flowchart_final.pdf<br />
36403652
Link: http://sqlblog.com/blogs/kalen_delaney/archive/2008/02/26/lost-without-a-trace.aspx<br />
36413653
Link: http://www.sqlservergeeks.com/sql-server-trace-flag-8602/<br />
3642-
Scope: global only
3654+
Scope: global only<br />
3655+
Demo: https://github.com/ktaranov/sqlserver-kit/blob/master/Scripts/Trace_Flag/Trace_Flag_8602.sql
36433656

36443657

36453658
<a id="8605"></a>
@@ -4882,6 +4895,8 @@ Scope: ?
48824895

48834896

48844897
[Query Store Trace Flags]: https://www.sqlskills.com/blogs/erin/query-store-trace-flags/
4898+
[DBCC TRACEON]:https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceon-transact-sql
4899+
[DBCC TRACEOFF]:https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceoff-transact-sql
48854900
[Docs Trace Flags]: https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql
48864901
[DBCC CHECKDB]: https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-transact-sql
48874902
[DBCC CHECKTABLE]: https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checktable-transact-sql
@@ -4937,3 +4952,4 @@ Scope: ?
49374952
[DAC]:https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/diagnostic-connection-for-database-administrators
49384953
[DBCC SHOW_STATISTICS]:https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-show-statistics-transact-sql
49394954
[ALTER DATABASE SCOPED CONFIGURATION (Transact-SQL)]:https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-scoped-configuration-transact-sql
4955+
[KB169960]:https://web.archive.org/web/20150111103047/http://support.microsoft.com:80/kb/169960

SSMS/README.md

Lines changed: 58 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ Additionally, SSMS 17.x can be installed side-by-side with SSMS 16.X or SQL Serv
2525

2626

2727
## Supported Operating systems
28-
This release of SSMS supports the following platforms when used with the latest available service pack: Windows 10, Windows 8, Windows 8.1, Windows 7 (SP1), Windows Server 2016, Windows Server 2012 (64-bit), Windows Server 2012 R2 (64-bit), Windows Server 2008 R2 (64-bit)
28+
This release of **SSMS 17.x Version** supports the following platforms when used with the latest available service pack: Windows 10, Windows 8, Windows 8.1, Windows 7 (SP1), Windows Server 2016, Windows Server 2012 (64-bit), Windows Server 2012 R2 (64-bit), Windows Server 2008 R2 (64-bit)
29+
30+
SSMS 18.x is not supported on Windows 8. Windows 10 / Windows Server 2016 requires version 1607 (10.0.14393) or later:
31+
Due to the new dependency on NetFx 4.7.2, SSMS 18.0 does not install on Windows 8, older versions of Windows 10, and Windows Server 2016. SSMS setup will block on those operating systems. Windows 8.1 is still supported.
32+
2933

3034
### Note
3135
SSMS 17.X is based on the Visual Studio 2015 Isolated shell, which was released before Windows Server 2016.
@@ -34,9 +38,24 @@ Because of this, we do not anticipate that SSMS with all latest updates applied)
3438
Customers are advised to contact support, should they encounter any issues with SSMS on Windows Server 2016.
3539
Support will then work with customers to determine if the issue is with SSMS or Visual Studio or with Windows compatibility, and route the issue appropriately.
3640

41+
SSMS 18.x is based on the new Visual Studio 2017 Isolated Shell: The new shell unlocks all the accessibility fixes that went in to both SSMS and Visual Studio.
42+
3743

3844
## Available Languages
39-
SQL Server Management Studio for another languages:
45+
**SQL Server Management Studio 18.0 (preview 4)**:
46+
[Chinese (People's Republic of China)](https://go.microsoft.com/fwlink/?linkid=2014662&clcid=0x804) |
47+
[Chinese (Taiwan)](https://go.microsoft.com/fwlink/?linkid=2014662&clcid=0x404) |
48+
[English (United States)](https://go.microsoft.com/fwlink/?linkid=2014662&clcid=0x409) |
49+
[French](https://go.microsoft.com/fwlink/?linkid=2014662&clcid=0x40c) |
50+
[German](https://go.microsoft.com/fwlink/?linkid=2014662&clcid=0x407) |
51+
[Italian](https://go.microsoft.com/fwlink/?linkid=2014662&clcid=0x410) |
52+
[Japanese](https://go.microsoft.com/fwlink/?linkid=2014662&clcid=0x411) |
53+
[Korean](https://go.microsoft.com/fwlink/?linkid=2014662&clcid=0x412) |
54+
[Portuguese (Brazil)](https://go.microsoft.com/fwlink/?linkid=2014662&clcid=0x416) |
55+
[Russian](https://go.microsoft.com/fwlink/?linkid=2014662&clcid=0x419) |
56+
[Spanish](https://go.microsoft.com/fwlink/?linkid=2014662&clcid=0x40a)
57+
58+
**SQL Server Management Studio 17.9** for another languages:
4059
[Chinese (People's Republic of China)](https://go.microsoft.com/fwlink/?linkid=2014306&clcid=0x804) |
4160
[Chinese (Taiwan)](https://go.microsoft.com/fwlink/?linkid=2014306&clcid=0x404) |
4261
[English (United States)](https://go.microsoft.com/fwlink/?linkid=2014306&clcid=0x409)
@@ -49,7 +68,7 @@ SQL Server Management Studio for another languages:
4968
[Russian](https://go.microsoft.com/fwlink/?linkid=2014306&clcid=0x419) |
5069
[Spanish](https://go.microsoft.com/fwlink/?linkid=2014306&clcid=0x40a)
5170

52-
SQL Server Management Studio 17.9 Upgrade Package (upgrades 17.x to 17.9):
71+
**SQL Server Management Studio 17.9 Upgrade Package** (upgrades 17.x to 17.9):
5372
[Chinese (People's Republic of China)](https://go.microsoft.com/fwlink/?linkid=2014215&clcid=0x804) |
5473
[Chinese (Taiwan)](https://go.microsoft.com/fwlink/?linkid=2014215&clcid=0x404) |
5574
[English (United States)](https://go.microsoft.com/fwlink/?linkid=2014215&clcid=0x409) |
@@ -64,37 +83,42 @@ SQL Server Management Studio 17.9 Upgrade Package (upgrades 17.x to 17.9):
6483

6584

6685
## SQL Server Management Studio Download Links and Release Info
67-
68-
| Version/Download Link | Build | Release Date | Size, Mb |
69-
|----------------------------------|---------------|--------------|---------:|
70-
| [17.9 Release] **Latest** | 14.0.17285.0 | 2018-09-04 | 807 |
71-
| [17.8.1 Release] | 14.0.17277.0 | 2018-06-26 | 806 |
72-
| [17.8 Release] **Deprecated** | 14.0.17276.0 | 2018-06-21 | 806 |
73-
| [17.7 Release] | 14.0.17254.0 | 2018-05-09 | 803 |
74-
| [17.6 Release] | 14.0.17230.0 | 2018-03-20 | 802 |
75-
| [17.5 Release] | 14.0.17224.0 | 2018-02-15 | 802 |
76-
| [17.4 Release] | 14.0.17213.0 | 2017-12-07 | 802 |
77-
| [17.3 Release] | 14.0.17199.0 | 2017-10-09 | 801 |
78-
| [17.2 Release] | 14.0.17177.0 | 2017-08-07 | 819 |
79-
| [17.1 Release] | 14.0.17119.0 | 2017-05-24 | 784 |
80-
| [17.0 Release] | 14.0.17099.0 | 2017-04-25 | 729 |
81-
| [17.0 RC3 Release] | 14.0.17028.0 | 2017-03-09 | 677 |
82-
| [17.0 RC2 Release] | 14.0.16150.0 | 2017-02-01 | 682 |
83-
| [17.0 RC1 Release] | 14.0.16000.64 | 2016-11-16 | 687 |
84-
| [16.5.3 Release] | 13.0.16106.4 | 2017-01-26 | 898 |
85-
| 16.5.2 Release **Deprecated** | 13.0.16105.4 | 2017-01-18 | 898 |
86-
| [16.5.1 Release] | 13.0.16100.1 | 2016-12-05 | 894 |
87-
| [16.5 Release] | 13.0.16000.28 | 2016-10-26 | 894 |
88-
| [16.4.1 Release] | 13.0.15900.1 | 2016-09-23 | 894 |
89-
| 16.4 Release **Deprecated** | 13.0.15800.18 | 2016-09-20 | |
90-
| [16.3 Release] | 13.0.15700.28 | 2016-08-15 | 806 |
91-
| [July 2016 Hotfix Update] | 13.0.15600.2 | 2016-07-13 | 825 |
92-
| July 2016 Release **Deprecated** | 13.0.15500.91 | 2016-07-01 | |
93-
| [June 2016 Release] | 13.0.15000.23 | 2016-06-01 | 825 |
94-
| [SQL Server 2014 SP1] | 12.0.4100.1 | 2015-05-14 | 815 |
95-
| [SQL Server 2012 SP3] | 11.0.6020.0 | 2015-11-21 | 964 |
96-
| [SQL Server 2008 R2] | 10.50.4000 | 2012-07-02 | 161 |
97-
86+
- **GA** - General Availability
87+
- **PP** - Public Preview
88+
- Size in Megabytes for English version
89+
90+
| Version/Download Link | Build | Release Date | Size, Mb |
91+
|----------------------------------------|---------------|--------------|---------:|
92+
| [18.0 Preview 4 Release] **Latest PP** | 14.0.18040.0 | 2018-09-24 | 456 |
93+
| [17.9 Release] **Latest GA** | 14.0.17285.0 | 2018-09-04 | 807 |
94+
| [17.8.1 Release] | 14.0.17277.0 | 2018-06-26 | 806 |
95+
| [17.8 Release] **Deprecated** | 14.0.17276.0 | 2018-06-21 | 806 |
96+
| [17.7 Release] | 14.0.17254.0 | 2018-05-09 | 803 |
97+
| [17.6 Release] | 14.0.17230.0 | 2018-03-20 | 802 |
98+
| [17.5 Release] | 14.0.17224.0 | 2018-02-15 | 802 |
99+
| [17.4 Release] | 14.0.17213.0 | 2017-12-07 | 802 |
100+
| [17.3 Release] | 14.0.17199.0 | 2017-10-09 | 801 |
101+
| [17.2 Release] | 14.0.17177.0 | 2017-08-07 | 819 |
102+
| [17.1 Release] | 14.0.17119.0 | 2017-05-24 | 784 |
103+
| [17.0 Release] | 14.0.17099.0 | 2017-04-25 | 729 |
104+
| [17.0 RC3 Release] | 14.0.17028.0 | 2017-03-09 | 677 |
105+
| [17.0 RC2 Release] | 14.0.16150.0 | 2017-02-01 | 682 |
106+
| [17.0 RC1 Release] | 14.0.16000.64 | 2016-11-16 | 687 |
107+
| [16.5.3 Release] | 13.0.16106.4 | 2017-01-26 | 898 |
108+
| 16.5.2 Release **Deprecated** | 13.0.16105.4 | 2017-01-18 | 898 |
109+
| [16.5.1 Release] | 13.0.16100.1 | 2016-12-05 | 894 |
110+
| [16.5 Release] | 13.0.16000.28 | 2016-10-26 | 894 |
111+
| [16.4.1 Release] | 13.0.15900.1 | 2016-09-23 | 894 |
112+
| 16.4 Release **Deprecated** | 13.0.15800.18 | 2016-09-20 | |
113+
| [16.3 Release] | 13.0.15700.28 | 2016-08-15 | 806 |
114+
| [July 2016 Hotfix Update] | 13.0.15600.2 | 2016-07-13 | 825 |
115+
| July 2016 Release **Deprecated** | 13.0.15500.91 | 2016-07-01 | |
116+
| [June 2016 Release] | 13.0.15000.23 | 2016-06-01 | 825 |
117+
| [SQL Server 2014 SP1] | 12.0.4100.1 | 2015-05-14 | 815 |
118+
| [SQL Server 2012 SP3] | 11.0.6020.0 | 2015-11-21 | 964 |
119+
| [SQL Server 2008 R2] | 10.50.4000 | 2012-07-02 | 161 |
120+
121+
[18.0 Preview 4 Release]:https://go.microsoft.com/fwlink/?linkid=2014662
98122
[17.9 Release]:https://go.microsoft.com/fwlink/?linkid=2014306
99123
[17.8.1 Release]:https://go.microsoft.com/fwlink/?linkid=875802
100124
[17.8 Release]:https://go.microsoft.com/fwlink/?linkid=875673
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/*
2+
Trace Flag Demo: 8602
3+
Function: This trace flag is used to ignore all the index hints specified in query or stored procedure.
4+
We can use this trace flag to troubleshooting the query performance without changing index hints.
5+
SQL Server Version: 2008-2017
6+
Information link: https://github.com/ktaranov/sqlserver-kit/blob/master/SQL%20Server%20Trace%20Flag.md#8602
7+
*/
8+
9+
USE master
10+
GO
11+
12+
IF DB_ID(N'Trace8602') IS NOT NULL
13+
BEGIN
14+
ALTER DATABASE Trace8602 SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
15+
DROP DATABASE Trace8602;
16+
END;
17+
GO
18+
19+
CREATE DATABASE Trace8602;
20+
GO
21+
22+
USE Trace8602;
23+
GO
24+
25+
CREATE TABLE xttrace8602
26+
(
27+
id INT identity(1, 1) PRIMARY KEY
28+
, bal INT
29+
, name VARCHAR(100)
30+
);
31+
GO
32+
CREATE NONCLUSTERED INDEX IX_xttrace8602_bal_name ON xttrace8602
33+
(
34+
bal
35+
, name
36+
);
37+
CREATE NONCLUSTERED INDEX IX_xttrace8602_bal ON xttrace8602(bal) ;
38+
GO
39+
40+
INSERT INTO xttrace8602(bal, name)
41+
SELECT TOP(10000) RAND() * 786 AS bal
42+
, 'SQLServerGeeks.com' AS name
43+
FROM sys.all_objects
44+
CROSS JOIN sys.all_columns;
45+
GO
46+
47+
CREATE PROC usp_First
48+
AS
49+
SELECT id
50+
, name
51+
FROM xttrace8602 AS tf WITH(INDEX(IX_xttrace8602_bal))
52+
WHERE bal < 100;
53+
GO
54+
55+
/*Ctrl+M Include Actual Execution Plan in SSMS*/
56+
EXEC usp_First;
57+
GO
58+
/*Enable Trace flag*/
59+
DBCC TRACEON(8602, -1);
60+
GO
61+
/*Clear procedure cache*/
62+
DECLARE @planHandle VARBINARY(64);
63+
SELECT @planHandle = cp.plan_handle
64+
FROM sys.dm_exec_cached_plans AS cp
65+
CROSS APPLY sys.dm_exec_sql_text(cp.plan_handle) AS st
66+
WHERE st.[text] LIKE '%CREATE PROC usp_First%' AND objtype = 'Proc';
67+
PRINT(@planHandle);
68+
IF @planHandle IS NOT NULL DBCC FREEPROCCACHE (@planHandle);
69+
GO
70+
71+
EXEC usp_First;
72+
GO
73+
74+
/*Disable Trace flag*/
75+
DBCC TRACEOff(8602,-1)
76+
GO

0 commit comments

Comments
 (0)