0

We develop a lot of modules separately. This means the Blog module has its own database in development. All objects of each module start with the module schema. So the Posts table inside the Blog module is named blog.Posts.

However, in production we deploy all modules to one target database.

For example, this means that in production I will have these objects:

blog.Posts
content.Pages
seo.Configurations
menu.Items
email.Templates

Now, I want to compare Blog module database with the production database. I'm using SqlPackage for this purpose.

The point is that SqlPackage creates a huge drop script, because it thinks that all other tables from other modules that exist in the production database should be dropped.

Is there a way to tell SqlPackage to only compare the objects of a given schema? Can I configure SqlPackage to only compare blog schema?

2

1 Answer 1

2

Check out the DropObjectsNotInSource option to Script and Publish actions in SqlPackage.exe:

/p: DropObjectsNotInSource=(BOOLEAN)

Specifies whether objects that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database. This value takes precedence over DropExtendedProperties.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.