I'm trying to migrate specific objects from one database to another using sqlpackage.exe /action:Extract
and sqlpackage.exe /action:Script
. Currently I'm creating the script and filtering the unneeded objects manually, I would like to be able to exclude them all together and to automate the process. So far I didn't find in the documentation any option that does it.
Thanks.
Asked
Active
Viewed 57 times
0

Yuval Perelman
- 4,499
- 1
- 22
- 32
1 Answers
1
There is no way to remove single objects with native functionality. Natively you can remove only specific object types.
You can write your own deployment contributor and then skip whatever objects you need. Here is an example here.
Check Ed Elliot's ready to use contributor with bunch of configuration options (I haven't used it for a while and do not know how does it work with the new versions of SQL Server).
Additionally, in Ed Elliot's blog you can find a lot of useful information.

Dmitrij Kultasev
- 5,447
- 5
- 44
- 88
-
1thanks a lot, that looks promising. I will definitely look into that. – Yuval Perelman Apr 10 '19 at 19:22