Extracting a DACPAC

SQL Server has the concept of data-tier applications. This is a way of defining the structure and data of an entire database within a single file, enabling it to be moved between machines. There are two types of files that can be used:

  • BACPAC - This contains the database schema and the data from a database.
  • DACPAC - This contains the just the database schema by default, but data from some tables can be included.

Data-tier applications have benefits over backup files in that they are more portable. Backups are tied to the version of SQL Server that they are created with, meaning that only that version or later can restore them.

I use DACPACs a lot to get database schemas between different servers. Deploying a DACPAC will sometimes fail due to it containing logins, users, etc… from the database it was created from that don’t exist on the server it is being deployed to. When this happens, SQL Server Management Studio simply fails with an error with no way around the issue.

It is possible to deploy however, but it takes a bit of command line trickery. To do this, first install the SqlPackage dotnet tool:

 dotnet tool install -g microsoft.sqlpackage

Once installed, you can run it from the command line, passing the option to exclude certain object types. Something like:

sqlpackage
  /Action:Publish
  /TargetServerName:.\SQL2025
  /TargetDatabaseName:Northwind
  /Properties:ExcludeObjectTypes="Users;RoleMembership;Logins;ServerRoles;ServerRoleMembership;Permissions"
  /SourceFile:northwind.dacpac

It’s the /Properties:ExcludeObjectTypes=... parameter that does the magic. In this case, the security-related objects causing the deploy to fail will be excluded from the deployed database schema.

More details can be found in the docs for the SqlPackage publish action.


nor(DEV):con 2026

I’ve just returned from nor(DEV):con, an event I previously went to a few years ago.

Designing Services That Stand The Test Of Time

by Paul Grenyer

Designing Services That Stand the Test Of Time by Paul Grenyer

Stop Testing! (My Patience)

by Ryan Healey

Stop Testing! (My Patience) by Ryan Healey

Modular Monoliths And Other Facepalms

by Kevlin Henney

Modular Monoliths And Other Facepalms by Kevlin Henney

Debugging Your Imposter Syndrome

by Vickie Allen-Collier

Debugging Your Imposter Syndrome by Vickie Allen-Collier

Learn How To Learn

by Frances Buontempo

Learn How To Learn by Frances Buontempo

Translating Business Metrics Into Meaningful User Outcomes

by Elisabeth Dubus

Translating Business Metrics Into Meaningful User Outcomes by Elisabeth Dubus

How We Support Deploying Multi-Cloud Apps At Stack Overflow

by Chris O’Dell

How We Support Deploying Multi-Cloud Apps At Stack Overflow by Chris O'Dell


NDC London 2026

After a three year hiatus, last week I returned to the Queen Elizabeth II Centre in Westminster to attend NDC London.

QE II Centre

As I’ve done before, I was part of the crew helping out at the event. In exchange for a free ticket, you help out with the setup and registration of attendees, and spend 50% of each day room monitoring. While I did not know most of the crew when I turned up, we formed our own little community within the conference and got to know each other in just a few days.

NDC Crew 2026

.Net Meets MCP - Build Your Own AI-Powered Service With C#

by Gerald Versluis

.Net Meets MCP - Build Your Own AI-Powered Service With C# by Gerald Versluis

Advanced Pattern Matching In C#

by Oliver Sturm

Advanced Pattern Matching In C# by Oliver Sturm

10 Tips To Level Up Your AI Assisted Coding

by Aleksander Stensby

10 Tips To Level Up Your AI Assisted Coding by Aleksander Stensby

Modern .Net Configuration Practices

by Chris Ayers

Modern .Net Configuration Practices by Chris Ayers

Notebooks And .Net

by Alexander Hall

Notebooks And .Net by Alexander Hall

Immutable Patterns Of System Design

by James Eastham

Immutable Patterns Of System Design by James Eastham

Progressive Collapse

by Sam Newman

Progressive Collapse by Sam Newman

Application Performance Optimisation In Practice

by Steve Gordon

Application Performance Optimisation In Practice by Steve Gordon

Modular Code

by Ian Cooper

Modular Code by Ian Cooper

Optimising HttpClient Usage

by Nico Vermeir

Optimising HttpClient Usage by Nico Vermier

Code That Writes Code - .Net Source Generators

by Glenn F. Henriksen

Code That Writes Code - .Net Source Generators by Glenn F. Henriksen

AI-Powered App Development

by Steve Sanderson

AI-Powered App Development by Steve Sanderson

Supercharging Local Development With Aspire

by Jimmy Bogard

Supercharging Local Development With Aspire by Jimmy Bogard


DDD South West 13

As is becoming customary each April, I did my annual trip to DDD South West last weekend. Another really good event.

Surviving Complexity Through Software Design

by Jacqui Read

Surviving Complexity Through Software Design by Jacqui Read

Modern Software Architecture Review Best Practices

by Steven Read

Modern Software Architecture Review Best Practices by Steven Read

Why Am I Being Such A Git About Best Practices?

by Joe Glombek

Why Am I Being Such A Git About Best Practices? by Joe Glombek

A Developers Guide To Getting The Most Out Of Containers

by John Kilmister

A Developers Guide To Getting The Most Out Of Containers by John Kilmister

Mutation Testing

by Stuart Lang

Mutation Testing by Stuart Lang

Let’s Ship This Thing!

by Gary Ewan Park

Let's Ship This Thing! by Gary Ewan Park


StaffPlus London 2024

After previously attending last year’s inaugural event, I recently went back to StaffPlus London. This year was compèred by Suhail Patel, one of the speakers from 2023.

Influencing Through Getting Your Carrots In A Row

by Joy Ebertz

Influencing Through Getting Your Carrots In A Row by Joy Ebertz

Architecting For Scale And Simplicity

by Segun Viktor Orekoya

Architecting For Scale And Simplicity by Segun Viktor Orekoya

Deming’s Wisdom For Staff+ Engineers: A Modern Take On Timeless Principles

by Annie Vella

Deming's Wisdom For Staff+ Engineers: A Modern Take On Timeless Principles by Annie Vella

Filling The Void: Operating As A Staff Engineer In A Leaderless Scope

by Sami Farhat and Guillaume Mazollier

Filling The Void: Operating As A Staff Engineer In A Leaderless Scope by Sami Farhat + Guillaume Mazollier

Doing “The Most Important Thing” Is A Trap

by James Ford

Doing "The Most Important Thing" Is A Trap by James Ford

Letting The Best Ideas Win

by Tristan Heal

Letting The Best Ideas Win by Tristan Heal

Sunsetting Legacy: Navigating The Shop Merchant Eligibilty Data Pipeline Migration

by Dianing Yudono

Sunsetting Legacy: Navigating The Shop Merchant Eligibilty Data Pipeline Migration by Dianing Yudono

by Mahmut Canga

Navigating Complex Projects: Finding The Right Mode Of Operation by Mahmut Canga

Understanding Complex Systems Without Simplifying Them

by Rita Sodt

Understanding Complex Systems Without Simplifying Them by Rita Sodt

Have AI Got News For You

by Katie Koschland

Have AI Got News For You by Katie Koschland

Is Staff Engineering Valuable At A Small Company?

by Glen Mailer

Is Staff Engineering Valuable At A Small Company? by Glen Mailer

Fitness Functions: Creating Consistency Across 100s Of Services

by Bijan Chokoufe Nejad

Fitness Functions: Creating Consistency Across 100s Of Services by Bijan Chokoufe Nejad