March 16, 2017 at 9:18 pm
Comments posted to this topic are about the item Using Trace Flags
March 17, 2017 at 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)
God is real, unless declared integer.
March 17, 2017 at 2:44 am
t.franz - Friday, March 17, 2017 1:44 AMbeside 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
March 17, 2017 at 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
March 17, 2017 at 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.
Leonard
Madison, WI
March 17, 2017 at 2:11 pm
chudman - Friday, March 17, 2017 7:52 AMJust 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.
March 19, 2017 at 6:04 pm
phonetictalk - Friday, March 17, 2017 12:09 PMThere 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
March 20, 2017 at 2:09 am
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!!!
March 20, 2017 at 2:38 am
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
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply