SQL Clone
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 (104K reputation)SSC Guru (104K reputation)SSC Guru (104K reputation)SSC Guru (104K reputation)SSC Guru (104K reputation)SSC Guru (104K reputation)SSC Guru (104K reputation)SSC Guru (104K reputation)

Group: Administrators
Points: 104681 Visits: 19328
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 Eights!
SSC Eights! (831 reputation)SSC Eights! (831 reputation)SSC Eights! (831 reputation)SSC Eights! (831 reputation)SSC Eights! (831 reputation)SSC Eights! (831 reputation)SSC Eights! (831 reputation)SSC Eights! (831 reputation)

Group: General Forum Members
Points: 831 Visits: 252
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 (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2424 Visits: 504
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-Addicted
SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)

Group: General Forum Members
Points: 489 Visits: 406
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
SSC Eights!
SSC Eights! (871 reputation)SSC Eights! (871 reputation)SSC Eights! (871 reputation)SSC Eights! (871 reputation)SSC Eights! (871 reputation)SSC Eights! (871 reputation)SSC Eights! (871 reputation)SSC Eights! (871 reputation)

Group: General Forum Members
Points: 871 Visits: 1734
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 (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2424 Visits: 504
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 (104K reputation)SSC Guru (104K reputation)SSC Guru (104K reputation)SSC Guru (104K reputation)SSC Guru (104K reputation)SSC Guru (104K reputation)SSC Guru (104K reputation)SSC Guru (104K reputation)

Group: Administrators
Points: 104681 Visits: 19328
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
SSC-Insane
SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)

Group: General Forum Members
Points: 22615 Visits: 6534
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
SSCarpal Tunnel
SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)

Group: General Forum Members
Points: 4704 Visits: 4620
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