Press "Enter" to skip to content

Curated SQL Posts

Creating an Azure DevOps YAML Pipeline for SQL Server Deploys

Oilivier Van Steenlandt updates to the new Azure DevOps model:

In one of my previous blog posts, I used the SQL Server database deploy task to deploy my DACPAC to SQL Server. Unfortunately, this task became deprecated in Release Pipelines. In this blog post, I would like to share the alternative.

Additionally, we will be moving from a Classic Release pipeline to a YAML pipeline. The YAML pipeline will be responsible for building and deploying our Database Projects.

Click through for the walkthrough.

Comments closed

Commits, Auto versus Manual

Chen Hirsh switches platforms and hits a nasty surprise:

Anyway, I altered some views and stored procedures in the development environment, and after getting approval from the testers, tried to make the same changes in the production environment.

And then something strange occurred, I run an alter view command, and DBeaver told me the command run successfully. But when I ran a select from that view, it still had the old logic before the change. Right clicking the view, and getting its code, showed that it really hasn’t change.

I solved that mystery quickly, though I’ve also worked with auto-commit platforms (SQL Server) and platforms where the default commit is manual (Oracle, Postgres) and have been burned the same way in the past.

Comments closed

Finding Memory Grant Details in sp_WhoIsActive

Erik Darling has a video for us. There’s no graf that I can include here, so I’m stuck having to come up with my own explanation…

This is an interesting video covering a fairly new feature in sp_WhoIsActive, as well as giving us some good information around the numbers meaning pages rather than (something)bytes, yet the memory_info column gives us results in kilobytes.

Also, be sure to grab version 12 of WhoIsActive.

Comments closed

SSMS 19.1 Changes and Roadmap

Erin Stellato has one more post for us:

In SQL Server 2022, support for backup to and restore from S3-compatible object storage was introduced, and in SSMS 19.1 we have added support for restoring from S3 for both Azure SQL Managed Instance and on-premises databases.  The Select backup devices dialog now includes S3 URL in the Backup media type drop down:

This is something I like. But do click through to learn more about SSMS (spoiler: it’s not going away and there will be an SSMS 20).

Comments closed

Calculating Time Series Differences

Steven Sanderson notices the difference:

The diff() function in R calculates the differences between consecutive elements in a vector or a time series. It takes a single argument, which is the input vector, and returns a new vector with the differences. This function is particularly useful for analyzing the rate of change, identifying patterns, and detecting anomalies in your data. 

Read on to see how you can use it, as well as some examples of usage.

Comments closed

Auto-Pausing Synapse Dedicated SQL Pools

Mark Broadbent saves some money via pool auto-pausing:

This capability is neither earth shatteringly new nor unexpected, and something that Databricks has provided for some time. Of the two Data Exploration & Data Warehousing Pool types, Synapse Serverless Pool (otherwise know as the built-in Pool) by its very definition does not incur compute charges when it is not running.

Therefore this leaves us with only dedicated SQL Pool to worry about and this is where our problems begin.

Click through for the scripts to pause and resume a dedicated SQL pool, and Mark promises a part 2 in which we see the automation.

Comments closed

Converting an Excel Crosstab to Power BI Tabular Data

Leila Etaati breaks out Power Query:

There is a common way of seeing data in Excel as a Matrix format; many data entries look like a matrix in many contexts, from accounting to health data. However, to better analyze data and add more calculations and charts and, in general, get more insight from data, we need to change the matrix data in Excel to a tabular format in Power BI.

For example, below table, we have data about the Deaths from Cancer of Lip, oral cavity, and pharynx by age, sex, and year.

Not surprisingly, Power Query does a really good job at handling this common Excel style.

Comments closed

The Importance of the New Power BI Project

Paul Turley lays out an explanation:

Back in December, I posted this short article about how Power BI can participate in Continuous Integration & Continuous Deployment (CI/CD), from simplified code sharing and version control all the way up to fully-automated Build automation & deployment scenarios. However, since the product inception, there have been significant challenges in orchestrating versioning and code sharing with a single PBIX file. Achieving DevOps and CI/CD was possible but it required creative work-arounds and manual steps. In April of this year, Nathan Hales contributed this post, showing how to use Tabular Editor to manually decompose a PBIX file into a Model.bim and then create a Git repo and Azure DevOps project.

Although the essential pattern is the same, the need for manual steps and work-arounds is eliminated with this new feature release!

This is really good news, and Paul shows you how to enable the feature (currently in preview) and use it.

Comments closed

Troubleshooting Slow Performance in SQL Server

Joseph Pilov puts together a compendium:

In the past 1.5 years we in the SQL Server CSS and content teams have been working on creating new documentation to assist with troubleshooting SQL Server slow performance issues.

Here is a list of articles that were produced over this period. Hope you find these useful. Please share with others and don’t hesitate to provide feedback at the bottom of each article page by clicking on “Was this page helpful?”.

The following individuals contributed with reviews, ideas, project management and content creation: Shaun Beasley, Pradeep Madheshiya, Stephanie Okhagbuzo, Hemin Shah, Liwei Yin, Seven Dong, Haiying Yu

Read on for 14 separate articles covering a variety of issues.

Comments closed

Creating a Sparkline in the New Power BI Card Visual

Erik Svensen tries out an updated visual:

In the June 23 release of Power BI desktop we has been blessed with a new card visual that not only will give a better performance compared to adding multiple cards in the past but it also gives us some formatting options we have been dreaming of for a long time.

Here is a link to the official blogpost – New card visual | Public preview | Microsoft Power BI Blog | Microsoft Power BI

On social media you have probably already seen a lot of examples of usages, and I wanted to share how you can add a sparkline to the card to make it look something like this.

Erik does a good job of showing off the capabilities of this updated card visual.

Comments closed