We use SSDT in VS 2015 to manage our database project code. Recently, we've been implementing partitioning on some tables in databases that are managed with SSDT.

I need to include the partition function and partition scheme definition in my project if I want to declare a dependency on that scheme in my table definitions. I'd prefer to ignore changes to the scheme and function so we can manage that outside of the project.

The problem I am having is that SSDT's publish profile appears to not be honoring my partition scheme exclusion settings even though they appear to be set correctly.

When I go to Advanced options in the publish profile settings and click on the Ignore tab, I have "Ignore partition schemes" and "Ignore table options" checked in the top box as well as "Exclude partition schemes" and "Exclude partition functions" checked in the bottom box.

Unchecking the option for partition functions appears to be behaving properly. When checked, the function disappears from the generated deployment script. However, regardless of which options I check and uncheck in regards to the partition scheme the partition scheme still appears in the publish script.

This is a screenshot of my settings: screenshot

I recently upgraded from SSDT v14.0.61707.300 to v14.0.61712.050 but the behavior still exists (the latest release 17.4 on the MS site) https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt

Can anyone explain what I'm doing wrong or is this a confirmed bug?

Is the partition scheme forced to exist in the publish script under certain circumstances that my project may be affected by?

I'd rather not have to completely remove all partitioning definitions from the project in order to work around this single issue as it will obscure the definitions.

  • Does the object already exist in your SSDT project? – Anthony Genovese Dec 22 '17 at 21:25
  • @AnthonyGenovese yes it does – Alf47 Dec 27 '17 at 16:23
  • maybe try deleting the object in the project. Saving the solution, then seeing what happens? – Anthony Genovese Dec 27 '17 at 20:53
  • Maybe this post contains relevant information? I'm attempting to do something similar. – David Rogers Oct 23 '18 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.