The Bit Bucket

Happy Christmas period to all my readers

Hi folks,

It’s been a big year again and the number of readers just keeps increasing quite fast. So pleased to have you all here. You make it all worthwhile. Thanks to so many who reached out during the year.

Just wanted to wish you all the best for the holiday and Christmas season, from here down under.

Greg

2018-12-25

SQL: Developers - Please add an Application Name to your SQL Server connection strings !

A pet dislike of mine is application developers creating connection strings, but without Application Names. That’s painful because when  you view the processes in SQL Server Activity Monitor, or look at commands in traces from SQL Server Profiler or Extended Events Profiler, you see this:

If your connection just says .Net SqlClient Data Provider, no-one has any idea what application that is. If you are using another connection library, it might say a different name but the concept is the same. You are making management of the server much harder than it needs to be.

2018-12-24

DevOps: Are you centralizing your log files?

System configurations are becoming more complex all the time. Each and every server, container, and key application and service today has log files that tell you a wealth about what’s going on under the covers. But how accessible are those log files in your organization?

If you aren’t using a log management tool, you probably should be.

Here are a few easy ones to get started with:

Azure Monitor

One thing that I do find frustrating with Microsoft tooling at present is the constant churn of product names. A while back, we had Application Insights that could collect details of what was happening within an app. The data for that was stored in a tool called Log Analytics, and it could also collect operating system logs and more. Agents were provided for on-premises systems.

2018-12-20

Shortcut: Sharing query plans in SQL Server Management Studio

Currently, SQL Server query plans are stored as XML. You can see what they look like by right-clicking in any query plan in SQL Server Management Studio (SSMS), and clicking Show Execution Plan XML:

That will return a whole bunch of XML like this:

It’s important to understand that when SSMS is showing a graphical execution plan, it’s just graphically rendering some XML like the plan above.

The Properties window in SSMS is also showing details extracted from that same XML.

2018-12-20

Podcast: SQL Down Under Show 74 with guest Argenis Fernandez

Hi Folks, whenever a new version of SQL Server is starting to appear, I try to have a series of podcasts that discuss what’s happening with it. Now, SQL Server 2019 isn’t that far off so I thought it’s time to start discussing the features in it, in depth.

First up, it’s Argenis Fernandez (@DBArgenis) from the SQL Server team. Argenis provides an awesome discussion on the use of non-volatile memory systems and how he sees them as a game changer.

2018-12-19

SDU Tools: List Unused Indexes in a SQL Server Database

SQL Server databases are often littered with indexes that aren’t needed. In many cases, people won’t even remember why they were created in the first place. So I’m often checking out indexes that might be candidates for removal. One of our free SDU Tools for developers and DBAs does just that. It’s ListUnusedIndexes.

You can see how to execute it in the main image above. The procedure takes just one parameter:

2018-12-19

Never lose hope - it's all around you

It’s that time of year again when people look philosophically back at the current year, and start to think about how they’ll improve their situation in the new year. But for many, this is a very hard time of the year.

I’ve had a few friends this year who seem to have almost lost hope when they’ve ended up in poor situations.

I just wanted to make a short post to encourage you all to never lose hope. Alexander Pope said:

2018-12-18

Book Review: The Second Machine Age

One of my colleagues Orin Thomas is a prolific writer. I’ve lost count of how many detailed books he’s written, and I’ve no doubt he’s lost count as well. If you’ve worked in Microsoft-related IT for any length of time, I’m sure you’ll have read one of his books, particularly if you’ve been involved in certification. You can see a partial list of his books here.

But the other thing that amazes me about Orin is that he’s also a prolific reader. I can’t believe how many books he gets through, and he’s inspired me to get through way more. I have not the slightest doubt that being a good reader is a prerequisite for being a good writer. Every time I meet with Orin, he mentions books that I should read. I note them down, and slowly make my way through many of them.

2018-12-14

Shortcut: Missing index details in SQL Server Management Studio

I’ve mentioned before that SQL Server Management Studio (SSMS) is a good tool for analyzing queries, as much as for executing them.

In SQL Server 2005, query plans had missing index details added. When a query plan was created, SQL Server recorded that it thought it could have executed the query better, if only you’d provided it with appropriate indexes. But at that point, the suggestions weren’t very good, and the tools didn’t show them.

2018-12-13

SDU Tools: Show a number as text in SQL Server

Years ago, it was common to need to print checks (cheques) from computer systems. Fortunately checks have now pretty much disappeared in most countries. One of the challenges with printing a check, was that you needed to convert an amount of money into words. Even though checks are on the wane, it’s still important to do that on some contracts, etc.  In our free SDU Tools for developers and DBAs,  we added a function NumberAsText to do just that.

2018-12-12