sql-servervisual-studiosql-server-data-toolsschema-comparedac

How to setup schema compare file so that it always ignores a specific db schema?


I have two SSDT projects targeting the same database. When I use Schema Compare feature from any of the projects, it detects the other project's objects as being non-existent and sets them for deletion.

I cannot merge the two projects into one as I make use of the DAC API and there's a point where I need one compiled before the other. The "dependent" project's objects are all in the same db schema (let's call it myschema), which is unknown from the "core" project.

Is there any way I can setup the SCMP file so that when comparing the "core" project it ignores everything that's placed inside myschema?


Solution

  • Not really, the best that I have done is to exclude the things you don't want and then save the SCMP and add it to the project. If you add other objects to that schema though they won't be excluded (if you look in the scmp you can see how the exclusions are done).

    I personally find that using the schema compare is a rare thing, it is better (for me) to automate the deployment to my developer database and use that to always keep it in sync with the projects rather than part deploying projects. My process is basically:

    ed