Press "Enter" to skip to content

Curated SQL Posts

Bad Request Error Running Powershell in Azure DevOps

Koen Verbeeck wants good requests:

I needed to run a PowerShell cmdlet in an Azure Devops pipeline. The cmdlet in question was New-AzRoleAssignment, but the cmdlet itself isn’t important. What is important is that I needed to pass the object ID of a service principal to the command. Even though I was pretty sure the syntax and everything was correct, I got a “Operation returned an invalid status code ‘BadRequest’” error when the PowerShell was run (inside an Azure PowerShell task):

Read on to see how Koen diagnosed and resolved the issue.

Comments closed

Capturing Blocking via Extended Event

Tom Collins has a pair of scripts:

Step 1 : Create the SQL Server  Extended Event and output to and event file

Step2 : Excecute this query to read the output of the xel files generated by the Extended Events Session .   

There’s not a lot of commentary around these, but the session includes blocked processes and deadlocks, so that’s nice if you have intermittent blocking chain issues.

Comments closed

Random Page Cost and PostgreSQL Query Plans

Tomas Vondra takes us through a setting:

Last week I posted about how we often don’t pick the optimal plan. I got asked about difficulties when trying to reproduce my results, so I’ll address that first (I forgot to mention a couple details). I also got questions about how to best spot this issue, and ways to mitigate this. I’ll discuss that too, although I don’t have any great solutions, but I’ll briefly discuss a couple possible planner/executor improvements that might allow handling this better.

Tomas’s points around the random_page_cost setting sound a lot like the cost threshold for parallelism setting in SQL Server in inverse: a setting whose default makes sense in a world of spinning disks at 7200 RPM, but not really in a solid state world.

Comments closed

The Importance of Power BI Performance Load Testing

Gilbert Quevauvilliers runs some tests:

It is becoming increasingly important to understand how the Power BI reports/Semantic Model that are being used in your organization are performing.

When using Fabric Capacities this can potentially be of critical importance, because a single report that is not well designed could cripple or bring down your capacity.

By completing Power BI Performance load testing before it goes into a production environment allows for scalable, dependable, repeatable testing to take place in lower environments.

Read on to see what this entails and the tool Gilbert will use throughout this series.

Comments closed

Writing Back to a Fabric Data Warehouse via UDF

Jon Vöge continues a series on write-back options into Microsoft Fabric:

In that article, we took advantage of some of the built-in sample code from the User Data Function editor, as well as some great code examples from Sujata: Example User data functions for Translytical task flows · GitHub

The problem? All of these samples use SQL Databases in Fabric as the backend item.

Jon switches this from a SQL database into a Fabric Data Warehouse, and notes some of the challenges along the way.

Comments closed

k Nearest Neighbors Search in Elasticsearch

Govind Singh Rawat looks for nearby documents:

Businesses are increasingly relying on intelligent search capabilities to enhance customer experience, automate insights, and unlock the potential of unstructured information. Elasticsearch, a leading distributed search and analytics engine, is at the heart of many such systems. One of its powerful and lesser-known capabilities is support for k-nearest neighbors (k-NN) search, a method particularly useful for similarity-based retrieval in domains such as semantic search, recommendation engines, and image recognition.

This article delves into what Elasticsearch and k-NN search are, how the two are integrated, and how to configure and optimize k-NN in Elasticsearch for real-world applications.

Click through for a high-level primer on the topic, as well as a few links to additional resources.

Comments closed

Event Streaming in Microsoft Fabric

Rayis Imayev streams some data:

In my post last week (https://datanrg.blogspot.com/2025/06/salesforce-cdc-data-integration.html), I talked about Salesforce Change Data Capture (CDC) event data streaming, where the initial event destination was file storage in Azure. But what if we anticipate a higher volume of incoming Salesforce source data or the addition of a new data feed? This could create the need for an alternative method of managing incoming events.

Read on to learn more.

Comments closed

Troubleshooting Network-Related or Instance-Specific Error

Aaron Bertrand has started a new series:

This is the first in a series of articles meant to provide practical solutions to common issues. In this post, we’ll talk about one of the most pervasive error messages out there:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

Read on to see what a variety of potential solutions to this problem. I was going to joke “It’s always DNS” but Aaron actually has a section on DNS in there.

Comments closed

Bioconductor in the Wake of ggplot2 4.0.0

Maria Doyle lays it out:

A major update to ggplot2 (version 4.0.0) is expected around mid-to-late July 2025. It brings a significant internal change, replacing most of the S3 backend with the newer S7 object system. While this improves long-term maintainability and extensibility, it may break Bioconductor packages that depend on ggplot2, especially those that customise how plots are built or styled. Packages that use ggplot2 for typical plotting tasks, such as creating plots with ggplot() and geom_*(), are unlikely to be affected.

Click through for notes, tips on what to do, and whether the code you’re using will break with ggplot2 4.0.0. H/T R-Bloggers.

Comments closed