Press "Enter" to skip to content

Category: T-SQL Tuesday

Troubleshooting a Problem with sp_send_dbmail

Shane O’Neill applies the Sgt. Schultz defense:

I don’t like posting about issues unless I fundamentally understand the root cause. That’s not the case here. A lot of the explanation here will be hand-waving while spouting “here be dragons, and giants, and three-headed dogs”, but I know enough to give you the gist of the issue.

Click through for a fun story about Kerberos and behavioral changes after absolutely nothing happened.

Comments closed

Modeling I/O Utilization with Resource Governor

Michael J. Swart does some modeling:

How do we predict whether it’s safe to put workloads from two servers onto one?

We use Availability Groups to create readable secondary replicas (which I’ll call mirrors). The mirrors are used to offload reporting workloads. The mirrors are mostly bound by IOPS and the primaries are mostly bound by CPU, so I wondered “Is there any wiggle room that lets us consolidate these servers?”

Can we point the reporting workloads (queries) at the primary replica safely?

Read on for the answers to these questions.

Comments closed

Identifying Old OLEDB and ODBC Drivers on Machines

Lucas Kartawidjaja goes on a quest:

The vulnerabilities are affecting Microsoft ODBC Driver 17 and 18, as well as OLE DB Driver 18 and 19. For more information and also download location for the security update/ hotfix can be found on the following page: Update: Hotfixes released for ODBC and OLE DB drivers for SQL Server

We do an automated security scanning tool that would flag the systems (servers, desktops, latptops, etc.) that haven’t been patched. So we can quickly identify the systems that need to be patch and patched those systems quickly.

For this post, I was wondering if there is a quick way to identify Microsoft ODBC and OLE DB drivers that are being installed on the systems. 

Click through to see what Lucas came up with.

Comments closed

Viewing DAX in Microsoft Fabric with SemPy

Kevin Chant talks about a recent issue:

Recently I have been helping others get up to speed with Microsoft Fabric. Which includes going through some Power BI topics.

One issue that came up was how to show them the DAX used for a measure within a Power BI report that had been published to Microsoft Fabric. To link working with measures in Power BI Desktop with working in Microsoft Fabric.

Kevin shows the normal way of doing this, as well as an alternative using the SemPy library.

Comments closed

Breaking out a CHECKDB Run

Mikey Bronowski fixed a problem:

Regular execution of DBCC CHECKDB is a cornerstone practice for DBAs, ensuring that databases are free from corruption. However, this routine maintenance can sometimes feel more like a Herculean task, especially when DBCC CHECKDB runs slower than a snail in molasses, or worse, gets terminated because it runs too slow.

Read on to see what Mikey did to fix the issue. This is a good reminder that sometimes, there is no single silver bullet, but a whole magazine of lead can still get you to the same location.

Comments closed

Troubleshooting a Stored Procedure Performance Problem

Deborah Melkin digs in:

In fact, I just fixed a stored procedure that had its performance change due to an upgrade to SQL Server 2022 last week. We were doing internal testing in our test environment and one proc suddenly took significantly longer than it should have. But it was also a proc that had not changed in months so it was very clear that the reason it became a problem was due to the upgrade.

Click through for some detail on how Deborah figured it out.

Comments closed

Troubleshooting Performance around a Data Purge Process

Andy Mallon troubleshoots an issue:

In January, one of our Staff Engineers sent the following message to the DBRE help channel in Slack:

Morning folks, we had a pretty significant wait spike on the [database]. Circuit breakers closed and reopened quickly. Is anyone immediately aware of a reason why this could’ve happened?

Read on for Andy’s quick analysis and then the root cause and solution.

Comments closed

Forced Quorum Failures with WSFC

Eitan Blumin can’t reach quorum:

The incident started with a late-night phone call from one of our customers (it’s always a late-night phone call, isn’t it?).

They reported that during a DR exercise on their production environment (Chaos Engineering, anyone?) their entire cluster failed and they weren’t able to bring any of the replicas back online.

Click through for the full story, including what happened, why it happened, and what you can do to prevent similar problems in the future.

Comments closed

T-SQL Tuesday 170 Roundup

Reitse Eskens writes up a roundup about abandoned projects:

When I thought of this subject last year, I was really on the fence if it would work or not. Part of me was convinced it would elicit some response from the community, part of me was convinced people would be looking for a ‘happy’ start of the year and might not want to think or write about past learnings.

Part of me was right, but I never expected SO MANY of you to jump in and write so many wonderful blogs. It feels a bit unfair to summarise all your hard hard work, so please click the links to read the full stories. Well worth your time!

Click through for plenty of stories on the topic of lessons learned from abandoned projects.

Comments closed