SQL Server 2017 Cumulative Update 4

On February 20, 2018, Microsoft released SQL Server 2017 Cumulative Update 4, which is Build 14.0.3022.28. I count 55 hotfixes in the public fix list. There is a special T-SQL script in the release notes that you need to run if you are using Query Store and previously ever had SQL Server 2017 CU2 installed (and you were using Query Store on any of your databases at that time). The script will look for any plans that were forced while you were running SQL Server 2017 CU2, and if it finds any, it will unforce them, and then clear them from Query Store.

There are also quite a few updates for Columnstore indexes and for Availability Groups. Remember, there are not going to be any Service Packs for SQL Server 2017, so you are going to want to test and deploy SQL Server 2017 Cumulative Updates as they become available.

As always, I think it is a good idea to make an effort to stay current on Cumulative Updates, as does Microsoft.

SQL Server Diagnostic Information Queries for February 2018

This month, there are more minor updates to the all of the versions of the queries, primarily in the comments and documentation. I have developed a T-SQL script that you can use to check whether your instance of SQL Server has been patched to mitigate against the Spectre/Meltdown CPU vulnerability. This works for SQL Server 2008 through SQL Server 2017, for on-premises and cloud-based VM (IaaS) usage. You can get the query for this here.

I often make additional minor updates to the queries periodically during the month, so if you are in doubt, downloading the latest version is always a good idea.

Rather than having a separate blog post for each version, I have just put the links for all eight major versions in this single post. There are two separate links for each version. The first one on the top left is the actual diagnostic query script, and the one below on the right is the matching blank results spreadsheet, with labeled tabs that correspond to each query in the set.

Here are links to the latest versions of these queries for Azure SQL Database, SQL Server 2017, 2016, and 2014:

Azure SQL Database Diagnostic Information Queries

Azure SQL Database Blank Results Spreadsheet

SQL Server 2017 Diagnostic Information Queries

SQL Server 2017 Blank Results Spreadsheet

SQL Server 2016 Diagnostic Information Queries

SQL Server 2016 Blank Results Spreadsheet

SQL Server 2014 Diagnostic Information Queries

SQL Server 2014 Blank Results Spreadsheet

Here are links to the most recent versions of these scripts for SQL Server 2012 and older:

Since SQL Server 2012 and older are out of Mainstream support from Microsoft (and because fewer of my customers are using these old versions of SQL Server), I am not going to be updating the scripts for these older versions of SQL Server every single month going forward.  I started this policy a while ago, and so far, I have not heard any complaints.

SQL Server 2012 Diagnostic Information Queries

SQL Server 2012 Blank Results Spreadsheet

SQL Server 2008 R2 Diagnostic Information Queries

SQL Server 2008 R2 Blank Results Spreadsheet

SQL Server 2008 Diagnostic Information Queries

SQL Server 2008 Blank Results Spreadsheet

SQL Server 2005 Diagnostic Information Queries

SQL Server 2005 Blank Results Spreadsheet

The basic instructions for using these queries is that you should run each query in the set, one at a time (after reading the directions for that query). It is not really a good idea to simply run the entire batch in one shot, especially the first time you run these queries on a particular server, since some of these queries can take some time to run, depending on your workload and hardware. I also think it is very helpful to run each query, look at the results (and my comments on how to interpret the results) and think about the emerging picture of what is happening on your server as you go through the complete set. I have quite a few comments and links in the script on how to interpret the results after each query.

After running each query, you need to click on the top left square of the results grid in SQL Server Management Studio (SSMS) to select all of the results, and then right-click and select “Copy with Headers” to copy all of the results, including the column headers to the Windows clipboard. Then you paste the results into the matching tab in the blank results spreadsheet.

About half of the queries are instance specific and about half are database specific, so you will want to make sure you are connected to a database that you are concerned about instead of the master system database. Running the database-specific queries while being connected to the master database is a very common mistake that I see people making when they run these queries.

Note: These queries are stored on Dropbox. I occasionally get reports that the links to the queries and blank results spreadsheets do not work, which is most likely because Dropbox is blocked wherever people are trying to connect. I am not planning on moving these to Github any time soon.

I also occasionally get reports that some of the queries simply don’t work. This usually turns out to be an issue where people have some of their user databases in 80 compatibility mode, which breaks many DMV queries, or that someone is running an incorrect version of the script for their version of SQL Server.

It is very important that you are running the correct version of the script that matches the major version of SQL Server that you are running. There is an initial query in each script that tries to confirm that you are using the correct version of the script for your version of SQL Server. If you are not using the correct version of these queries for your version of SQL Server, some of the queries are not going to work correctly.

If you want to understand how to better run and interpret these queries, you should consider listening to my three related Pluralsight courses, which are SQL Server 2014 DMV Diagnostic Queries – Part 1SQL Server 2014 DMV Diagnostic Queries – Part 2 and SQL Server 2014 DMV Diagnostic Queries – Part 3. All three of these courses are pretty short and to the point, at 67, 77, and 68 minutes respectively. Listening to these three courses is really the best way to thank me for maintaining and improving these scripts…

Please let me know what you think of these queries, and whether you have any suggestions for improvements. Thanks!

T-SQL Tuesday #99: Home Brewing

It is T-SQL Tuesday time for February 2018, which is being hosted by Aaron Bertrand. One of the choices that Aaron offered was to write about something you are passionate about, outside of the SQL Server or tech community.

MJTuesday

T-SQL Tuesday

 

Making Beer at Home

About 18 months ago, encouraged by my friend Mike Witcher, I became somewhat serious about making beer at home. This was not my first foray into making beer, since I had made about four small two-gallon batches of beer with a Mr. Beer kit about fifteen years ago. Many home brewers get their first start on Mr. Beer kits, which let you make drinkable beer at a very low starting cost, as long as you can follow some basic directions and you pay attention to cleanliness and sanitation.

 

