Press "Enter" to skip to content

Category: Error Handling

Tracking Database Errors with Extended Events

Eitan Blumin is watching you:

But interestingly enough – we would be getting an added benefit here. Even if there is no SQL injection attack, it’s still possible that such errors would be raised by the application – simply due to bugs.

Furthermore, these errors in the database may be happening without anyone even noticing! How could that be, you ask? Well, it could be due to bad error handling that “swallows” the error entirely, or because the errors are logged but no one is bothering to look at the logs, or maybe because the errors are caught but an undetailed error message is logged/displayed to the user (I can’t even count how many times I encountered “general database error” messages in applications), or because the developers simply decided to mark this as a “known issue” that they didn’t bother to fix and they didn’t think to ask their DBA about it… The reasons are numerous and varying.

Click through for the scripts. I had built something similar about a decade ago, a simple WPF app which watched for errors. I messaged him with something like “You missed a comma in that IN clause” and I saw him pop up from his cubicle and look around, trying to figure out how I could peek over his shoulder and see the query.

1 Comment

Text Concatenation and Dataset Refresh Errors

Chris Webb follows up on a prior post:

One of the most popular topics I’ve ever written about here is the dataset refresh errors you get with dynamic data sources and the Web.Contents function in Power BI (see here and here for example). Recently I learned about an interesting new detail regarding this problem that I thought was worth blogging about, and which may help someone trying to troubleshoot it.

Read on for the scenario, as well as what you can do to avoid an issue.

Comments closed

SQLErrorCodes

Sean Gallardy takes a number:

I am often asked about all kinds of various errors, of course with absolutely no context. I also get asked what error X is or means or says… I don’t remember that stuff off the top of my head. The thing is, you kind of need SQL Server to go look it up and there have been a plethora of times when this wasn’t possible. I’ve also noticed that people tend to give you just the error number and not anything else.

Read on to learn more about what Sean has created, akin to the SQLskills wait stats compendium.

Comments closed

Troubleshooting Caching in Shiny

Thomas Williams illuminates us on the caching process:

Caching in R Markdown is a valuable step to get your app, report or visualisation more production-ready. There are one or two potential issues to watch out for, especially when deploying a cache-enabled R Markdown file to a Shiny server – in this post I’ll go over some of these “gotchas”, and how you could address each one.

Click through for those three gotchas.

Comments closed

“The Function Requested Is Not Supported” Errors on Availability Groups

David Fowler troubleshoots an issue:

Checking the logs on the secondary, it was littered with ‘Database Mirroring login attempt failed with error: ‘Connection handshake failed. An OS call failed: (80090302) 0x80090302(The function requested is not supported).’ messages. The primary server wasn’t able to authenticate with the secondary, but why? Everything looked ok as far as I could see.

Click through for the fruits of David’s labor.

Comments closed

Increased Response Rate and Request Time in Kafka

Danica Fine and Nikoleta Verbeck troubleshoot another common Apache Kafka issue:

It can be easy to go about life without thinking about them, but requests are an important part of Kafka; they form the basis of how clients (both producers and consumers) interact with data as it moves into and out of Kafka topics, and, in certain cases, too many requests can have a negative impact on your brokers. To understand how requests can affect the brokers, it’s important to be familiar with what happens under the hood when a request is made. 

Read on to see how the process works under the covers, what kinds of metrics you can use to determine how well things are going, and what might be going wrong if you see certain symptoms.

Comments closed

Profiler Errors against Power BI Dataset

Shabnam Watson troubleshoots an issue:

I was trying to trace a dataset I had published to Power BI service using SQL Server Profiler and I was getting this error:

Either the trace with the ID of ‘MicrosoftProfilerTrace1667261566’ does not exist in the server with the ID of ‘autopremiumhostnorthcentralus001-081’, or the user does not have permissions to access the object.

Read on for the solution.

Comments closed

Finding the Real Error in a DAX Measure

Teo Lachev builds on a prior post:

This blog builds upon my previous “Resolving Tabular Conversion Errors” and applies to Analysis Services in all flavors (Power BI, MD, and Tabular). In the scenario I described in the previous blog, the server at least told us the name of the offending measure in the error description. But sometimes you might not be that lucky. For example, recently I got this error when running a DAX query requesting many measures: “Microsoft OLE DB Provider for Analysis Services.” Hresult: 0x80004005 Description: “MdxScript(Model) (2000, 133) Failed to resolve name ‘SYNTAXERROR’. It is not a valid table, variable, or function name.” All we know is that there is a syntax error in some measure but good luck finding it if you have hundreds of measures in the query and your model. However, the (2000,133) section references the line number and column number in the MDX script (Yeap, MDX even if you use Tabular), so if we can get the script, we might be able to correlate the error.

Read on to see how you can capture that script and get the error. The technique is definitely not intuitive.

Comments closed

Finding Faulty Rows in Tabular Server Errors

Teo Lachev goes error-hunting:

A scheduled SSIS job that executes a massive DAX query to an on-prem Tabular server (Power BI can also generate this error) one day decided to throw an error “Source: “Microsoft OLE DB Provider for Analysis Services.” Hresult: 0x80004005 Description: “MdxScript(Model) (2020, 98) Calculation error in measure ‘Account Snapshot'[Average utilisation % of all CR active current accounts last 3 months]: The result of a conversion or arithmetic operation is either too large or too small.” At least we know the offending measure, but which row is causing the error? The query requests some 300+ measures for 120 million customers, so I thought someone might find the troubleshooting technique useful. Let’s ignore what the measure does for now except mentioning that it performs a division of two other measures.

Click through for the technique.

Comments closed

A Duplicate Despite a Distinct

Murder Forrest McDaniel Wrote:

“A duplicate despite a DISTINCT bodyguard…” one mutters. “This isn’t the normal level of foul play.”

Mods arrive to cordon off the scene. Twelve different butlers have already been accused, but each has a solid alibi, even MAXDOP.

Generic Protagonist paces back and forth. They’re waiting for the forensics report. Finally it arrives.

Of course, those forensics people don’t know what they’re doing, so you’d better click through and find the real killer.

Comments closed