Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Using Trace Flags


Using Trace Flags

Author
Message
Steve Jones
Steve Jones
SSC Guru
SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)

Group: Administrators
Points: 51834 Visits: 19005
Comments posted to this topic are about the item Using Trace Flags

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
t.franz
t.franz
SSC-Addicted
SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)

Group: General Forum Members
Points: 423 Visits: 185
beside the "default" (at least before SQL 2016) Trace Flags 1117 / 1118 (Grow all Files in a FileGroup equally / prevent mixted extends) I'm using:
1222 (allows Deadlock monitoring), 2371(Changes the fixed auto update statistics threshold to dynamic auto update statistics threshold. - not necessary on 2016) and Trace Flag 3226 (Function: 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)
Koisntantin Taranov
Koisntantin Taranov
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2020 Visits: 461
t.franz - Friday, March 17, 2017 1:44 AM
beside the "default" (at least before SQL 2016) Trace Flags 1117 / 1118 (Grow all Files in a FileGroup equally / prevent mixted extends) I'm using:
1222 (allows Deadlock monitoring), 2371(Changes the fixed auto update statistics threshold to dynamic auto update statistics threshold. - not necessary on 2016) and Trace Flag 3226 (Function: 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)

Very nice list. Also I suggest for SQL Server 2012 necessarily using Trace Flag 272:

Trace Flag: 272
Function: Generates a log record per identity increment. Can be used to convert SQL 2012 back to old style Identity behavior
Link: http://www.big.info/2013/01/how-to-solve-sql-server-2012-identity.html
Link: https://connect.microsoft.com/SQLServer/feedback/details/739013/failover-or-restart-results-in-reseed-of-identity
It prevent identity gap after restarting SQL Server instance, critical for developers that used for identity column tinyint and smallint datat types or want to get sequence of numbers in identity column.

Simple demo for repeat this issue on SQL Server 2012 you can find here: https://github.com/ktaranov/sqlserver-kit/blob/master/Errors/Identity_gap_sql_server_2012.sql
chudman
chudman
SSC Veteran
SSC Veteran (269 reputation)SSC Veteran (269 reputation)SSC Veteran (269 reputation)SSC Veteran (269 reputation)SSC Veteran (269 reputation)SSC Veteran (269 reputation)SSC Veteran (269 reputation)SSC Veteran (269 reputation)

Group: General Forum Members
Points: 269 Visits: 403
Just chiming in to reiterate what t.franz has already mentioned. -T1117 and -T1118 so that tempdb behaves well with multiple data files prior to 2016. Also a big thank you to K. Taranov for the original listing of trace flags. Great list.
Thanks
Jeff Bennett



phonetictalk
phonetictalk
Mr or Mrs. 500
Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)Mr or Mrs. 500 (503 reputation)

Group: General Forum Members
Points: 503 Visits: 1663
There may be some of you that have never heard or, or used, a trace flag in your career. That's fine, though I hope you use today to a) let us know, and b) educate yourself to ensure you know how to enable a flag you need one. If nothing else, add one to a test instance, and ensure you have the skills to actually make the change.


Given the context of the editorial, perhaps more important than learning how to enable a flag would be learning how to tell if one is enabled, and if necessary, how to disable it.


Leonard
Madison, WI
Koisntantin Taranov
Koisntantin Taranov
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2020 Visits: 461
chudman - Friday, March 17, 2017 7:52 AM
Just chiming in to reiterate what t.franz has already mentioned. -T1117 and -T1118 so that tempdb behaves well with multiple data files prior to 2016. Also a big thank you to K. Taranov for the original listing of trace flags. Great list.
Thanks
Jeff Bennett


Thanks for thanks, you can contribute any time here: https://github.com/ktaranov/sqlserver-kit/pulls or create issue if find some typos.
Steve Jones
Steve Jones
SSC Guru
SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)

Group: Administrators
Points: 51834 Visits: 19005
phonetictalk - Friday, March 17, 2017 12:09 PM
There may be some of you that have never heard or, or used, a trace flag in your career. That's fine, though I hope you use today to a) let us know, and b) educate yourself to ensure you know how to enable a flag you need one. If nothing else, add one to a test instance, and ensure you have the skills to actually make the change.


Given the context of the editorial, perhaps more important than learning how to enable a flag would be learning how to tell if one is enabled, and if necessary, how to disable it.

Published this week: Enabling trace flags


Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Gary Varga
Gary Varga
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13500 Visits: 6456
Trace flags have always been a little theoretical to me. Often I am not allowed to configure such settings (no bad thing as least privileges required etc.) but I do try and keep abreast of such things. I think that awareness of this type of thing is essential for all of us. Even us simple devs Hehe

Gaz

-- Stop your grinnin' and drop your linen...they're everywhere!!!
Beatrix Kiddo
Beatrix Kiddo
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2135 Visits: 4168
Thanks for the list. 3226 is essential for me. I can't stand wading through a list of successful backups when I'm trying to find something in the error log. I
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search