Refill-AmLager-Web_lw_1_

Mr. Beer Little Brown Keg

Using a Mr. Beer kit to make beer is kind of like making mac-n-cheese from a box. It is possible to make beer while having very little idea what you are actually doing. It is also very similar to using Microsoft Access as a database, which is something you might do as a beginner, that you don’t want to admit to later!

Fast-forward to 2016, and I was thinking about making larger batches of beer, using somewhat more serious equipment. I had met Mike when he bought my previous house in Parker, and we had become friends. He was a veteran home brewer, with many years of experience under his belt who urged me to give it a try.

I was already aware of The Brew Hut, which is the largest home brew supply store in Colorado. I made a couple of reconnaissance visits to the store, before I ended up buying a “Super Deluxe” brewing equipment kit very similar to this one.

SuperBrewingEquipmentKit_798

Beginners Super Brewing Equipment Kit

A kit like this gives you just about everything you really need to make five-gallon extract batches of beer. This includes a couple of carboys, a four-gallon brew kettle, an immersion chiller, a thermometer, a hydrometer, and various other small accessories. This type of kit lets you do a partial boil, usually on a stovetop in your kitchen, which is often how brewers first really get started (after Mr. Beer). Many brewers successfully use kits like this for many years, with very good results. It is not necessary to spend a lot of money on equipment.

Of course, since I am a gadget nut, I could not resist immediately upgrading my brewing equipment, even before I brewed my first batch of extract beer! My first upgrades were a 10-gallon Anvil brew kettle, and an Anvil High Performance burner, with leg extensions. Anvil is the mid-level line of equipment from Blichmann Engineering, endorsed by John Palmer, who is the author of How to Brew. I also bought a 7.9 gallon FastFerment plastic conical fermenter.

Armed with this fancy new gear, I made a couple of Brewer’s Best extract batches (a Milk Stout and a Belgian Tripel), that seemed to turn out pretty well (at least to an uncritical audience of family and friends). Encouraged, I took an “Introduction to All-Grain Brewing” class, subscribed to several brewing magazines and bought a number of home brewing books. I also made the switch from using bottles to using five-gallon kegs to package my beer.

Then, I made a crazy, early jump to all-grain brewing on batch #3, brewing a pretty challenging Scottish Wee Heavy with a 26lb grain bill! Amazingly, this first all-grain batch turned out pretty well (even though it took me about six hours on brew day). I made one more extract batch (which was a gift from someone), but it has been all-grain ever since.

 

Equipment Fever

The equipment upgrade fever kicked into high gear during the autumn of 2016, which actually made my brewing days harder as I was learning the quirks of a new piece of equipment with nearly every new batch, while I was still very much a beginning brewer.

Batch #5 was a New England style IPA, using a new Ss Brewtech 7-gallon Chronical Brewmaster Edition stainless steel fermenter and a 10-gallon Infussion Mash Tun. This batch was all late hop additions and then dry hopping in the fermenter.

 

DSC_9184-1_2000x        DSC_9419_2000x

7-Gallon Chronical Fermenter                                                                10-Gallon Infussion Mash Tun

 

Later that autumn, I built a wooden brewing cart that currently houses my three vessel brewing system. This includes a 15-gallon kettle that I use as a hot liquor tank (HLT), a 10-gallon mash tun (MT), and a 10-gallon Ss Brewtech Brewmaster Edition boil kettle that sits on a Blichmann HellFire burner. The boil kettle is set up so I can do a whirlpool for late hop additions and during wort cooling. I have two Blichmann RipTide pumps for moving strike and sparge water from the HLT to the MT, and for running the whirlpool.

 

 

Picture1 

Brewing Cart   

 

Picture2

 Beer Samples

Since then, I have joined a local home brew club (The Parker Hop-Aholics), and I have been entering lots of local home brew competitions. I even managed to win a medal at a very small competition in Castle Rock. Entering competitions is a great way to get unbiased feedback and recommendations for improvement from certified beer judges. It also gives you more incentive to improve your brewing skills.

 

22519693_10155935771012904_3165160489530286159_o   22519781_10155933197612904_7504047673338257974_o

First Medal                                                                                                                             14-gallon Fermenter in Action

I have brewed 16, five-gallon batches of beer so far (which is almost 2.5 barrels). Every batch has the details recorded in a log book.

26849943_10156219223032904_4821108135649575122_o

Brewing Log Book  

 

  26910072_10156219222747904_1559819068830277306_o

   Mash Tun Full of Grain

Even though this setup may seem pretty complicated, I am still just a beginner with a lot to learn. Brewing beer is similar to cooking or baking, where the basics are pretty easy, but becoming a master takes a lot more time and experience. The reason I enjoy brewing so much is because of how it makes me feel during and after the process. I love the smell of the grain during the mash, and how sweet it tastes as the starches are converted to sugars. The smell of the wort during the boil is also very nice.

The whole experience of a brew day is a lot of fun (and a lot of work). Going through all of the steps, trying to hit your numbers, as you listen to good music and drink some good beer is very enjoyable! Doing all of the required cleaning and sanitizing is not as much fun, but it is easier with a large sink and hot water out in my garage. After brew day, you get the chance to sample your beer as it is fermenting, and then finally get to taste the final product a week or two later.

February 19 Update:

I found out over the past weekend that I won medals in two different home brew competitions in Colorado. The first was a silver medal in the 13th Annual Peterson AFB Home Brew Competition for a 25C:Belgian Golden Strong Ale (in Table 16). The second was a gold medal in the Sweethearts Revenge 2018 for an Imperial Pumpkin Stout in the 30B: Autumn Seasonal Beer category.