Categories
SQL

Identifying Missing Foreign Key Indexes

Foreign keys provide us with confidence in the integrity of the code we develop. In this post we identify indexing opportunities around foreign keys to increase performance of their usage. Creating an index on a foreign key column (or columns) can provide additional performance in two key situations: That’s all well and good if we’re […]

Categories
Azure SQL Server

Configuring Database Mail for SQL Agent Notifications in Managed Instance

SQL Agent jobs allow us to schedule and automate tasks on a SQL Server instance. Crucially, when things go wrong we need to know about them. That’s why we use notifications. Setting up Operators and job Notifications is as expected on a Managed Instance. However, when it comes to sending the notifications we may have […]

Categories
SQL Server

Ingesting Azure Blob Data Directly to SQL Server

We may associate consuming data from Azure Storage with tools like Data Factory or even SSIS as we saw recently. We don’t always need the middle man though. Here we’ll demonstrate how to use an External Data Source to perform the ingestion directly into SQL Server. Firstly we need the credential to authenticate against the storage. […]

Categories
SQL

Eliminating Bad Code Smells with Indexing Computed Columns

Bad code smells can run through a system, and one instance can quickly spread when code is recycled. Simon recently looked at a non-sargable example and was able to fix it by using an index and refactoring the query. I wanted to consider an alternative approach if we saw the same issue repeated consistently. We don’t want to […]

Categories
SSIS

Solving 2 Common Errors with the Azure Feature Pack

Last week we looked at using the Azure Feature Pack for SSIS to interface with Azure Storage. Today we’re going to solve a couple of the common issues I’ve seen when using this pack. Bad or timed out requests You can set up a connection to the storage and it tests fine, but when you come to […]