What is the max/min size of a decimal data type?

Recently, I wrote a maintenance script to check every table in every database on our servers at work nightly and email a report of identity columns that are approaching the limits of their data type. The minimum and maximum values for most numerical data types are documented in Books online, but for decimal/numeric data types it is not documented and varies based on the values provided for the precision and scale. Most people know that precision is the total number
read more

My 24 Hours of PASS Session Files

I was honored to be selected to join many other great speakers in presenting for the recent 24 Hours of PASS: Evolution of the Data Platform event. My presentation was called New Paradigm for Performance Tuning in SQL Server 2016 and covers two new tools for performance tuning: Query Store and the Plan Compare tool. You can download my slide deck (in pdf form) and demo code from the page for my session on the event site. The session was
read more

Why I'm not attending PASS Summit 2016

I know there has been a lot of drama in the community recently, much of it centered around what people are or are not going to do in conjunction to this year’s SQL PASS Summit. Well this isn’t one of those posts. I promise you that this post is drama free. I felt compelled to share my reasons for not attending to make sure it was clear that in no way is this related to new rules or any of
read more

T-SQL Tuesday #74: Be the Change Round-up

Thanks to everybody that participated in this month’s T-SQL Tuesday. A big thanks to everyone who wrote a participating blog post, and a really huge thanks to everyone who read the posts shared by this month’s participants. If you follow one of the links on this round-up page, I will kindly ask that you leave a comment on a blog post that you read if it teaches you something, gives you a new perspective, or makes you think. A blog
read more

T-SQL Tuesday #74: Ch-ch-changes

Welcome to my contribution for T-SQL Tuesday 74 being hosted by me. So special thanks to me for hosting it. Good job me, I’ll buy me a beer next time I see me to thank me properly. But enough about me, my post is about using Query Store in SQL Server 2016 to identify queries or plans that have changed. Visit the blog party page to take part in this month’s T-SQL Tuesday event or to read other blog posts
read more

T-SQL Tuesday #74 Invitation: Be the Change

Happy New Year and welcome to another T-SQL Tuesday (number 74 to be exact). This time of the year, everyone thinks about making resolutions. Stop doing something or start doing something, etc. You know the drill. Well, I’m not doing that, but this month’s topic is inspired by resolutions. The topic for T-SQL Tuesday #74 is Be the Change. More specifically, data changes. How do you track changing data? How do you do your ETL? How do you clean or
read more

Corrupt Temporary Statistics in SQL Server 2014 Readable Replica

Earlier this week, the Database Strategy Team at my company was contacted about queries that were failing on one specific table. The same query on TableX and TableZ were successful, but it failed on TableY (not the real table names, but it is data partitioned into separate tables where the names are serialized in that fashion). They also reported that it did not fail when they ran the query directly in SQL Server Management Studio (SSMS). While I was just
read more

T-SQL Tuesday #73: Never Made That Mistake Again

T-SQL Tuesday is a monthly community-wide blogging event created by Adam Machanic (blog|@AdamMachanic), and everyone is invited to particpate. This month’s blog post party — I like that phrase, it has a nice ring to it — is being hosted by Bradley Ball (blog|@SQLBalls), and the holiday-themed topic this month is T-SQL Tuesday #73: Naughty or Nice?. For my part, I want to relate a cautionary tale about how I crashed a production server at Microsoft at 3 o’clock in
read more

You Have One Job

I’m sure most if not all of you are familiar with the meme “You had one job”. I was reminded of this meme this past Friday when I headed out to run an errand at lunch time. There were 3 guys standing in the middle lane of a busy intersection, 2 were road workers and 1 was a flagger holding a sign that said SLOW on one side and STOP on the other. The flagger was standing in between the
read more

SQLSaturday 461: Join Me For a Full Day of Performance Training in Austin

Join me Friday, January 29, 2016 for a full day of performance tuning training as part of SQLSaturday 461 in Austin, TX. Then stick around for the main event on Saturday where I will be among the many great presenters at the SQLSaturday event. My regular session on Saturday in the last slot of the day will be Strategies for Working with Texas-sized Databases. Learn more about the event: SQLSaturday 461 Register for the pre-con: Performance Tuning Like a Boss
read more