Troubleshooting

How to fix "Connect Timeout" and/or "Cannot open server xxx requested by the login" when connecting to Azure SQL Managed Instance in redirect mode

Here is something that will save you lots of time and headaches when trying to connect to Azure SQL Managed Instances, especially from onprem servers or from other clouds; I had to repeat this multiple times to multiple actors, so I know it will happen to someone else too.

Read More

How to fix direct Query authentication delegation issues with Power Bi Report Server with Edge and Chrome

With the end of the IE support for Power Bi (and in general tbh), companies are scrambling finally to move their users from the legacy browser to modern ones; it was about time if you ask me.

Read More

How to lose hundreds of thousands of dollars by using functions in SQL Server

Ahh, functions, the greatest tool at a programmer’s disposal, they make code reusable and easy to read, they’ve been essential since the first function call was made in the last century…

Read More

The SQL Diagnostic Notebook: Update 2

Just a quick note, the SQL Diagnostic Book has been updated, here is the changelog:

Read More

How to identify the unit of measure of Extended Events durations

Even if I use Extended Events almost every day, I always forget the unit of measure of each duration counter, since they’re basically arbitrary; Seconds, milliseconds, microseconds?

Read More

A SQL Server Permission Report in PowerBI

What it is and how to get it When working with SQL Instances that have lots of databases, sensitive data and equally lots of users/applications that accesses those, it can get pretty troublesome to keep track of every user, for every database, down to the single column/action.

Read More

Why identity values can jump by the 1000's ? Is it normal?

It must have happened you at least once to find identity columns with values that from one row to the next one jump by 1000’s rows, of course without having anyone deleting the rows in between, how this occurs?

Read More

SQL Server: How to Find a safe restore point (and who messed up) by reading from the Transaction Log

Panic: Someone has messed up and deleted a super important piece of information in a table!

Read More

Troubleshooting SQL Server by analyzing the deviation from average values of Waitstats and Perfmon counters

Counters and Waitstats are good boys and useful for understanding what’s going on in your SQL instance, but often are pretty useless by themselves if you don’t know what’s a normal value for your server; For example a value of 100 batch requests/Sec is a value to worry about?

Read More

Creating a Perfmon and Filestats reports in PowerBI [Part 2]

In this previous post I detailed the structure of the objects to be created to create a live report in PowerBI to analyze Perfmon and Filestats data (which in my case was already being gathered but not used by the FirstRespondersKit tool); Let’s get to the PowerBI stuff.

Read More

SQL Server 2017 CU5 enhances troubleshooting for Intra-Query Parallelism Deadlock

Do you remember this post from not long ago ? Apparently, other than still being an issue, with the latest SQL Server 2017 CU there are additional tools to see what’s going on and troubleshoot.

Read More

Can a single query deadlock itself? Apparently, yes: A curious case of Intra-query Parallelism

Imagine that you’re in a SQL data warehouse in the middle of the night, a single stored procedure is running, is nothing else, and it’s simply doing inserts and updates, one statement at the time, but then.

Read More

Creating a Perfmon and Filestats reports in PowerBI [Part 1]

If you work for a big company, you may have a bunch of instances/databases under your control, you ran whatever monitoring tool has been provided and everybody is happy; But if your’re like me and you’re working for a big number of customers, each one with a different version of SQL and own configuration/security policies, with no monitoring tool directly available, and have to answer the question “what happened to the instance the other night” you may be a little bit overwhelmed.

Read More

How to get and decode callstacks in in extended events for recent versions of SQL Server

The other day I was reading about spinlocks and troubleshooting and it mentioned to get the callstack for a certain xevent and to decode it using the windows debugging symbols, however, that material was related to SQL Server 2012 and the steps weren’t basically replicabile for a modern version like SQL 2016/2017 (or even 2014 I think, but haven’tn checked personally), I searched around and didn’t really find something straight forward for just the process as it is now: So, here we are, small guide on how to get and decode callstacks in recent versions of SQL Server.

Read More

THREADPOOL, or, Why is SQL server not responsive even the CPU is basically idle?

It’s a late Friday afternoon, this means that somebody is going to tell you that the server is unresponsive, users are blocked and there is a imperative deadline for the business at 6PM (which you think is probably because they don’t want to be late to the happy hour), so you do what you do best: sigh and log on to see what’s going on with this instance.

Read More