There is no way to do what you are describing in SSDT deployments. The project expects all objects to exist in the project, or not. There is not a way to specify some should and others should be removed.
sqlpackage excluded type missing schema
sqlpackage.exe doesnt have a way to specify to ignore schema's. If I pass /p:DropObjectsNotInSource=True it wants to drop all schemas outside my dacpac when publishing. For example it generates this if I am deploying a dacpac that does not have "CREATE SCHEMA [abc]]" defined
PRINT N'Dropping SqlSchema [abc]...';
DROP SCHEMA [abc];
There is no type I can pass to p:DoNotDropObjectTypes to have it not drop these.
If list of types can not be adjusted to have schema, maybe an additional flag can be added like "DropSchemasNotInSource=(BOOLEAN)". I have checked Microsoft.SqlServer.Dac.ObjectType and there is no value for Schema currently.
Hi @Christopher Mire ,
I am not familiar with this part, so I search this from google.
Please check if below old thread could help you.
Telling SqlPackage.exe to ignore a specific table - is this possible?
Sign in to comment
Sort by: Most helpful
I have found following enhancement request on DacFX repo which matches what I need.
That one is a different issue.
This is really a feature/bug item for team that maintains sqlpackage.exe. If this is not right place to make such a request, please let me know where to make it.