Press "Enter" to skip to content

Curated SQL Posts

SQL Server 2019 Now Available

Asad Khan announces the general availability of SQL Server 2019:

As you saw from our launch announcement earlier today, over a year ago at Microsoft Ignite we announced our first preview of SQL Server 2019 and today our latest release is now generally available.

You have told us that in today’s demanding world of massive data, wide variety of data sources, and expectations of near real-time application and query performance you need more than just a database engine. You need a modern data platform.

If you’re an early adopter, note that there is a patch for it already.

Comments closed

Merging Datasets in R with the Tidyverse

Anisa Dhana shows off several tidyverse methods for combining data sets together:

semi_join
The semi_join function is different than the previous examples of joins. A semi join creates a new dataset in which there are all rows from the data1 where there is a corresponding matching value in data2. Still, instead of the final dataset merging both the first (data1) and second (data2) datasets, it only contains the variables from the first one (data1).

Most of this looks like standard SQL joins, but read through to the end for a bonus which doesn’t typically appear in relational database products.

Comments closed

Scripting and Deploying Data with SSDT

Kamil Nowinski shows how you can script out and deploy data as part of your SSDT database project:

It’s a very common scenario when we have a database (project) and require some data in selected tables even in the freshly deployed, empty database.
Nomenclature for these data/tables that you can meet are:
– reference data
– master data
– dictionary
Which term have you heard and is closest to you?

By default, SSDT does not support scripting or deploying the data.
Hence: the question is: how we can cope with that?

Read on for the answer.

Comments closed

Visual Studio 2019 and SQL Server Extensions

Tomaz Kastrun shows how you can install support for SSIS, SSAS, and SSRS with Visual Studio 2019:

Visual Studio 2019 brings new installation of SQL Server Integration services and SQL Server Analysis Services and SQL Server Reporting Services.

There is no need to download SSDT (SQL Server Data Tools for Visual Studio) as used to do with Visual Studio 2017 or previous versions.

Installation is pretty easy once you know where to look.

Comments closed

Azure AD Logins for Managed Instances

Mirek Sztajno announces a new feature for Azure SQL Managed Instances:

We are happy to announce a general availability (GA) for Azure AD server principals (Azure AD logins) for SQL managed instance (MI). This feature allows Azure AD users to create logins in the master database for MI, grant MI server level permissions for these logins and create Azure AD users with     logins for individual MI databases.

Additionally, enabling Azure AD logins allow users to execute many MI features supported for SQL logins (see the documentation at the end of this blog).

Read on to learn more about this feature.

Comments closed

RSExecRole Already Exists

Dave Mason troubleshoots an annoying error:

When migrating an instance of SSRS, I performed a backup of the [ReportServer] and [ReportServerTemp] SSRS databases from a SQL Server 2008 R2 instance and restored them to a SQL Server 2017 instance. After installing SSRS 2017 on the target machine, I ran SSRS configuration and attempted to set the Current Report Server Database to the existing [ReportServer] database I had already restored:

Read on to see the error and Dave’s fix. As I get older and more cantankerous, I realize even further the benefit of rerunnable scripts and repeatable processes. They prevent so many errors of this sort.

Comments closed

Visualizing a Table

Cole Nussbaumer Knaflic takes a fairly simple table and creates eight visuals out of it:

STEP 1: When I encounter this table, I start reading and scanning down columns and across rows. In terms of specific observations, I might start by noticing that the majority of accounts are in Tiers B and C, while Tiers A and A+—though they don’t make up a huge number (or percentage) of accounts—do make up a meaningful amount of revenue. In terms of questions, I wonder if the tiers are in order: I would think A+ belongs above A and am confused that they don’t appear that way in the table (perhaps due to alphabetical sorting?).

This is a really nice practical exercise if you want to learn how to apply the right visuals to tell your story.

Comments closed

Memory-Optimized Tempdb Metadata

Niko Neugebauer takes a detailed look at an exciting 2019 feature:

Anyone who has ever seen/done tuning bigger Hardware would instantly be interested, since the CPU is clearly going 100% during the processing, showing APPARENT better focus on the process and hopefully better performance. Since the granularity of the Task Manager for both cases is the same, you can easily notice that overall spent significantly less time churning the same workload and that is very true – we have spent just 11.777 Seconds on the average!

The main benefit to this is an environment where you’re creating and destroying a lot of temp tables concurrently. If you are in that situation, you can realize significant performance improvements. But Niko does have a warning at the end.

Comments closed

Dealing with Time Zones in SQL Server

Nate Johnson hates time zones:

To start with, the transactional data is in PST/PDT — i.e. Pacific Time with DST fluctuation. Yes, it’s horrible. No, I don’t know what happens to events or jobs at 2am on the “Fall Back” date, or between 2am and 3am on the “Spring Forward” date. No, I can’t change it right now. Stop whining.

Now, I have offices in Paris France, Hong Kong, and Beijing China. These are 3 different “time zones”, but only 2 different offsets — China and Hong Kong are in the same bucket, namely, UTC +08:00. More on that later.

Dates and currencies are seemingly two of the simplest things we deal with, but two of the most complex sets of data types.

Comments closed