2

We have a SQL server database that is very dynamic and is always creating new and dropping existing tables from a custom schema called 'temp' (we have a dbo schema and a temp schema). We also use SSDT to maintain and monitor changes in our schema but we are unable to use the update feature on a schema comparison because if a new table is created (say temp.MyTable) after the schema comparison is made and before the updated is attempted, SSDT invalidates the schema comparison because something has changed. At the moment, our only solution to this is to run the schema comparisons around midnight when system activity is practically non-existent but is not ideal for the person who has to do the schema comparison.

My question is, is there a way we can exlude tables from the schema comparison that are apart of the 'temp.' schema?

Palps
  • 568
  • 9
  • 20
  • If you are using a VS database project then you run a schema compare, switch to schema grouping and then exclude the schema easily from there. If you then save your schema compare file you can re-use appropriately – gvee Jun 25 '15 at 11:02

1 Answers1

1

How are you doing the deployment? as I test I used sqlpackage.exe to publish a dacpac and sat there constantly creating new tables and it deployed without complaining.

However, there are a couple of things you can do, the first is to stop getting the deployment to stop when drift is detected:

/p:BlockWhenDriftDetected=False

This is set to true by default.

The second thing is to ignore the temp schema, but I don't think this will help unless you also stop the drift but you might want to use this filter to stop all changes to the temp schema:

http://agilesqlclub.codeplex.com/

Ed

Ed Elliott
  • 6,666
  • 17
  • 32