none
dacpac, sql project schema compare doesnt show all differences

    Question

  • Hi,

    A schema compare between a dacpac and a sql project does not show the differences I otherwise see when I go to the database from which the dacpac was created and compare it with the target database project.

    Also, in some cases after a dacpac to sql project shows up differences, the update target button is disabled. There are no errors. However I do notice 5 messages that say, "Message 56 The Update Action was reset for an object of type ‘Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlDefaultConstraint’ because it is indistinguishable from another object of the same type with the same parent. The parent object is ‘sm.StateTransition’ of type ‘Table’.  0 0 "

    Any guidance would be very helpful. Thank you.

    Wednesday, December 12, 2012 11:08 PM

Answers

  • Sachin,

    Can you also tell me how the DACPAC was generated? Was it via the SSDT SqlPackage.exe tool, or via SSMS?  The latter method would be generating V2 DACPACs and Schema Compare does not support update to a database from a V2 DACPAC.  This would explain why the update target button is disabled.


    Tony.

    Tuesday, December 18, 2012 11:51 PM

All replies

  • A schema compare between a dacpac and a sql project does not show the differences I otherwise see when I go to the database from which the dacpac was created and compare it with the target database project.

    Any examples of the differences you are seeing would be helpful in order to provide an answer.

    Also, in some cases after a dacpac to sql project shows up differences, the update target button is disabled. There are no errors. However I do notice 5 messages that say, "Message 56 The Update Action was reset for an object of type ‘Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlDefaultConstraint’ because it is indistinguishable from another object of the same type with the same parent. The parent object is ‘sm.StateTransition’ of type ‘Table’.  0 0 "

    This message is being raised when you exclude objects from the comparison. My guess based on the message is that you are trying to exclude a parent object while the child object is still included. Since the child can not exist without the parent object it therefore gets reset. This should show as an error and will disable the update target button. Make sure your errorlist visualizes both errors and warnings, since this is message #56, there might be more in there that yuo need to pay attention to to resolve issues in order to update the target.

    -GertD @ www.sqlproj.com

    Thursday, December 13, 2012 11:26 PM
  • Hi Sachin,

    Would it be possible for you to share the DACPAC and project with us for examination? I'd like to see if I can reproduce this behavior locally to determine why it is happening.  If you can, please send them to me directly at tgedge[at]microsoft.com.

    With respect to the warning messages, does the table in question (sm.StateTransition) have more than one default constraint defined?  Are these default constraints named, or are they defined inline? Also, can you describe the sequence of events you performed in more detail - for example, was this comparison started from a previously saved SCMP or was it a brand-new comparison?

    I think what is happening may be an issue determining which of several unnamed inline default constraints is actually excluded, when the exclusions were done on a previous comparison.  A potential workaround might be to make the default constraints named.

    Tony.


    Tony.

    Tuesday, December 18, 2012 9:11 PM
  • Sachin,

    Can you also tell me how the DACPAC was generated? Was it via the SSDT SqlPackage.exe tool, or via SSMS?  The latter method would be generating V2 DACPACs and Schema Compare does not support update to a database from a V2 DACPAC.  This would explain why the update target button is disabled.


    Tony.

    Tuesday, December 18, 2012 11:51 PM