Press "Enter" to skip to content

Curated SQL Posts

Debunking Security Myths with SQL Server

Eitan Blumin has some myths for us:

Many organizations assume that their SQL Server is secure because it is behind a firewall. However, firewalls only block traffic to specified ports and protocols, and they do not protect against attacks that come through allowed traffic. Therefore, it’s important to secure SQL Server at a more granular level.

Furthermore, even if your SQL Server is not connected to the internet, it can still be hacked through internal attacks or by using compromised devices that connect to your network… If at least one privileged user can connect to the SQL Server, that means a malicious attacker potentially could do the same.

My one quibble is that number 5 isn’t a myth. I accept the importance of performing auditing, and people I know who have insane transactional throughput requirements still perform auditing, but there certainly is a performance effect. Otherwise, definitely worth the read.

1 Comment

SSIS Package Migration with dtutil

John McCormack does some spring cleaning:

SQL Server Integration Services (SSIS) is a powerful tool, but migrating packages across SQL Servers can be a slow and thankless task if you don’t use automation. The single best way to do this is by using DTUTIL, a command-line utility provided directly by Microsoft. When it comes to moving 1000s of packages, I would only use DTUTIL because it can achieve in minutes what it would takes days to achieve using point and click.

Read on to see how you can move these packages between instances, as well as downloading packages as a backup.

Comments closed

What’s New in Power BI: May 2023 Edition

Ronald Kraijesteijn talks about some of the more interesting updates:

In May 2023, Microsoft announced a series of updates and new features to its Power BI platform, aiming to improve user experience, accessibility, and performance. As a skilled blog writer, I will provide you with a comprehensive summary of these updates, covering all areas from reporting and modeling to embedded capabilities and accessibility improvements.

There’s a lot on this list to check out.

Comments closed

The Basics of Azure Chaos Studio

Arun Sirpal gives us an overview:

Chaos engineering is fun but especially important when building solutions in the cloud. It is great leveraging the cloud to build something, whether that’s a globally distributed website with lots of traffic or an internal 3 tier application for a business – the question is – what happens is there is an unexpected fault / disruption? Can your system / app withstand the issue?

Click through for the overview, as well as some additional resources you can use to try it out.

Comments closed

Roles and Domains in Microsoft Fabric

Marc Lelijveld explains two key concepts:

Microsoft Fabric is out there for a few weeks now. With the release of Fabric, a new concept in line with data-mesh architectures became available in Fabric, or Power BI if you will. With the introduction of Domains, we have a new level of controls added next to existing roles. In this blog I will further elaborate on the levels of control that are available today and provide a clear overview of these different levels.

There’s going to be a bit of nomenclature adjustment for people who have spent most of their time in Synapse or other platforms moving to Fabric. If you’ve already spent most of your time in Power BI, this shift is probably a little easier.

Comments closed

Power BI: Unable to Access the Dataset

Nicky van Vroenhoven troubleshoots an error:

I opened a report with a Live connection to a dataset and I was presented with the error below:

We encountered an error while trying to connect.

Details: “Looks like we’re unable to access the dataset. Please contact the owner of the dataset.”

Read on for the answer to this. And if that doesn’t work, the next question is, do you actually have rights to the dataset?

Comments closed

Identifying Expensive Queries via Query Store

Matthew McGiffen takes a look at what’s slowing down that SQL Server instance:

Some time ago I wrote a query store version of the “Top 20 queries” query that will produce a ranked list of your most expensive queries – and I’ve ended up using this a lot.

The only downside of using the DMVs for Query Store is that they are per database whereas dm_exec_query_stats is a view across the whole instance. So I had to use a cursor and a temp table, populating the temp table for each database in turn.

Click through for the script. This is where having a centralized Query Store, in which you regularly dump Query Store stats from various user databases into your own managed database, could be quite useful.

Comments closed

Automating Azure SQL DB Maintenance Tasks

Tracy Boggiano reminds us that we still need to administer Azure SQL DB databases:

I’ve been using Azure SQL Database for quite some while and have set up it in many various ways to run Ola’s Index Optimize and Statistics Updates on them.  All of these have seemed way too complicated probably because I was setting them up once, not again for several more months or a year.  Well with my new job, I have over 20 subscriptions with various Azure SQL Servers in them so it was time to streamline at least knowing what I was doing.  No matter what I googled on the Internet I never did find one source that walked me step by step on each thing I needed to know to set this up.  So hopefully this will cover everything.

Click through for the step-by-step process.

Comments closed

Unpivoting Data in R

Steven Sanderson shows off a function with a slightly confusing name:

In the world of data analysis and manipulation, tidying and reshaping data is often an essential step. R’s tidyr library provides powerful tools to efficiently transform and reshape data. One such function is pivot_longer(). In this blog post, we’ll explore how pivot_longer() works and demonstrate its usage through several examples. By the end, you’ll have a solid understanding of how to use this function to make your data more manageable and insightful.

The slight confusion is that this function is really unpivoting rather than pivoting. In R terminology, a pivot takes you from longer data to wider data: it uses some function to convert data from N rows * M columns to n*m, where N > n and M < m. Unpivoting does the opposite and I personally like that terminology better than “pivot wider” or “pivot longer.”

Comments closed

Using SHAP to Gauge Geographic Effects in R or Python

Michael Mayer runs an analysis:

This is the next article in our series “Lost in Translation between R and Python”. The aim of this series is to provide high-quality R and Python code to achieve some non-trivial tasks. If you are to learn R, check out the R tab below. Similarly, if you are to learn Python, the Python tab will be your friend.

This post is heavily based on the new {shapviz} vignette.

I appreciate the effort to include both R and Python code in this analysis, and recommend you peruse both sets of code listings.

Comments closed