The Bit Bucket

General: Adding a rich RSS feed to a Hugo-based Azure Static Website

I posted a while back about moving to using Hugo-based Azure Static Websites for my blog and other simple sites.

One thing I’ve had a number of requests for over the years, is a richer RSS feed for my blog. In particular, while I have a coverImage tag in my front matter, the coverImage didn’t appear in the default RSS feed. I had a few requests about that one. So I set about trying to add a better RSS feed.

2025-11-01

SQL Interview: 90 Truncate table failing

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: Administration Level: Medium

Question:

You are trying to truncate a table but the command is failing.

Can you give some examples of what can cause a truncate command on a table to fail?

Answer:

One common reason is that the table is referenced by a FOREIGN KEY constraint. (But you can truncate a table that has a foreign key that references itself).

2025-10-31

SSMS Tips and Tricks 3-18: Scrolling sensitivity

When I’m editing large script files in SSMS, I sometimes find that the scrolling speed of my mouse wheel is too fast or too slow.

If you don’t like the current speed, SSMS has an option to adjust that.

It’s in the Text Editor, Advanced, section. It allows you to control how many lines you get per scroll (for vertical scrolling) or how many characters (for horizontal scrolling):

2025-10-30

Echoes from the field 3: Views, stored procedures, and abstraction

You shouldn’t have to know how a view or stored procedure works or its internal code structure to use it. To that end, it’s time that stored procedures expose detailed contracts.

Many DBAs don’t allow users direct access to tables in SQL Server databases and instead give them access only via a series of views and stored procedures. One of the cited benefits of this approach—beyond providing a security boundary—is that the views and stored procedures provide a layer of abstraction over the underlying data.

2025-10-29

SSMS Tips and Tricks 3-17: Intellisense casing for function names

When I write T-SQL, my standard is to use upper-case names for built-in system functions. But not everyone likes that.

I’ve done a lot of work on systems where all these names are lower-case. I don’t have any great objection to that, but it’s painful if Intellisense keeps making them upper-case.

But there is a solution. In Text Editor, Transact-SQL, then Intellisense, there is an option for this:

2025-10-28

SQL Interview: 89 Multi-server transactions

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: Administration Level: Advanced

Question:

You have two SQL Server instances. Each is on a separate virtual machine. Both virtual machines are on the same physical host.

You want to be able to create a transaction that spans both instances of SQL Server. What else needs to be installed?

2025-10-27

SSMS Tips and Tricks 7-15: Disabling the open transaction check

When you close SSMS, the default action is that it checks each open window and makes sure there are no open transactions before it closes.

This is to allow you to decide what to do if you do have an open transaction, and based on that, to avoid losing any work.

While this sounds like a great idea, I mostly now work with Azure SQL Database, and my SSMS windows have been idle for long enough that I’ve lost the connection. So, when I close SSMS, it tries to check the transaction status against connections that are already closed under the covers.

2025-10-26

Echoes from the field 2: Much ado about logins and SIDs

It’s really common to see questions in the newsgroups about the inability to access a database that has been moved between servers. Invariably, the problem is that a SQL Server login (i.e., not a Windows login) can’t access the database.

By default, when you recreate a SQL Server login, you get a new security ID (SID), even though you have the same user name and password.

The problem then comes when you restore a database from another server. You can’t access it. If you try to create the user entry in the database, it says it already exists and fails. But if you try to list the users in the database, it also doesn’t show it. That’s often the point at which the administrator wants to throw their mouse through the screen but it doesn’t have to be a problem.

2025-10-25

SSMS Tips and Tricks 7-14: Adding support for Analysis Services, Integration Services, and Reporting Services

When I first installed v21 of SSMS, I was puzzled that many of the connection options in Object Explorer were greyed out:

Because I had been working on a preview version, I thought it just wasn’t there yet. But when I checked the release notes, I saw it should be there. The issue is that I hadn’t added the Business Intelligence workload.

You don’t do that from within SSMS. Instead, you need to run the Visual Studio Installer:

2025-10-24

SQL Interview: 88 Trace flags in use

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: Administration Level: Advanced

Question:

Several trace flags are in use on a server you manage.

You are concerned that a behavior that you are seeing in a session is being caused by an enabled trace flag. How can you determine which trace flags are enabled for a session?

2025-10-23