6

I have a database which includes many cached/generated tables. I'd like to exclude these (permanently) when I do a schema compare. Is there any way to configure the schema compare to ignore a specific schema or, even better, a specific object name? E.g. I'd like to ignore all tables within the "cache" schema whose name begins with "XYZ".

I realize that if I ignore an object once, its "ignore status" is persisted. However, I will still see it in the comparison results (figure 1,000 ignored tables, for example). I'm looking for a way to permanently hide, or simply not show ignored objects.

Another example would be if I wanted to split a large database into multiple, reusable projects. I may want to exclude certain schemas from each project when running a schema compare.

Josh M.
  • 26,437
  • 24
  • 119
  • 200
  • I'm not aware of any way of doing this natively. I've read about some people writing plug-ins to do that during the publish phase, but that's as far as I saw that. You may want to investigate Red-Gate's Schema Compare if this is ongoing. – Peter Schott Feb 20 '15 at 13:46

1 Answers1

2

You can't use this with the schema compare ui but if you deploy using sqlpackage.exe or publish in visual studio you can write a deployment contributor to allow exactly this i.e. remove certain steps from the deployment.

You need to write in c# (or vb.net) or there is a generic one you can use:

http://agilesqlclub.codeplex.com/

If you get stuck with it, give me a shout!

Ed Elliott
  • 6,666
  • 17
  • 32