The Bit Bucket

SSMS Tips and Tricks 5-8: Turning off completion times

I’ve had many developers ask me how can I turn off those annoying completion time messages in SSMS?.

A while back, the product team decided that we’d all like completion times shown in the Messages output tab. I don’t share their enthusiasm for them.

For a start, a completion time was already shown here in the Properties window for the query, along with much more info:

So, for me, it really was quite irrelevant. Worse, I often use the output of the Messages tab as text for scripts, etc. The last thing I wanted were a bunch of completion times sprinkled through those.

2025-09-02

SQL Interview: 75 Boolean logic with NULLs

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Development Level: Intro

Question:

In the following WHERE clause, both AColumn and AnotherColumn are NULL.

WHERE AColumn = AnotherColumn

What is the effect of the WHERE clause?

Answer:

In SQL boolean logic, the expression NULL = NULL returns NULL and not True. So the WHERE clause would exclude the rows.

2025-09-01

SSMS Tips and Tricks 5-7: Viewing queries and results in separate tabs

In SSMS, query results are normally shown at the bottom of the query window.

This can greatly reduce the screen real estate both for the query, and for viewing the results.

In Tools, Options, Query Results, SQL Server, Results to Grid, there is an option to Display results in a separate tab. This can be very useful and generally you will also want to choose the extra option to Switch to results tab after the query executes.

2025-08-31

Data Tales 1: The case of the auto-truncating data

This is the first tale in a series of stories about data. I hope you enjoy the series.

I have a number of clients that I spend a day or two with each month. I like this style of engagement as I get to know the staff and their systems over a period of time, can see the improvements that we make over time. The staff members also know that if they have issues that aren’t desperate, they can save them up for the days that I am onsite. When I arrived at one of these customer sites recently, several of the staff members had grins on their faces, and one told me that Terry (well let’s call him Terry anyway) had really broken something.

2025-08-30

SQL Server High Availability Online Course Released

Over the past few months, we’ve been updating and converting courses that we used to run in-person, to a full online and on-demand format. The latest course is on High Availability for SQL Server.

We’re pleased to announce that this course is now available. This is another course that we’ve had so many requests for. You can find details of it here:

SQL Server High Availability for Developers and DBAs

It’s time to keep your SQL Server running - no matter what !

2025-08-30

SSMS Tips and Tricks 5-6: Playing a sound when a query completes

In a previous post , I mentioned that when a long running query completes, I might not have been waiting around for it, and so I wanted to know when it completed.

But sometimes I do wait around for a query to complete, yet I’m distracted by other things and don’t realize that the query has actually completed. That’s not surprising because if a query takes a long time, I’m probably going to go on with other work while that’s running.

2025-08-29

SQL Interview: 74 Revoking permissions

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Security Level: Medium

Question:

Is it possible that revoking a permission can cause a user to be able to access a resource, when they previously could not?

If so, how?

Answer:

REVOKE can remove either a GRANT or a DENY. Revoking a DENY can cause a user to be able to access a resource that they previously could not.

2025-08-28

PG Down Under show 5 on using pgNow to optimize PostgreSQL with guest Grant Fritchey is published!

I had the pleasure of recording a new PG Down Under podcast last night. My guest was Grant Fritchey.

Grant has worked in IT for more than thirty years, as a developer and a DBA and I’ve known him for many of those years. Grant is known for his writing, as a Microsoft Data Platform MVP, and an AWS Community Builder.

Grant is a product evangelist with our friends at RedGate.

2025-08-27

SSMS Tips and Tricks 5-5: Determining when a query finished

It’s likely that everyone who uses SSMS knows how to tell how long a query ran for. You can see it in the bottom right of the status bar when a query finishes.

But one question that often comes up with a long-running query is when did my query finish?

That’s not in the status bar and many people don’t seem to be aware that you can determine that.

It’s part of the data in the Properties window. So when you come to a query window where the query has finished, and you’re wondering when it finished, hit F4 (or right-click in the window and click Properties), and you’ll see this info shown:

2025-08-27

PowerShell: New-Object : Constructor not found. Cannot find an appropriate constructor for type

This blog post is here so that I don’t forget it in future.

I’ve been writing Powershell again all day today and I spent ages trying to find this error when instantiating a particular object.

Bottom line is that there was a valid constructor that took a single string argument. However, I was passing an empty string to the constructor. I won’t tell you what I really think about that error message. Let’s just leave it at The error message returned is interesting.

2025-08-26