Specifying Multiple Properties in SQLPackage

The MSDN page for SQLPackage is great for all the information you could possibly need to use SQLPackage via command line. And there are a lot of options, especially with the Properties: although these can be set in a publish.xml file, you can override whatever is specified within the publish file by specifyingthe property name and setting the value. This is especially useful when you don’t want to have many publish.xml files in a solution.

However one thing the MSDN page misses are examples, which is strange because the MSDN pages usually have many examples. Nevertheless it’s still a great resource, but recently I needed to deploy some dacpacs and needed to specify multiple properties via cmdline. At first I thought it could be done like so:


But this turned out to be incorrect. What you actually need to do is specify “/p:” for each property you are going to call:

/p:Storage=Memory /p:AllowIncompatiblePlatform=True

Author: Richie Lee

Full time computer guy, part time runner. Full time Dad, part time blogger. Knows a thing or two about Pokémon. Knows too much about SQL Agent. Writer of fractured sentences. Maker of the best damn macaroni cheese you've ever tasted.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s